原帖由 chun555 于 2005-10-1 19:26 发表
把macher.php
中的定义机器人在线函数
- //定义机器人在线函数
- ................................................
复制代码
改为:
- //定义机器人在线函数
- function machersession($uidss, $userss, $fid, $tid) {
- global $db, $sid, $sessionexists, $timestamp, $onlinehold, $table_sessions, $table_members, $onlineip;
- $ips = explode('.', $onlineip);
- $acti = rand(0,3)<2 ? 3 : 12;
- $query = $db->query("SELECT groupid, styleid, invisible FROM $table_members WHERE uid='$uidss'");
- $usergid = $db->fetch_array($query);
- $db->query("DELETE FROM $table_sessions WHERE sid='$uidss'");
- $db->query("INSERT INTO $table_sessions (sid, ip1, ip2, ip3, ip4, uid, username, groupid, styleid, invisible, action, lastactivity, fid, tid)
- VALUES ('$uidss', '$ips[0]', '$ips[1]', '$ips[2]', '$ips[3]', '$uidss', '$userss', '$usergid[groupid]', '$usergid[styleid]', '$usergid[invisible]', '$acti', '$timestamp', '$fid', '$tid')");
- $db->query("UPDATE $table_members SET sinew=sinew+1, credit=credit+".intval($logincredits).", lastip='$onlineip', lastvisit='$timestamp', lastactivity='$timestamp' WHERE uid='$uidss'", 'UNBUFFERED');
- $sessionupdated = 1;
- }
复制代码 |