S2OJ/web/app/controllers/ranklist.php

40 lines
807 B
PHP
Raw Permalink Normal View History

2016-07-18 16:39:37 +00:00
<?php
2022-11-06 02:26:21 +00:00
Auth::check() || redirectToLogin();
2022-11-11 23:10:34 +00:00
UOJUser::checkPermission(Auth::user(), 'users.view') || UOJResponse::page403();
2022-11-06 02:26:21 +00:00
$config = [
'page_len' => 50,
'div_classes' => ['card', 'mb-3'],
'table_classes' => ['table', 'uoj-table', 'mb-0', 'text-center'],
'card' => true
];
2022-11-06 02:26:21 +00:00
if (isset($_GET['type']) && $_GET['type'] == 'accepted') {
$config['by_accepted'] = true;
$title = UOJLocale::get('top solver');
} else {
become404Page();
}
?>
2022-11-06 02:26:21 +00:00
<?php echoUOJPageHeader($title) ?>
<div class="row">
<!-- left col -->
<div class="col-lg-9">
<h1><?= $title ?></h1>
<?php UOJRanklist::printHTML($config) ?>
</div>
<!-- end left col -->
<!-- right col -->
<aside class="col-lg-3 mt-3 mt-lg-0">
<?php uojIncludeView('sidebar') ?>
</aside>
<!-- end right col -->
</div>
2016-07-18 16:39:37 +00:00
<?php echoUOJPageFooter() ?>