if($NOIP_flag[0]==0)$view_month_rank=mysql_query_cache("select user_id,nick,count(distinct(problem_id)) ac from solution where solution_id>$month_id and problem_id>0 and result=4 group by user_id,nick order by ac desc limit 10");
if($NOIP_flag[0]==0)$view_month_rank=mysql_query_cache("select user_id,nick,count(distinct(problem_id)) ac from solution where solution_id>$month_id and problem_id>0 and user_id not in (".$OJ_RANK_HIDDEN.") and result=4 group by user_id,nick order by ac desc limit 10");
index.php中
php include("template/$OJ_TEMPLATE/header.php");
if($NOIP_flag[0]==0)$view_month_rank=mysql_query_cache("select user_id,nick,count(distinct(problem_id)) ac from solution where solution_id>$month_id and problem_id>0 and result=4 group by user_id,nick order by ac desc limit 10");
改为 php include("template/$OJ_TEMPLATE/header.php"); require_once('./include/db_info.inc.php');
if($NOIP_flag[0]==0)$view_month_rank=mysql_query_cache("select user_id,nick,count(distinct(problem_id)) ac from solution where solution_id>$month_id and problem_id>0 and user_id not in (".$OJ_RANK_HIDDEN.") and result=4 group by user_id,nick order by ac desc limit 10");