Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / users / pnblocks [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
31 Jul 2002 13:52:39 | postnuke_official/html/modules/users/pnblocks | online.php,1.5,1.6 | Paul Rosania |
fixed online block |
Update of /home/cvsroot/postnuke_official/html/modules/users/pnblocks In directory ns7.hostnuke.net:/tmp/cvs-serv19392/modules/users/pnblocks Modified Files: online.php Log Message: fixed online block Index: online.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/users/pnblocks/online.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** online.php 13 Jun 2002 15:45:23 -0000 1.5 --- online.php 31 Jul 2002 13:52:37 -0000 1.6 *************** *** 81,85 **** $pntable = pnDBGetTables(); - $sessioninfocolumn = &$pntable['session_info_column']; $sessioninfotable = $pntable['session_info']; --- 81,84 ---- *************** *** 87,98 **** // TODO - see if this can be done in a better way ! $sql = "SELECT $sessioninfocolumn[uid], COUNT(1) FROM $sessioninfotable ! WHERE $sessioninfocolumn[lastused] > $activetime ! GROUP BY $sessioninfocolumn[uid]"; ! $result = $dbconn->Execute($sql); ! if ($dbconn->ErrorNo()) { // Error getting information - return // TODO - handle this better? --- 86,97 ---- // TODO - see if this can be done in a better way ! $query = "SELECT pn_uid, COUNT(1) FROM $sessioninfotable ! WHERE pn_lastused > $activetime ! GROUP BY pn_uid"; ! $result = $dbconn->Execute($query); ! if ($dbconn->ErrorNo() != 0) { // Error getting information - return // TODO - handle this better? *************** *** 104,108 **** $userlist = array(); ! for (; !$result->EOF; $result->MoveNext()) { list($uid, $num) = $result->fields; if ($uid == 0) { --- 103,107 ---- $userlist = array(); ! while (!$result->EOF) { list($uid, $num) = $result->fields; if ($uid == 0) { *************** *** 112,115 **** --- 111,116 ---- $numusers++; } + + $result->MoveNext(); } $result->Close(); *************** *** 138,152 **** if (!empty($vars['who'])) { $userstable = $pntable['users']; - $userscolumn = &$pntable['users_column']; $userlist = join(',', $userlist); ! $sql = "SELECT $userscolumn[uname], ! $userscolumn[uid] FROM $userstable ! WHERE $userscolumn[uid] in (" . pnVarPrepForStore($userlist) . ") ! ORDER BY $userscolumn[uname]"; $result = $dbconn->Execute($sql); ! if ($dbconn->ErrorNo()) { // Error getting information - return // TODO - handle this better? --- 139,152 ---- if (!empty($vars['who'])) { $userstable = $pntable['users']; $userlist = join(',', $userlist); ! $sql = "SELECT pn_uname, ! pn_uid FROM $userstable ! WHERE pn_uid in (" . pnVarPrepForStore($userlist) . ") ! ORDER BY pn_uname"; $result = $dbconn->Execute($sql); ! if ($dbconn->ErrorNo()) {//echo $sql.$dbconn->ErrorMsg();exit; // Error getting information - return // TODO - handle this better?
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |