fix: style

This commit is contained in:
Baoshuo Ren 2022-09-18 12:58:35 +08:00
parent df203c3375
commit 410631075e
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
58 changed files with 293 additions and 294 deletions

View File

@ -52,12 +52,12 @@
}; };
$time_form->succ_href="/contests"; $time_form->succ_href="/contests";
$time_form->runAtServer(); $time_form->runAtServer();
?> ?>
<?php echoUOJPageHeader('添加比赛') ?> <?php echoUOJPageHeader('添加比赛') ?>
<h1 class="page-header">添加比赛</h1> <h1 class="page-header">添加比赛</h1>
<div class="tab-pane active" id="tab-time"> <div class="tab-pane active" id="tab-time">
<?php <?php
$time_form->printHTML(); $time_form->printHTML();
?> ?>
</div> </div>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -44,7 +44,7 @@ EOD;
'table_classes' => ['table', 'table-hover'], 'table_classes' => ['table', 'table-hover'],
'page_len' => 100 'page_len' => 100
]; ];
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('announcements')) ?> <?php echoUOJPageHeader(UOJLocale::get('announcements')) ?>
<h3>公告</h3> <h3>公告</h3>
<?php echoLongTable(array('blogs.id', 'poster', 'title', 'post_time', 'zan', 'level'), 'important_blogs, blogs', 'is_hidden = 0 and important_blogs.blog_id = blogs.id', 'order by level desc, important_blogs.blog_id desc', $header, 'echoBlogCell', $config); ?> <?php echoLongTable(array('blogs.id', 'poster', 'title', 'post_time', 'zan', 'level'), 'important_blogs, blogs', 'is_hidden = 0 and important_blogs.blog_id = blogs.id', 'order by level desc, important_blogs.blog_id desc', $header, 'echoBlogCell', $config); ?>

View File

@ -12,4 +12,4 @@
} }
redirectTo(HTML::blog_url($blog['poster'], '/post/'.$_GET['id'])); redirectTo(HTML::blog_url($blog['poster'], '/post/'.$_GET['id']));
?> ?>

View File

@ -29,7 +29,7 @@
EOD; EOD;
$config = array(); $config = array();
$config['table_classes'] = array('table', 'table-hover'); $config['table_classes'] = array('table', 'table-hover');
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('blogs')) ?> <?php echoUOJPageHeader(UOJLocale::get('blogs')) ?>
<?php if (Auth::check()): ?> <?php if (Auth::check()): ?>
<div class="float-right"> <div class="float-right">

View File

@ -58,11 +58,11 @@
if (isset($_POST['change'])) { if (isset($_POST['change'])) {
die(handlePost()); die(handlePost());
} }
?> ?>
<?php <?php
$REQUIRE_LIB['dialog'] = ''; $REQUIRE_LIB['dialog'] = '';
$REQUIRE_LIB['md5'] = ''; $REQUIRE_LIB['md5'] = '';
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('modify my profile')) ?> <?php echoUOJPageHeader(UOJLocale::get('modify my profile')) ?>
<h2 class="page-header"><?= UOJLocale::get('modify my profile') ?></h2> <h2 class="page-header"><?= UOJLocale::get('modify my profile') ?></h2>
<form id="form-update" class="form-horizontal"> <form id="form-update" class="form-horizontal">

View File

@ -64,5 +64,5 @@
} }
$cnt = $row['zan']; $cnt = $row['zan'];
} }
?> ?>
<?= getClickZanBlock($type, $id, $cnt, $cur) ?> <?= getClickZanBlock($type, $id, $cnt, $cur) ?>

View File

@ -447,7 +447,7 @@ EOD;
} }
$page_header = HTML::stripTags($contest['name']) . ' - '; $page_header = HTML::stripTags($contest['name']) . ' - ';
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . $tabs_info[$cur_tab]['name'] . ' - ' . UOJLocale::get('contests::contest')) ?> <?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . $tabs_info[$cur_tab]['name'] . ' - ' . UOJLocale::get('contests::contest')) ?>
<div class="text-center"> <div class="text-center">
<h1><?= $contest['name'] ?></h1> <h1><?= $contest['name'] ?></h1>

View File

@ -166,7 +166,7 @@
$time_form->runAtServer(); $time_form->runAtServer();
$managers_form->runAtServer(); $managers_form->runAtServer();
$problems_form->runAtServer(); $problems_form->runAtServer();
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - 比赛管理') ?> <?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - 比赛管理') ?>
<h1 class="page-header" align="center"><?=$contest['name']?> 管理</h1> <h1 class="page-header" align="center"><?=$contest['name']?> 管理</h1>
<ul class="nav nav-tabs mb-3" role="tablist"> <ul class="nav nav-tabs mb-3" role="tablist">
@ -199,7 +199,7 @@
$row_id++; $row_id++;
echo '<tr>', '<td>', $row_id, '</td>', '<td>', getUserLink($row['username']), '</td>', '</tr>'; echo '<tr>', '<td>', $row_id, '</td>', '<td>', getUserLink($row['username']), '</td>', '</tr>';
} }
?> ?>
</tbody> </tbody>
</table> </table>
<p class="text-center">命令格式:命令一行一个,+mike表示把mike加入管理者-mike表示把mike从管理者中移除</p> <p class="text-center">命令格式:命令一行一个,+mike表示把mike加入管理者-mike表示把mike从管理者中移除</p>
@ -222,7 +222,7 @@
$problem_config_str = isset($contest['extra_config']["problem_{$problem['id']}"]) ? $contest['extra_config']["problem_{$problem['id']}"] : 'sample'; $problem_config_str = isset($contest['extra_config']["problem_{$problem['id']}"]) ? $contest['extra_config']["problem_{$problem['id']}"] : 'sample';
echo '<tr>', '<td>', $problem['id'], '</td>', '<td>', getProblemLink($problem), ' ', "[$problem_config_str]", '</td>', '</tr>'; echo '<tr>', '<td>', $problem['id'], '</td>', '<td>', getProblemLink($problem), ' ', "[$problem_config_str]", '</td>', '</tr>';
} }
?> ?>
</tbody> </tbody>
</table> </table>
<p class="text-center">命令格式:命令一行一个,+233表示把题号为233的试题加入比赛-233表示把题号为233的试题从比赛中移除</p> <p class="text-center">命令格式:命令一行一个,+233表示把题号为233的试题加入比赛-233表示把题号为233的试题从比赛中移除</p>

View File

@ -106,7 +106,7 @@
$unregister_form->runAtServer(); $unregister_form->runAtServer();
} }
} }
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . UOJLocale::get('contests::contest registrants')) ?> <?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . UOJLocale::get('contests::contest registrants')) ?>
<h1 class="text-center"><?= $contest['name'] ?></h1> <h1 class="text-center"><?= $contest['name'] ?></h1>
@ -173,5 +173,5 @@
} }
) )
); );
?> ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -28,7 +28,7 @@
$register_form->succ_href = "/contests"; $register_form->succ_href = "/contests";
$register_form->runAtServer(); $register_form->runAtServer();
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - 报名') ?> <?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - 报名') ?>
<h1 class="page-header">比赛规则</h1> <h1 class="page-header">比赛规则</h1>
<ul> <ul>

View File

@ -48,7 +48,7 @@ EOD;
echo '<td>', '<div class="text-left">'.$click_zan_block.'</div>', '</td>'; echo '<td>', '<div class="text-left">'.$click_zan_block.'</div>', '</td>';
echo '</tr>'; echo '</tr>';
} }
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('contests')) ?> <?php echoUOJPageHeader(UOJLocale::get('contests')) ?>
<h4><?= UOJLocale::get('contests::current or upcoming contests') ?></h4> <h4><?= UOJLocale::get('contests::current or upcoming contests') ?></h4>
<?php <?php
@ -81,7 +81,7 @@ $('#contest-countdown').countdown($rest_second, function() {
</div> </div>
EOD; EOD;
} }
?> ?>
<h4><?= UOJLocale::get('contests::ended contests') ?></h4> <h4><?= UOJLocale::get('contests::ended contests') ?></h4>
<?php <?php
@ -98,5 +98,5 @@ EOD;
} }
) )
); );
?> ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -53,4 +53,4 @@
header("X-Sendfile: $file_name"); header("X-Sendfile: $file_name");
header("Content-type: $mimetype"); header("Content-type: $mimetype");
header("Content-Disposition: attachment; filename=$download_name"); header("Content-Disposition: attachment; filename=$download_name");
?> ?>

View File

@ -7,7 +7,7 @@
} }
echoUOJPageHeader(UOJLocale::get('help')); echoUOJPageHeader(UOJLocale::get('help'));
?> ?>
<article> <article>
<header> <header>
<h2 class="page-header">常见问题及其解答(FAQ)</h2> <h2 class="page-header">常见问题及其解答(FAQ)</h2>

View File

@ -51,7 +51,7 @@ EOD;
$forgot_form->submit_button_config['align'] = 'offset'; $forgot_form->submit_button_config['align'] = 'offset';
$forgot_form->runAtServer(); $forgot_form->runAtServer();
?> ?>
<?php echoUOJPageHeader('找回密码') ?> <?php echoUOJPageHeader('找回密码') ?>
<h2 class="page-header">找回密码</h2> <h2 class="page-header">找回密码</h2>
<h4>请输入需要找回密码的用户名:</h4> <h4>请输入需要找回密码的用户名:</h4>

View File

@ -97,7 +97,7 @@
}; };
$delete_user_form->runAtServer(); $delete_user_form->runAtServer();
} }
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('groups')) ?> <?php echoUOJPageHeader(UOJLocale::get('groups')) ?>

View File

@ -41,7 +41,7 @@
echo '</tr>'; echo '</tr>';
} }
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('groups')) ?> <?php echoUOJPageHeader(UOJLocale::get('groups')) ?>
@ -81,6 +81,6 @@ EOD;
'head_pagination' => true 'head_pagination' => true
) )
); );
?> ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -60,10 +60,10 @@
$styler->show_small_tip = false; $styler->show_small_tip = false;
} }
} }
?> ?>
<?php <?php
$REQUIRE_LIB['shjs'] = ""; $REQUIRE_LIB['shjs'] = "";
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('problems::hack').' #'.$hack['id']) ?> <?php echoUOJPageHeader(UOJLocale::get('problems::hack').' #'.$hack['id']) ?>
<?php echoHackListOnlyOne($hack, array(), $myUser) ?> <?php echoHackListOnlyOne($hack, array(), $myUser) ?>

View File

@ -48,7 +48,7 @@
$cond = '1'; $cond = '1';
} }
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('hacks')) ?> <?php echoUOJPageHeader(UOJLocale::get('hacks')) ?>
<div class="d-none d-sm-block"> <div class="d-none d-sm-block">
<?php if ($myUser != null): ?> <?php if ($myUser != null): ?>
@ -105,5 +105,5 @@
</div> </div>
<?php <?php
echoHacksList($cond, 'order by id desc', array('judge_time_hidden' => ''), $myUser); echoHacksList($cond, 'order by id desc', array('judge_time_hidden' => ''), $myUser);
?> ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -1,7 +1,7 @@
<?php <?php
$blogs = DB::selectAll("select blogs.id, title, poster, post_time from important_blogs, blogs where is_hidden = 0 and important_blogs.blog_id = blogs.id order by level desc, important_blogs.blog_id desc limit 5"); $blogs = DB::selectAll("select blogs.id, title, poster, post_time from important_blogs, blogs where is_hidden = 0 and important_blogs.blog_id = blogs.id order by level desc, important_blogs.blog_id desc limit 5");
$countdowns = DB::selectAll("select * from countdowns order by endtime asc limit 5") $countdowns = DB::selectAll("select * from countdowns order by endtime asc limit 5")
?> ?>
<?php echoUOJPageHeader(UOJConfig::$data['profile']['oj-name-short']) ?> <?php echoUOJPageHeader(UOJConfig::$data['profile']['oj-name-short']) ?>
<div class="row"> <div class="row">
<div class="col-sm-12 col-md-9"> <div class="col-sm-12 col-md-9">

View File

@ -40,4 +40,4 @@
header("X-Sendfile: $file_name"); header("X-Sendfile: $file_name");
header("Content-type: $mimetype"); header("Content-type: $mimetype");
header("Content-Disposition: attachment; filename=$download_name"); header("Content-Disposition: attachment; filename=$download_name");
?> ?>

View File

@ -209,4 +209,4 @@
} }
echo json_encode($submission); echo json_encode($submission);
?> ?>

View File

@ -18,4 +18,4 @@
} }
die("ok"); die("ok");
?> ?>

View File

@ -49,10 +49,10 @@
unset($_SESSION['phrase']); unset($_SESSION['phrase']);
die(); die();
} }
?> ?>
<?php <?php
$REQUIRE_LIB['md5'] = ''; $REQUIRE_LIB['md5'] = '';
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('login')) ?> <?php echoUOJPageHeader(UOJLocale::get('login')) ?>
<h2 class="page-header"><?= UOJLocale::get('login') ?></h2> <h2 class="page-header"><?= UOJLocale::get('login') ?></h2>
<form id="form-login" class="form-horizontal" method="post"> <form id="form-login" class="form-horizontal" method="post">

View File

@ -1,7 +1,7 @@
<?php <?php
crsf_defend(); crsf_defend();
Auth::logout(); Auth::logout();
?> ?>
<script type="text/javascript"> <script type="text/javascript">
var prevUrl = document.referrer; var prevUrl = document.referrer;

View File

@ -214,11 +214,11 @@ EOD
$custom_test_form->submit_button_config['text'] = UOJLocale::get('problems::run'); $custom_test_form->submit_button_config['text'] = UOJLocale::get('problems::run');
$custom_test_form->runAtServer(); $custom_test_form->runAtServer();
} }
?> ?>
<?php <?php
$REQUIRE_LIB['mathjax'] = ''; $REQUIRE_LIB['mathjax'] = '';
$REQUIRE_LIB['shjs'] = ''; $REQUIRE_LIB['shjs'] = '';
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::problem')) ?> <?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::problem')) ?>
<?php <?php
$limit = getUOJConf("/var/uoj_data/{$problem['id']}/problem.conf"); $limit = getUOJConf("/var/uoj_data/{$problem['id']}/problem.conf");
@ -226,7 +226,7 @@ EOD
$memory_limit = $limit['memory_limit']; $memory_limit = $limit['memory_limit'];
$problem_uploader = $limit['poster'] ?: $problem['uploader']; $problem_uploader = $limit['poster'] ?: $problem['uploader'];
?> ?>
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
<span class="badge badge-secondary mr-1">时间限制:<?=$time_limit!=null?"$time_limit s":"N/A"?></span> <span class="badge badge-secondary mr-1">时间限制:<?=$time_limit!=null?"$time_limit s":"N/A"?></span>
<span class="badge badge-secondary mr-1">空间限制:<?=$memory_limit!=null?"$memory_limit MB":"N/A"?></span> <span class="badge badge-secondary mr-1">空间限制:<?=$memory_limit!=null?"$memory_limit MB":"N/A"?></span>

View File

@ -615,10 +615,10 @@ EOD
$rejudge_form->runAtServer(); $rejudge_form->runAtServer();
$rejudgege97_form->runAtServer(); $rejudgege97_form->runAtServer();
$info_form->runAtServer(); $info_form->runAtServer();
?> ?>
<?php <?php
$REQUIRE_LIB['dialog'] = ''; $REQUIRE_LIB['dialog'] = '';
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 数据 - 题目管理') ?> <?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 数据 - 题目管理') ?>
<h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1> <h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">

View File

@ -34,7 +34,7 @@
); );
$managers_form->runAtServer(); $managers_form->runAtServer();
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 管理者 - 题目管理') ?> <?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 管理者 - 题目管理') ?>
<h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1> <h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
@ -59,7 +59,7 @@
$row_id++; $row_id++;
echo '<tr>', '<td>', $row_id, '</td>', '<td>', getUserLink($row['username']), '</td>', '</tr>'; echo '<tr>', '<td>', $row_id, '</td>', '<td>', getUserLink($row['username']), '</td>', '</tr>';
} }
?> ?>
</tbody> </tbody>
</table> </table>
<p class="text-center">命令格式:命令一行一个,+mike表示把mike加入管理者-mike表示把mike从管理者中移除</p> <p class="text-center">命令格式:命令一行一个,+mike表示把mike加入管理者-mike表示把mike从管理者中移除</p>

View File

@ -143,7 +143,7 @@ EOD;
$div_classes = array('table-responsive'); $div_classes = array('table-responsive');
$table_classes = array('table', 'table-bordered', 'table-hover', 'table-striped'); $table_classes = array('table', 'table-bordered', 'table-hover', 'table-striped');
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('problems')) ?> <?php echoUOJPageHeader(UOJLocale::get('problems')) ?>
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
@ -201,5 +201,5 @@ $('#input-show_submit_mode').click(function() {
} }
echo $pag->pagination(); echo $pag->pagination();
?> ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -53,7 +53,7 @@
}; };
$problem_editor->runAtServer(); $problem_editor->runAtServer();
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 编辑 - 题目管理') ?> <?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 编辑 - 题目管理') ?>
<h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1> <h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">

View File

@ -61,10 +61,10 @@
} }
$submissions_sort_by_choice = !isset($_COOKIE['submissions-sort-by-code-length']) ? 'time' : 'tot_size'; $submissions_sort_by_choice = !isset($_COOKIE['submissions-sort-by-code-length']) ? 'time' : 'tot_size';
?> ?>
<?php <?php
$REQUIRE_LIB['morris'] = ""; $REQUIRE_LIB['morris'] = "";
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::statistics')) ?> <?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::statistics')) ?>
<h1 class="page-header text-center"><?= $problem['title'] ?> <?= UOJLocale::get('problems::statistics') ?></h1> <h1 class="page-header text-center"><?= $problem['title'] ?> <?= UOJLocale::get('problems::statistics') ?></h1>

View File

@ -13,7 +13,7 @@
} else { } else {
become404Page(); become404Page();
} }
?> ?>
<?php echoUOJPageHeader($title) ?> <?php echoUOJPageHeader($title) ?>
<?php echoRanklist($config) ?> <?php echoRanklist($config) ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -59,11 +59,11 @@
} }
die(); die();
} }
?> ?>
<?php <?php
$REQUIRE_LIB['md5'] = ''; $REQUIRE_LIB['md5'] = '';
$REQUIRE_LIB['dialog'] = ''; $REQUIRE_LIB['dialog'] = '';
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('register')) ?> <?php echoUOJPageHeader(UOJLocale::get('register')) ?>
<h2 class="page-header"><?= UOJLocale::get('register') ?></h2> <h2 class="page-header"><?= UOJLocale::get('register') ?></h2>
<form id="form-register" class="form-horizontal"> <form id="form-register" class="form-horizontal">

View File

@ -29,11 +29,11 @@
if (isset($_POST['reset'])) { if (isset($_POST['reset'])) {
die(resetPassword()); die(resetPassword());
} }
?> ?>
<?php <?php
$REQUIRE_LIB['dialog'] = ''; $REQUIRE_LIB['dialog'] = '';
$REQUIRE_LIB['md5'] = ''; $REQUIRE_LIB['md5'] = '';
?> ?>
<?php echoUOJPageHeader('更改密码') ?> <?php echoUOJPageHeader('更改密码') ?>
<h2 class="page-header">更改密码</h2> <h2 class="page-header">更改密码</h2>
<form id="form-reset" class="form-horizontal"> <form id="form-reset" class="form-horizontal">

View File

@ -4,7 +4,7 @@
if (!Auth::check()) { if (!Auth::check()) {
become403Page(UOJLocale::get('need login')); become403Page(UOJLocale::get('need login'));
} }
?> ?>
<?php echoUOJPageHeader('关于我') ?> <?php echoUOJPageHeader('关于我') ?>
<?php if (UOJContext::user()['username'] != 'vfleaking'): ?> <?php if (UOJContext::user()['username'] != 'vfleaking'): ?>

View File

@ -31,7 +31,7 @@
requireLib('mathjax'); requireLib('mathjax');
requireLib('shjs'); requireLib('shjs');
?> ?>
<?php echoUOJPageHeader('日志') ?> <?php echoUOJPageHeader('日志') ?>
<div class="row"> <div class="row">

View File

@ -140,11 +140,11 @@
'tail' => 'order by id asc', 'tail' => 'order by id asc',
'page_len' => 20 'page_len' => 20
)); ));
?> ?>
<?php <?php
$REQUIRE_LIB['mathjax'] = ''; $REQUIRE_LIB['mathjax'] = '';
$REQUIRE_LIB['shjs'] = ''; $REQUIRE_LIB['shjs'] = '';
?> ?>
<?php echoUOJPageHeader(HTML::stripTags($blog['title']) . ' - 博客') ?> <?php echoUOJPageHeader(HTML::stripTags($blog['title']) . ' - 博客') ?>
<?php echoBlog($blog, array('show_title_only' => isset($_GET['page']) && $_GET['page'] != 1)) ?> <?php echoBlog($blog, array('show_title_only' => isset($_GET['page']) && $_GET['page'] != 1)) ?>
<h2>评论 <span class="glyphicon glyphicon-comment"></span></h2> <h2>评论 <span class="glyphicon glyphicon-comment"></span></h2>

View File

@ -22,7 +22,7 @@
$delete_form->succ_href = "/archive"; $delete_form->succ_href = "/archive";
$delete_form->runAtServer(); $delete_form->runAtServer();
?> ?>
<?php echoUOJPageHeader('删除博客 - ' . HTML::stripTags($blog['title'])) ?> <?php echoUOJPageHeader('删除博客 - ' . HTML::stripTags($blog['title'])) ?>
<h3>您真的要删除博客 <?= $blog['title'] ?> 吗?该操作不可逆!</h3> <h3>您真的要删除博客 <?= $blog['title'] ?> 吗?该操作不可逆!</h3>
<?php $delete_form->printHTML(); ?> <?php $delete_form->printHTML(); ?>

View File

@ -67,7 +67,7 @@
}; };
$blog_editor->runAtServer(); $blog_editor->runAtServer();
?> ?>
<?php echoUOJPageHeader('写博客') ?> <?php echoUOJPageHeader('写博客') ?>
<div class="text-right"> <div class="text-right">
<a href="http://uoj.ac/blog/7">这玩意儿怎么用?</a> <a href="http://uoj.ac/blog/7">这玩意儿怎么用?</a>

View File

@ -10,11 +10,11 @@
'tail' => 'order by post_time desc limit 5', 'tail' => 'order by post_time desc limit 5',
'echo_full' => true 'echo_full' => true
)); ));
?> ?>
<?php <?php
$REQUIRE_LIB['mathjax'] = ''; $REQUIRE_LIB['mathjax'] = '';
$REQUIRE_LIB['shjs'] = ''; $REQUIRE_LIB['shjs'] = '';
?> ?>
<?php echoUOJPageHeader(UOJContext::user()['username'] . '的博客') ?> <?php echoUOJPageHeader(UOJContext::user()['username'] . '的博客') ?>
<div class="row"> <div class="row">

View File

@ -1,7 +1,6 @@
<?php <?php
call_user_func(function() { // to prevent variable scope leak call_user_func(function() { // to prevent variable scope leak
Route::pattern('id', '[1-9][0-9]{0,9}'); Route::pattern('id', '[1-9][0-9]{0,9}');
Route::pattern('blog_username', '[a-zA-Z0-9_\-]{1,20}'); Route::pattern('blog_username', '[a-zA-Z0-9_\-]{1,20}');

View File

@ -16,4 +16,4 @@
$page_config['PageTitle'] = HTML::stripTags($blog['title']) . ' - 幻灯片'; $page_config['PageTitle'] = HTML::stripTags($blog['title']) . ' - 幻灯片';
$page_config['content'] = $blog['content']; $page_config['content'] = $blog['content'];
uojIncludeView('slide', $page_config); uojIncludeView('slide', $page_config);
?> ?>

View File

@ -66,7 +66,7 @@
}; };
$blog_editor->runAtServer(); $blog_editor->runAtServer();
?> ?>
<?php echoUOJPageHeader('写幻灯片') ?> <?php echoUOJPageHeader('写幻灯片') ?>
<div class="text-right"> <div class="text-right">
<a href="http://uoj.ac/blog/75">这玩意儿怎么用?</a> <a href="http://uoj.ac/blog/75">这玩意儿怎么用?</a>

View File

@ -132,10 +132,10 @@
} }
} }
} }
?> ?>
<?php <?php
$REQUIRE_LIB['shjs'] = ""; $REQUIRE_LIB['shjs'] = "";
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('problems::submission').' #'.$submission['id']) ?> <?php echoUOJPageHeader(UOJLocale::get('problems::submission').' #'.$submission['id']) ?>
<?php echoSubmissionsListOnlyOne($submission, array(), $myUser) ?> <?php echoSubmissionsListOnlyOne($submission, array(), $myUser) ?>

View File

@ -37,7 +37,7 @@
} else { } else {
$cond = '1'; $cond = '1';
} }
?> ?>
<?php echoUOJPageHeader(UOJLocale::get('submissions')) ?> <?php echoUOJPageHeader(UOJLocale::get('submissions')) ?>
<div class="d-none d-sm-block"> <div class="d-none d-sm-block">
<?php if ($myUser != null): ?> <?php if ($myUser != null): ?>
@ -87,5 +87,5 @@
</div> </div>
<?php <?php
echoSubmissionsList($cond, 'order by id desc', array('judge_time_hidden' => ''), $myUser); echoSubmissionsList($cond, 'order by id desc', array('judge_time_hidden' => ''), $myUser);
?> ?>
<?php echoUOJPageFooter() ?> <?php echoUOJPageFooter() ?>

View File

@ -535,11 +535,11 @@ EOD;
if (!isset($tabs_info[$cur_tab])) { if (!isset($tabs_info[$cur_tab])) {
become404Page(); become404Page();
} }
?> ?>
<?php <?php
requireLib('shjs'); requireLib('shjs');
requireLib('morris'); requireLib('morris');
?> ?>
<?php echoUOJPageHeader('系统管理') ?> <?php echoUOJPageHeader('系统管理') ?>
<div class="row"> <div class="row">
<div class="col-sm-3"> <div class="col-sm-3">

View File

@ -10,7 +10,7 @@
$username = $_GET['username']; $username = $_GET['username'];
$REQUIRE_LIB['github_contribution_graph'] = ''; $REQUIRE_LIB['github_contribution_graph'] = '';
?> ?>
<?php if (validateUsername($username) && ($user = queryUser($username))): ?> <?php if (validateUsername($username) && ($user = queryUser($username))): ?>
<?php echoUOJPageHeader($user['username'] . ' - ' . UOJLocale::get('user profile')) ?> <?php echoUOJPageHeader($user['username'] . ' - ' . UOJLocale::get('user profile')) ?>
<?php <?php

View File

@ -81,26 +81,26 @@
return json_encode($ret); return json_encode($ret);
} }
/* /*
function deleteMsg($msgId) { function deleteMsg($msgId) {
return 1; return 1;
$str = <<<EOD $str = <<<EOD
select * from user_msg select * from user_msg
where id = $msgId where id = $msgId
and read_time is null and read_time is null
EOD; EOD;
$result = DB::query($str); $result = DB::query($str);
if (DB::fetch($result)) { if (DB::fetch($result)) {
$str = <<<EOD $str = <<<EOD
delete from user_msg delete from user_msg
where id = $msgId where id = $msgId
EOD; EOD;
DB::query($str); DB::query($str);
return 1; return 1;
} }
return 0; return 0;
} }
*/ */
if (isset($_POST['user_msg'])) { if (isset($_POST['user_msg'])) {
die(handleMsgPost()); die(handleMsgPost());
@ -109,7 +109,7 @@ EOD;
} elseif (isset($_GET['getHistory'])) { } elseif (isset($_GET['getHistory'])) {
die(getHistory()); die(getHistory());
} }
?> ?>
<?php echoUOJPageHeader('私信') ?> <?php echoUOJPageHeader('私信') ?>

View File

@ -22,7 +22,7 @@ EOD;
echo '<td>'.$msg['send_time'].'</td>'; echo '<td>'.$msg['send_time'].'</td>';
echo '</tr>'; echo '</tr>';
} }
?> ?>
<?php echoUOJPageHeader('系统消息') ?> <?php echoUOJPageHeader('系统消息') ?>
<h2>系统消息</h2> <h2>系统消息</h2>
<?php echoLongTable(array('*'), 'user_system_msg', "receiver='" . Auth::id() . "'", 'order by id desc', $header_row, 'echoSysMsg', array('table_classes' => array('table'))) ?> <?php echoLongTable(array('*'), 'user_system_msg', "receiver='" . Auth::id() . "'", 'order by id desc', $header_row, 'echoSysMsg', array('table_classes' => array('table'))) ?>

View File

@ -356,4 +356,4 @@
error_log('hack successfully but sync failed.'); error_log('hack successfully but sync failed.');
} }
} }
?> ?>

View File

@ -818,4 +818,4 @@ EOD;
}; };
return $form; return $form;
} }
?> ?>

View File

@ -183,4 +183,4 @@
DB::update("update problems set ac_num = (select count(*) from submissions where problem_id = problems.id and score = 100), submit_num = (select count(*) from submissions where problem_id = problems.id) where id = $problem_id"); DB::update("update problems set ac_num = (select count(*) from submissions where problem_id = problems.id and score = 100), submit_num = (select count(*) from submissions where problem_id = problems.id) where id = $problem_id");
} }
?> ?>

View File

@ -33,4 +33,4 @@
UOJLocale::setLocale($_GET['locale']); UOJLocale::setLocale($_GET['locale']);
} }
UOJLocale::requireModule('basic'); UOJLocale::requireModule('basic');
?> ?>

View File

@ -13,7 +13,7 @@
$extra_text = $blog['is_hidden'] ? '<span class="text-muted">[已隐藏]</span> ' : ''; $extra_text = $blog['is_hidden'] ? '<span class="text-muted">[已隐藏]</span> ' : '';
$blog_type = $blog['type'] == 'B' ? 'post' : 'slide'; $blog_type = $blog['type'] == 'B' ? 'post' : 'slide';
?> ?>
<h2><?= $extra_text ?><a class="header-a" href="<?= HTML::blog_url(UOJContext::userid(), '/post/'.$blog['id']) ?>"><?= $blog['title'] ?></a></h2> <h2><?= $extra_text ?><a class="header-a" href="<?= HTML::blog_url(UOJContext::userid(), '/post/'.$blog['id']) ?>"><?= $blog['title'] ?></a></h2>
<div><?= $blog['post_time'] ?> <strong>By</strong> <?= getUserLink($blog['poster']) ?></div> <div><?= $blog['post_time'] ?> <strong>By</strong> <?= getUserLink($blog['poster']) ?></div>
<?php if (!$show_title_only): ?> <?php if (!$show_title_only): ?>

View File

@ -2,7 +2,7 @@
if (!isset($ShowPageFooter)) { if (!isset($ShowPageFooter)) {
$ShowPageFooter = true; $ShowPageFooter = true;
} }
?> ?>
</div> </div>
<?php if ($ShowPageFooter): ?> <?php if ($ShowPageFooter): ?>
<div class="uoj-footer"> <div class="uoj-footer">

View File

@ -28,7 +28,7 @@
if (!isset($ShowPageHeader)) { if (!isset($ShowPageHeader)) {
$ShowPageHeader = true; $ShowPageHeader = true;
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= UOJLocale::locale() ?>"> <html lang="<?= UOJLocale::locale() ?>">
<head> <head>

View File

@ -11,7 +11,7 @@
if (!isset($slide_config['theme'])) { if (!isset($slide_config['theme'])) {
$slide_config['theme'] = 'moon'; $slide_config['theme'] = 'moon';
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-cn"> <html lang="zh-cn">
<head> <head>