S2OJ/web/app/controllers/ranklist.php
Baoshuo 79d4c3832c
All checks were successful
continuous-integration/drone/push Build is passing
refactor: ranklist with bs5
2022-09-24 11:55:34 +08:00

28 lines
672 B
PHP

<?php
if (!Auth::check()) {
become403Page(UOJLocale::get('need login'));
}
if (!isNormalUser($myUser)) {
become403Page();
}
if (isset($_GET['type']) && $_GET['type'] == 'accepted') {
$config = array('page_len' => 100, 'by_accepted' => true);
$title = UOJLocale::get('top solver');
} else {
become404Page();
}
if (!isset($_COOKIE['bootstrap4'])) {
$REQUIRE_LIB['bootstrap5'] = '';
$config['div_classes'] = array('card', 'mb-3');
$config['table_classes'] = array('table', 'uoj-table', 'mb-0', 'text-center');
}
?>
<?php echoUOJPageHeader($title) ?>
<h1 class="h2"><?= $title ?></h1>
<?php echoRanklist($config) ?>
<?php echoUOJPageFooter() ?>