本帖最后由 chao2ling 于 2009-11-27 14:19 编辑
其实不难看出fbean发布的补丁是以VIP为基础修改的
所以当读取好友VIP状态时如果你没有打VIP补丁就会出现死循环
一直是刷新状态大家只要把newmc.php里的- if ( $_REQUEST['mmod'] == "friend" && $_REQUEST['mod'] == "common" )
- {
- if ( $_REQUEST['false'] == "refresh" )
- {
- echo "{"code":0}";
- exit( );
- }
- if ( !empty( $space[friend] ) )
- {
- $space[friend] = $space[friend].",";
- }
- //vipbegin
- $queryVip = $_SGLOBAL['db']->query( "SELECT uid,coalesce(vipstatus,0) as vipstatus,coalesce(validtime,0) as validtime,coalesce(jointime,0) as jointime,coalesce(vippoint,0) as vippoint,coalesce(level,1) as level,coalesce(endtime,0) as endtime FROM uchome_plug_newfarm_vip WHERE uid IN (".$space[friend].$_SGLOBAL['supe_uid'].")" );
- while ( $valueVip = $_SGLOBAL['db']->fetch_array( $queryVip ) )
- {
- $listVip[] = $valueVip;
- }
- foreach ( $listVip as $valueVip1 )
- {
- verifyVip($_SGLOBAL['db'],$_SGLOBAL['timestamp'],$valueVip1);
- }
- //vipend
- $query = $_SGLOBAL['db']->query( "SELECT n.uid,n.exp,n.money,coalesce(v.vippoint,0) as vippoint,coalesce(v.vipstatus,0) as vipstatus,coalesce(v.validtime,0) as validtime,coalesce(v.level,1) as level FROM ".tname( "plug_newfarm" )." n left join uchome_plug_newfarm_vip v on n.uid=v.uid WHERE n.uid IN (".$space[friend].$_SGLOBAL['supe_uid'].")" );
- while ( $value = $_SGLOBAL['db']->fetch_array( $query ) )
- {
- $list[$value['uid']] = $value;
- }
- $friendid = "";
- foreach ( $list as $value )
- {
- $friendid .= $value[uid];
- $friendid .= ",";
-
- }
- $friendid = substr( $friendid, 0, -1 );
- $query = $_SGLOBAL['db']->query( "SELECT uid,username,name FROM ".tname( "space" )." WHERE uid IN (".$friendid.")" );
-
- while ( $value = $_SGLOBAL['db']->fetch_array( $query ) )
- {
- $list[$value['uid']] = array_merge( $list[$value['uid']], $value );
- }
- $jishu = 0;
- foreach ( $list as $key => $value )
- {
- ++$jishu;
- if ( 300 < $jishu )
- {
- break;
- }
- $value[name] = $value[username];
-
- $friend_str[] = "{"userId":".$value[uid].","userName":"".unicode_encodegb( $value[username] )."","headPic":"".avatarmc( $value[uid], "small", TRUE )."","yellowlevel":"".$value[level]."","yellowstatus":".$value[vipstatus].","exp":".$value[exp].","money":".$value[money].","pf":1}";
- }
- $friend_str = json_encode( $friend_str );
- $friend_str = str_replace( ""{", "{", $friend_str );
- $friend_str = str_replace( "}"", "}", $friend_str );
- $friend_str = str_replace( "\\/", "\\\\/", $friend_str );
- $friend_str = str_replace( ",null,", ",", $friend_str );
- echo stripslashes( $friend_str );
- exit( );
- }
复制代码 替换成:- if ( $_REQUEST['mmod'] == "friend" && $_REQUEST['mod'] == "common" )
- {
- if ( $_REQUEST['false'] == "refresh" )
- {
- echo "{"code":0}";
- exit( );
- }
- if ( !empty( $space[friend] ) )
- {
- $space[friend] = $space[friend].",";
- }
- $query = $_SGLOBAL['db']->query( "SELECT uid,exp,money FROM ".tname( "plug_newfarm" )." WHERE uid IN (".$space[friend].$_SGLOBAL['supe_uid'].")" );
- while ( $value = $_SGLOBAL['db']->fetch_array( $query ) )
- {
- $list[$value['uid']] = $value;
- }
- $friendid = "";
- foreach ( $list as $value )
- {
- $friendid .= $value[uid];
- $friendid .= ",";
- }
- $friendid = substr( $friendid, 0, -1 );
- $query = $_SGLOBAL['db']->query( "SELECT uid,username,name FROM ".tname( "space" )." WHERE uid IN (".$friendid.")" );
- while ( $value = $_SGLOBAL['db']->fetch_array( $query ) )
- {
- $list[$value['uid']] = array_merge( $list[$value['uid']], $value );
- }
- $jishu = 0;
- foreach ( $list as $key => $value )
- {
- ++$jishu;
- if ( 300 < $jishu )
- {
- break;
- }
- if ( empty( $value[name] ) )
- {
- $value[name] = $value[username];
- }
- include_once( '../source/function_cp.php' );
- $friendavatarimage = ckavatar($value[uid])?avatarmc($value[uid], 'small', true):UC_API.'/images/noavatar_small.gif';
- $friend_str[] = "{"userId":".$value[uid].","userName":"".unicode_encodegb( $value[username] )."","headPic":"".$friendavatarimage."","exp":".$value[exp].","money":".$value[money].","pf":1,"yellowlevel":0,"yellowstatus":0}";
- }
- $friend_str = json_encode( $friend_str );
- $friend_str = str_replace( ""{", "{", $friend_str );
- $friend_str = str_replace( "}"", "}", $friend_str );
- $friend_str = str_replace( "\\/", "\\\\/", $friend_str );
- $friend_str = str_replace( ",null,", ",", $friend_str );
- echo stripslashes( $friend_str );
- exit( );
- }
复制代码 |