diff --git a/trunk/web/ranklist.php b/trunk/web/ranklist.php index e70ed952e46..e67c07bf081 100644 --- a/trunk/web/ranklist.php +++ b/trunk/web/ranklist.php @@ -62,7 +62,7 @@ if ($rank < 0) $rank = 0; - $sql = "SELECT `user_id`,`nick`,`solved`,`submit`,group_name FROM `users` $where ORDER BY `solved` DESC,submit,reg_time LIMIT " . strval ( $rank ) . ",$page_size"; + $sql = "SELECT `user_id`,`nick`,`solved`,`submit`,group_name,starred FROM `users` $where ORDER BY `solved` DESC,submit,reg_time LIMIT " . strval ( $rank ) . ",$page_size"; if($scope){ $s=""; @@ -83,7 +83,7 @@ $last_id=mysql_query_cache("select solution_id from solution where in_date$last_id")[0][0]; - $sql="SELECT users.`user_id`,`nick`,s.`solved`,t.`submit`,group_name FROM `users` + $sql="SELECT users.`user_id`,`nick`,s.`solved`,t.`submit`,group_name,starred FROM `users` inner join (select count(distinct (problem_id)) solved ,user_id from solution where solution_id>$last_id and user_id not in (".$OJ_RANK_HIDDEN.") and problem_id>0 and result=4 @@ -119,8 +119,9 @@ $rank ++; $view_rank[$i][0]= $rank; - $view_rank[$i][1]= "
" . $row['user_id'] . ""."
"; - $view_rank[$i][2]= "
" . htmlentities ( $row['nick'] ,ENT_QUOTES,"UTF-8") ."
"; + $view_rank[$i][1]= "" . $row['user_id'] . ""; + if(isset($row['starred']) && $row['starred'] >0 ) $view_rank[$i][1]="⭐".$view_rank[$i][1]."⭐"; //github starred rewarding + $view_rank[$i][2]= "
" . htmlentities ( $row['nick'] ,ENT_QUOTES,"UTF-8") ."
"; $view_rank[$i][3]= "
" . htmlentities ( $row['group_name'] ,ENT_QUOTES,"UTF-8") ."
"; $view_rank[$i][4]= "
" . $row['solved'].""."
"; $view_rank[$i][5]= "
" . $row['submit'] . ""."
";