sanguo
所属分类:WEB开发
开发工具:PHP
文件大小:15365KB
下载次数:19
上传日期:2012-05-29 13:10:21
上 传 者:
lys4280003283
说明: 大型的三国网页PHP游戏,适合做二次开发用
(Large the three pages PHP games, suitable for the secondary development)
文件列表:
sanguo (0, 2008-12-28)
sanguo\CheckUserName.php (291, 2008-07-04)
sanguo\activation.php (926, 2008-10-28)
sanguo\admin (0, 2008-11-18)
sanguo\admin\adminer.qg.php (5936, 2008-11-17)
sanguo\admin\book.qg.php (4063, 2008-05-02)
sanguo\admin\cache.qg.php (700, 2008-05-01)
sanguo\admin\category.qg.php (9542, 2008-05-01)
sanguo\admin\class.phpmailer.php (56917, 2008-09-30)
sanguo\admin\class.smtp.php (33031, 2008-07-19)
sanguo\admin\email.qg.php (4259, 2008-11-17)
sanguo\admin\feedback.qg.php (2538, 2008-05-01)
sanguo\admin\gamefriend.qg.php (2984, 2008-11-16)
sanguo\admin\gameitem.qg.php (3098, 2008-11-16)
sanguo\admin\gamejs.qg.php (3391, 2008-11-16)
sanguo\admin\gamejz.qg.php (3326, 2008-11-16)
sanguo\admin\gamekj.qg.php (3142, 2008-11-16)
sanguo\admin\gamenpc.qg.php (3059, 2008-11-16)
sanguo\admin\gamerw.qg.php (3249, 2008-11-16)
sanguo\admin\gameshop.qg.php (3106, 2008-11-16)
sanguo\admin\gamesys.qg.php (2996, 2008-11-16)
sanguo\admin\gameunion.qg.php (3225, 2008-11-16)
sanguo\admin\gamewar.qg.php (3521, 2008-11-16)
sanguo\admin\gamewj.qg.php (3027, 2008-11-16)
sanguo\admin\index.img.qg.php (1242, 2008-05-01)
sanguo\admin\index.qg.php (308, 2008-05-01)
sanguo\admin\job.qg.php (4142, 2008-05-01)
sanguo\admin\language.qg.php (4220, 2008-05-01)
sanguo\admin\left.sys.php (533, 2008-05-01)
sanguo\admin\link.qg.php (1707, 2008-05-01)
sanguo\admin\mail.php (558, 2008-11-17)
sanguo\admin\msg.qg.php (16462, 2008-05-01)
sanguo\admin\nav.qg.php (4040, 2008-05-01)
sanguo\admin\notice.qg.php (2319, 2008-05-01)
sanguo\admin\online.qg.php (814, 2008-06-16)
sanguo\admin\open.addpic.qg.php (2738, 2008-06-16)
sanguo\admin\open.addthumb.qg.php (2117, 2008-05-01)
sanguo\admin\open.designpic.qg.php (230, 2008-05-01)
sanguo\admin\open.iframe.upload.qg.php (1734, 2008-05-01)
sanguo\admin\open.index.img.qg.php (2083, 2008-05-01)
... ...
select_db("baysoftchat");
timer();
//
//验证用户身份。
//
//if(!verifyMember(session_id(),$_COOKIE["NickName"]))
//{
// echo "parent.location.href=\"notice.php?id=".not_login."\"";
// exit;
//}
//if(!$db->connect())
//{
// echo "alert('数据库连接失败!')";
//}
$sql = "select * from `messages` where (`to_user` = '".$_COOKIE["NickName"]."' or `private`=0) and `id` > {$_GET["messageid"]} and `from_user` != '{$_COOKIE["NickName"]}' order by `id` asc";
$tm = time();
$db->query("update `onlinelist` set `activetime` = '{$tm}' where `username` = '{$_COOKIE["NickName"]}'");
$result = $db->query($sql);
$totalRows = $db->num_rows($result);
if(mysql_error())
{
$db->query("repair table `messages`");
}
$readedRows = 0;
while($rows = $db->fetch_array($result))
{
echo 'writeMessage("'.nl2br(addslashes($rows["content"])).'","'.$rows["from_user"].'","'.$rows["to_user"].'","'.$rows["time"].'","'.$rows["title"].'","'.$rows["saycolor"].'","'.$rows["namecolor"].'","'.$rows["private"].'","'.$rows["type"].'","'.$rows["event"].'","'.$rows["face"].'");';
$readedRows ++;
if($readedRows==$totalRows)
echo "messageid=".$rows["id"].";";
}
/**************************解决一段时间没有更新时间的用户,因为该用户可能已经掉线了--*/
$leaveTime = 60; //每一分钟清除一次用户
$clearTime = time()-60;
$microtime = explode(" ",microtime());
$microtime = $microtime[0]+$microtime[1];
if(($microtime-$db->result($db->query("select `value` from `config` where `name` = 'check_online'"),0,"value"))>$leaveTime)
{
$db->query("update `config` set `value` = '".$microtime."' where `name` = 'check_online'");
$clearResult = $db->query("select `username`,`roomid` from `onlinelist` where `activetime` < {$clearTime}");
if($clearTotalRows = $db->num_rows($clearResult))
{
while($clearRow = $db->fetch_array($clearResult))
{
$db->query("delete from `onlinelist` where `username` = '{$clearRow["username"]}'");
if($db->affectedrows())
{
$message = array("private"=>"","event"=>"","from_user"=>"","type"=>"","roomid"=>"","content"=>"","to_user"=>"","title"=>"","namecolor"=>"","saycolor"=>"","face"=>"");
$message["event"] = msg_leave;
$message["from_user"] = $clearRow["username"];
$message["type"] = type_system;
$message["roomid"] = $clearRow["roomid"];
addMessage($message,$db);
}
}
}
}
//echo "showDebug('".timer()."','".$db->querynumbers()."');";
$db->close();
?>
近期下载者:
相关文件:
收藏者: