题目列表下面端
This commit is contained in:
@@ -18,17 +18,17 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if (isset($_SESSION[$OJ_NAME . '_' . 'administrator'])): ?>
|
||||
<?php if (isset($_SESSION[$OJ_NAME . '_' . 'administrator'])): ?>
|
||||
<form action="" method="get">
|
||||
<div class="ui search" style="width: 120px; height: 28px; margin-top: -5.3px; ">
|
||||
<div class="ui icon input" style="width: 100%; ">
|
||||
<input class="prompt" style="width: 100%; " type="text" placeholder="用户ID" name="query_user_id" value="<?php if (isset($_GET['query_user_id']))
|
||||
<input class="prompt" style="width: 100%; " type="text" placeholder="用户ID" name="query_user_id" value="<?php if (isset($_GET['query_user_id']))
|
||||
echo htmlentities($_GET['query_user_id'], ENT_QUOTES, 'UTF-8') ?>">
|
||||
<i class="search icon"></i>
|
||||
</div>
|
||||
<div class="results" style="width: 100%; "></div>
|
||||
</div>
|
||||
<div class="results" style="width: 100%; "></div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
@@ -199,33 +199,32 @@
|
||||
</table><br>
|
||||
<?php if (!isset($_GET['list'])) { ?>
|
||||
<div style="margin-bottom: 30px; ">
|
||||
|
||||
<?php
|
||||
if (!isset($page))
|
||||
$page = 1;
|
||||
$page = intval($page);
|
||||
$section = 8;
|
||||
$start = $page > $section ? $page - $section : 1;
|
||||
$end = $page + $section > $view_total_page ? $view_total_page : $page + $section;
|
||||
?>
|
||||
<div style="text-align: center; ">
|
||||
<div class="ui pagination menu" style="box-shadow: none; ">
|
||||
<a class="<?php if ($page == 1)
|
||||
echo "disabled "; ?>icon item" href="<?php if ($page <> 1)
|
||||
echo "problemset.php?page=" . ($page - 1) . htmlentities($postfix, ENT_QUOTES, 'UTF-8'); ?>"
|
||||
id="page_prev">
|
||||
<i class="left chevron icon"></i>
|
||||
echo get_href(1, $postfix, $query_user_id); ?>" id="page_first">
|
||||
<i class="angle double left icon"></i>
|
||||
</a>
|
||||
<a class="<?php if ($page == 1)
|
||||
echo "disabled "; ?>icon item" href="<?php if ($page <> 1)
|
||||
echo get_href($page - 1, $postfix, $query_user_id); ?>" id="page_prev">
|
||||
<i class="angle left icon"></i>
|
||||
</a>
|
||||
<?php
|
||||
for ($i = $start; $i <= $end; $i++) {
|
||||
echo "<a class=\"" . ($page == $i ? "active " : "") . "item\" href=\"problemset.php?page=" . $i . htmlentities($postfix, ENT_QUOTES, 'UTF-8') . "\">" . $i . "</a>";
|
||||
echo "<a class=\"" . ($page == $i ? "active " : "") . "item\" href=\"" . get_href($i, $postfix, $query_user_id) . "\">" . $i . "</a>";
|
||||
}
|
||||
?>
|
||||
<a class="<?php if ($page == $view_total_page)
|
||||
echo "disabled "; ?> icon item" href="<?php if ($page <> $view_total_page)
|
||||
echo "problemset.php?page=" . ($page + 1) . htmlentities($postfix, ENT_QUOTES, 'UTF-8'); ?>"
|
||||
id="page_next">
|
||||
<i class="right chevron icon"></i>
|
||||
echo get_href($page + 1, $postfix, $query_user_id); ?>" id="page_next">
|
||||
<i class="angle right icon"></i>
|
||||
</a>
|
||||
<a class="<?php if ($page == $view_total_page)
|
||||
echo "disabled "; ?> icon item" href="<?php if ($page <> $view_total_page)
|
||||
echo get_href($view_total_page, $postfix, $query_user_id); ?>" id="page_last">
|
||||
<i class="angle double right icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user