lt4.php
Handle scheduled refresh issues
session_start();
include("g_fun.php");
f_connectdb();
$tmpi = 0;
$query = "select lt_id,lt_speaker,lt_face,lt_speaked,lt_time,lt_content from lt_t_content";
$query .= " where lt_id > ".$chat_hh. " order by lt_time ";
$res = mysql_query($query, $dbh);
while ($row = mysql_fetch_array($res)) {
?>
$tempi=$row[lt_id];
}
if ($tempi > $chat_hh) {
$chat_hh = $tempi;
}
?>
ltonline.php
Process online User information
include("g_fun.php");
f_connectdb();
//Delete user information that has not spoken for a long time
$query = "update lt_t_online set lt_state = 1 where (now() - lt_lasttime) > 500";
$res = mysql_query($query, $dbh);
print "Online personnel information
";
$query = "select lt_username from lt_t_online where lt_state = 0";
$res = mysql_query($query, $dbh);
while ($row = mysql_fetch_array($res)) {
print $row["lt_username"] .
;
}
?>
[The copyright of this article is jointly owned by the author and Oso.com. If you want to reprint, please indicate the author and source]
http://www.bkjia.com/PHPjc/532367.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/532367.htmlTechArticlelt4.php handles scheduled refresh issues session_start(); include(g_fun.php); f_connectdb(); $tmpi = 0; $query = select lt_id,lt_speaker,lt_face,lt_speaked,lt_time,lt_content from lt_t_con...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn