$query = $_SGLOBAL['db']->query('SELECT COUNT(*) FROM '.tname($resultmodels['modelname'].'items').' WHERE '.$wheresqlstr);
复制代码
替换成
if($_SGLOBAL['supe_uid']!=1){
$query = $_SGLOBAL['db']->query('SELECT COUNT(*) FROM '.tname($resultmodels['modelname'].'items').' WHERE uid = \''.$_SGLOBAL['supe_uid'].'\' And '.$wheresqlstr);
}else{
$query = $_SGLOBAL['db']->query('SELECT COUNT(*) FROM '.tname($resultmodels['modelname'].'items').' WHERE '.$wheresqlstr);
}
复制代码
其中if($_SGLOBAL['supe_uid']!=1)把1换成 自己的管理员ID
同上把
$query = $_SGLOBAL['db']->query('SELECT * FROM '.tname($resultmodels['modelname'].'items').' WHERE '.$wheresqlstr.' ORDER BY '.$order.' LIMIT '.$start.','.$perpage);
复制代码
替换成
if($_SGLOBAL['supe_uid']!=1){
$query = $_SGLOBAL['db']->query('SELECT * FROM '.tname($resultmodels['modelname'].'items').' WHERE uid = \''.$_SGLOBAL['supe_uid'].'\' And '.$wheresqlstr.' ORDER BY '.$order.' LIMIT '.$start.','.$perpage);
}else{
$query = $_SGLOBAL['db']->query('SELECT * FROM '.tname($resultmodels['modelname'].'items').' WHERE '.$wheresqlstr.' ORDER BY '.$order.' LIMIT '.$start.','.$perpage);