发新话题
打印

大家注意dz6.0里比较流氓的bbsinformation方法

大家注意dz6.0里比较流氓的bbsinformation方法

该方法是把网站基本信息发送到dz官方,语句写得太不负责了。文件路径 admin/global.func.php
function bbsinformation() {
global $db, $timestamp, $tablepre, $charset, $bbname, $_SERVER, $siteuniqueid, $save_mastermobile;
$update = array('uniqueid' => $siteuniqueid, 'version' => DISCUZ_VERSION, 'release' => DISCUZ_RELEASE, 'php' => PHP_VERSION, 'mysql' => $db->version(), 'charset' => $charset, 'bbname' => $bbname, 'mastermobile' => $save_mastermobile);
$updatetime = @filemtime(DISCUZ_ROOT.'./forumdata/updatetime.lock');
if(empty($updatetime) || ($timestamp - $updatetime > 3600 * 4)) {
  @touch(DISCUZ_ROOT.'./forumdata/updatetime.lock');
  $update['members'] = $db->result_first("SELECT COUNT(*) FROM {$tablepre}members");
  $update['threads'] = $db->result_first("SELECT COUNT(*) FROM {$tablepre}threads");
  $update['posts'] = $db->result_first("SELECT COUNT(*) FROM {$tablepre}posts");
  $query = $db->query("SELECT special, count(*) as spcount FROM {$tablepre}threads GROUP BY special");
  while($thread = $db->fetch_array($query)) {
   $thread['special'] = intval($thread['special']);
   $update['spt_'.$thread['special']] = $thread['spcount'];
  }
}
$data = '';
foreach($update as $key => $value) {
  $data .= $key.'='.rawurlencode($value).'&';
}
return 'update='.rawurlencode(base64_encode($data)).'&md5hash='.substr(md5($_SERVER['HTTP_USER_AGENT'].implode('', $update).$timestamp), 8, 8).'&timestamp='.$timestamp;
}

TOP

发新话题