但是 请楼主说明
修改文件:source/network_space.php- 找到
- $count = empty($_SCONFIG['networkpage'])?1:$_SGLOBAL['db']->result($_SGLOBAL['db']->query($c_sql),0);
- if($count) {
- $query = $_SGLOBAL['db']->query("$sql LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
- $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
- $fuids[] = $value['uid'];
- $list[] = $value;
- }
- }
-
- //在线状态
- 替换
- $count = empty($_SCONFIG['networkpage'])?1:$_SGLOBAL['db']->result($_SGLOBAL['db']->query($c_sql),0);
- if($count) {
- $vfuids = array();
- $vlist = array();
- $query = $_SGLOBAL['db']->query("$sql LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
- $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
- if ($value[groupid] == $_SCONFIG[vipapp]) {
- $vfuids[] = $value['uid'];
- $vlist[] = $value;
- } else {
- $nfuids[] = $value['uid'];
- $nlist[] = $value;
- }
- }
- $fuids = array_merge_recursive($vfuids,$nfuids);
- $list = array_merge_recursive($vlist,$nlist);
- }
- //在线状态
复制代码 在原文件中没有以上的段落只有- $count = empty($_SCONFIG['networkpage'])?1:$_SGLOBAL['db']->result($_SGLOBAL['db']->query($c_sql),0);
- $multi = multi($count, $perpage, $page, $theurl."&view=$_GET[view]");
- } else {
- $cache_mode = true;
- $multi = '';
- $start = 0;
- $perpage = $count;
-
- if($cache_file && file_exists($cache_file) && $_SGLOBAL['timestamp'] - @filemtime($cache_file) < $cache_time*60) {
- $list_cache = sreadfile($cache_file);
- $list = unserialize($list_cache);
- }
- }
- if($count && empty($list)) {
- $query = $_SGLOBAL['db']->query("$sql LIMIT $start,$perpage");
- while ($value = $_SGLOBAL['db']->fetch_array($query)) {
- realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
- $value['isfriend'] = ($value['uid']==$space['uid'] || ($space['friends'] && in_array($value['uid'], $space['friends'])))?1:0;
- $fuids[] = $value['uid'];
- $list[] = $value;
- }
- if($cache_mode && $cache_file) {
- swritefile($cache_file, serialize($list));
- }
- }
-
- //在线状态
复制代码 如果按照lz要求修改后会无法查询好友,请告知原因 |