From a760d4eca8e35637b0a2fbc5fffdbe85a6371b65 Mon Sep 17 00:00:00 2001 From: daizeyao Date: Wed, 30 Oct 2024 15:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E6=9F=A5=E7=9C=8B=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/OJ/student_daily_detail.php | 11 +++---- web/OJ/template/hznu/student_daily_detail.php | 29 +++++++++++-------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/web/OJ/student_daily_detail.php b/web/OJ/student_daily_detail.php index a90b543a..50129624 100644 --- a/web/OJ/student_daily_detail.php +++ b/web/OJ/student_daily_detail.php @@ -38,11 +38,12 @@ $filter_sql = ""; -$order_by = "submit, reg_time"; +$order_by = "user_id, reg_time"; if (isset($_GET['order_by'])) { $first_order_by = $_GET['order_by']; - if ($order_by == 'user_id') $order_by = $first_order_by . ", strength DESC, " . $order_by; - else $order_by = $first_order_by." DESC , " . $order_by; + if ($first_order_by !== 'user_id') { + $order_by = $first_order_by . " DESC , " . $order_by; + } } $page_size = 100; @@ -168,7 +169,7 @@ function getColor($value) $view_rank[$i][1] = "
" . $row['user_id'] . "" . "
"; $view_rank[$i][2] = "
" . htmlentities($row['real_name']) . "
"; $view_rank[$i][3] = "
" . $row['solved'] . "" . "
"; - $view_rank[$i][4] = "
"; + $view_rank[$i][4] = "
"; $previous_month = null; foreach ($filtered_data as $record) { @@ -176,7 +177,7 @@ function getColor($value) if ($i == 0) { $current_month = date('Y-m', strtotime($record[0])); if ($current_month !== $previous_month) { - $view_rank[$i][4] .= "$current_month"; + $view_rank[$i][4] .= "$current_month"; $previous_month = $current_month; } } diff --git a/web/OJ/template/hznu/student_daily_detail.php b/web/OJ/template/hznu/student_daily_detail.php index 4a692f81..018ccd09 100644 --- a/web/OJ/template/hznu/student_daily_detail.php +++ b/web/OJ/template/hznu/student_daily_detail.php @@ -2,13 +2,17 @@ - +
-
+
-
-
+
- +
-
+
- +
-
+
@@ -42,10 +47,10 @@ - + - - + + @@ -54,7 +59,7 @@ foreach ($view_rank as $row) { echo ""; foreach ($row as $table_cell) { - echo ""; }
RankRank UserNameSolvedNameSolved Daily
"; + echo ""; echo $table_cell; echo "