diff --git a/web/app/controllers/problem_set.php b/web/app/controllers/problem_set.php index 8ea93c3..8cb5854 100644 --- a/web/app/controllers/problem_set.php +++ b/web/app/controllers/problem_set.php @@ -11,9 +11,7 @@ become403Page(); } - if (!isset($_COOKIE['bootstrap4'])) { - $REQUIRE_LIB['bootstrap5'] = ''; - } + $REQUIRE_LIB['bootstrap5'] = ''; if (isSuperUser($myUser) || isProblemManager($myUser) || isProblemUploader($myUser)) { $new_problem_form = new UOJForm('new_problem'); @@ -44,16 +42,9 @@ echo ''; } echo '#', $problem['id'], ''; - if (isset($REQUIRE_LIB['bootstrap5'])) { - echo ''; - } else { - echo ''; - } - echo '', $problem['title'], ''; + + echo ''; + echo '', $problem['title'], ''; if ($problem['uploader'] == $myUser['username']) { echo ' ', UOJLocale::get('problems::my problem') ,' '; @@ -65,27 +56,18 @@ if (isset($_COOKIE['show_tags_mode'])) { foreach (queryProblemTags($problem['id']) as $tag) { - if (isset($REQUIRE_LIB['bootstrap5'])) { - echo ' '; - echo ''; - } else { - echo ' '; - echo ''; - } + echo ' '; + echo ''; echo HTML::escape($tag), ''; echo ' '; } } echo ''; if (isset($_COOKIE['show_submit_mode'])) { - $a_class = ''; - if (isset($REQUIRE_LIB['bootstrap5'])) { - $a_class .= ' text-decoration-none '; - } $perc = $problem['submit_num'] > 0 ? round(100 * $problem['ac_num'] / $problem['submit_num']) : 0; echo <<×{$problem['ac_num']} - ×{$problem['submit_num']} + ×{$problem['ac_num']} + ×{$problem['submit_num']}
{$perc}%
@@ -134,9 +116,9 @@ EOD; $header .= 'ID'; $header .= ''.UOJLocale::get('problems::problem').''; if (isset($_COOKIE['show_submit_mode'])) { - $header .= ''.UOJLocale::get('problems::ac').''; - $header .= ''.UOJLocale::get('problems::submit').''; - $header .= ''.UOJLocale::get('problems::ac ratio').''; + $header .= ''.UOJLocale::get('problems::ac').''; + $header .= ''.UOJLocale::get('problems::submit').''; + $header .= ''.UOJLocale::get('problems::ac ratio').''; } if (isset($_COOKIE['show_difficulty'])) { $header .= ''.UOJLocale::get('problems::difficulty').''; @@ -162,130 +144,75 @@ EOD; $pag_config['tail'] = "order by id asc"; $pag = new Paginator($pag_config); - $div_classes = isset($REQUIRE_LIB['bootstrap5']) - ? array('card', 'my-3', 'table-responsive') - : array('table-responsive'); - $table_classes = isset($REQUIRE_LIB['bootstrap5']) - ? array('table', 'uoj-table', 'mb-0') - : array('table', 'table-bordered', 'table-hover', 'table-striped'); + $div_classes = ['card', 'my-3', 'table-responsive']; + $table_classes = ['table', 'uoj-table', 'mb-0']; ?> -
+ +
+ +
- +

-
- printHTML(); ?> -
- -
- - - -
- +
-
+
-
- +
- -
- - - -
- -
+ +
+ /> - - + +
- -
- -
-
- -
- pagination(); ?> -
-
-
- pagination(); ?> + pagination() ?>
- - + +
-