zhblue / hustoj

Popular Open Source Online Judge based on PHP/C++/MySQL/Linux for ACM/ICPC and NOIP training, with easy installation. 开源OJ系统
http://www.hustoj.com/?cat=2
GNU General Public License v2.0
3.18k stars 759 forks source link

本月之星排行中去除管理员的一种方案 #999

Open duo-liang opened 3 months ago

duo-liang commented 3 months ago

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");