回复 2# 玻璃屋女孩
我的也发现了这个问题,用管理员账号搜索不会出现这个问题,用普通账号会出现这个问题。
问题在这个函数,但是我现还没找到解决方法,$theurl的问题
//检查搜索
function cksearch($theurl) {
global $_SGLOBAL, $_SCONFIG, $space;
$theurl = stripslashes($theurl)."&page=".$_GET['page'];
if($searchinterval = checkperm('searchinterval')) {
$waittime = $searchinterval - ($_SGLOBAL['timestamp'] - $space['lastsearch']);
if($waittime > 0) {
showmessage('search_short_interval', '', 1, array($waittime, $theurl));
}
}
if(!checkperm('searchignore')) {
$reward = getreward('search', 0);
if($reward['credit'] || $reward['experience']) {
if(empty($_GET['confirm'])) {
$theurl =stripslashes($theurl). "&confirm=yes";
showmessage('points_deducted_yes_or_no', '', 1, array($reward['credit'], $reward['experience'], $theurl));
} else {
if($space['credit'] < $reward['credit'] || $space['experience'] < $reward['experience']) {
showmessage('points_search_error');
} else {
//扣分
$_SGLOBAL['db']->query("UPDATE ".tname('space')." SET lastsearch='$_SGLOBAL[timestamp]', credit=credit-$reward[credit], experience=experience-$reward[experience] WHERE uid='$_SGLOBAL[supe_uid]'");
}
}
}
}
} |