<?php !function_exists('readover') && exit('Forbidden'); $newonline = "{$windid}\t{$timestamp}\t{$onlineip}\t{$fidwt}\t{$tidwt}\t{$groupid}\t{$wherebbsyou}\t{$acttime}\t{$uid}\t<>\t"; $newonline = str_pad($newonline, $db_olsize) . "\n"; if (checkinline(R_P . $D_name, $offset, $windid)) { $isModify = 0; writeinline(R_P . $D_name, $newonline, $offset); } else { list($offset, $isModify) = GetInsertOffset(R_P . $D_name); writeinline(R_P . $D_name, $newonline, $offset); }
function addguestfile($offset) { global $timestamp, $onlineip, $tid, $fid, $wind_in, $db_olsize; if (strlen($fid) > 4) { $fidwt = ''; } else { $fidwt = $fid; } if (strlen($tid) > 7) { $tidwt = ''; } else { $tidwt = $tid; } $wherebbsyou = getuseraction($fid, $wind_in); $acttime = get_date($timestamp, 'm-d H:i'); $newonline = "{$onlineip}\t{$timestamp}\t<FiD>{$fidwt}\t{$tidwt}\t{$wherebbsyou}\t{$acttime}\t"; //<FiD>主要用于thread.php里快速找到指定的版块游客 $newonline = str_pad($newonline, $db_olsize) . "\n"; $D_name = "data/bbscache/guest.php"; if (!file_exists(D_P . $D_name)) { pwCache::setData(D_P . $D_name, str_pad("<?php die;?>", 96) . "\n"); } if (checkinline(D_P . $D_name, $offset, $onlineip)) { $isModify = 0; writeinline(D_P . $D_name, $newonline, $offset); } else { list($offset, $isModify) = GetInsertOffset(D_P . $D_name); writeinline(D_P . $D_name, $newonline, $offset); } if ($isModify === 1) { //频度可控制性 ModifySelectFile(D_P . "data/bbscache/online.php"); if ($GLOBALS['userinbbs'] === 0) { $GLOBALS['userinbbs']--; ModifySelectFile(D_P . $D_name, 1); } } return array($offset, $isModify); }