mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 01:08:41 +00:00
fix: style
This commit is contained in:
parent
df203c3375
commit
410631075e
@ -52,12 +52,12 @@
|
||||
};
|
||||
$time_form->succ_href="/contests";
|
||||
$time_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('添加比赛') ?>
|
||||
<h1 class="page-header">添加比赛</h1>
|
||||
<div class="tab-pane active" id="tab-time">
|
||||
<?php
|
||||
$time_form->printHTML();
|
||||
?>
|
||||
$time_form->printHTML();
|
||||
?>
|
||||
</div>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -44,7 +44,7 @@ EOD;
|
||||
'table_classes' => ['table', 'table-hover'],
|
||||
'page_len' => 100
|
||||
];
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('announcements')) ?>
|
||||
<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); ?>
|
||||
|
@ -12,4 +12,4 @@
|
||||
}
|
||||
|
||||
redirectTo(HTML::blog_url($blog['poster'], '/post/'.$_GET['id']));
|
||||
?>
|
||||
?>
|
||||
|
@ -29,7 +29,7 @@
|
||||
EOD;
|
||||
$config = array();
|
||||
$config['table_classes'] = array('table', 'table-hover');
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('blogs')) ?>
|
||||
<?php if (Auth::check()): ?>
|
||||
<div class="float-right">
|
||||
|
@ -58,11 +58,11 @@
|
||||
if (isset($_POST['change'])) {
|
||||
die(handlePost());
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['dialog'] = '';
|
||||
$REQUIRE_LIB['md5'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('modify my profile')) ?>
|
||||
<h2 class="page-header"><?= UOJLocale::get('modify my profile') ?></h2>
|
||||
<form id="form-update" class="form-horizontal">
|
||||
|
@ -64,5 +64,5 @@
|
||||
}
|
||||
$cnt = $row['zan'];
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?= getClickZanBlock($type, $id, $cnt, $cur) ?>
|
@ -239,13 +239,13 @@
|
||||
return '您尚未登录';
|
||||
}
|
||||
switch ($_POST['rtype']) {
|
||||
case 'public':
|
||||
case 'private':
|
||||
if (strlen($content) == 0) {
|
||||
return '回复不能为空';
|
||||
}
|
||||
case 'public':
|
||||
case 'private':
|
||||
if (strlen($content) == 0) {
|
||||
return '回复不能为空';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
null
|
||||
@ -447,7 +447,7 @@ EOD;
|
||||
}
|
||||
|
||||
$page_header = HTML::stripTags($contest['name']) . ' - ';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . $tabs_info[$cur_tab]['name'] . ' - ' . UOJLocale::get('contests::contest')) ?>
|
||||
<div class="text-center">
|
||||
<h1><?= $contest['name'] ?></h1>
|
||||
@ -462,18 +462,18 @@ EOD;
|
||||
<?= HTML::tablist($tabs_info, $cur_tab) ?>
|
||||
<div class="top-buffer-md">
|
||||
<?php
|
||||
if ($cur_tab == 'dashboard') {
|
||||
echoDashboard();
|
||||
} elseif ($cur_tab == 'submissions') {
|
||||
echoMySubmissions();
|
||||
} elseif ($cur_tab == 'standings') {
|
||||
echoStandings();
|
||||
} elseif ($cur_tab == 'after_contest_standings') {
|
||||
echoStandings(true);
|
||||
} elseif ($cur_tab == 'backstage') {
|
||||
echoBackstage();
|
||||
}
|
||||
?>
|
||||
if ($cur_tab == 'dashboard') {
|
||||
echoDashboard();
|
||||
} elseif ($cur_tab == 'submissions') {
|
||||
echoMySubmissions();
|
||||
} elseif ($cur_tab == 'standings') {
|
||||
echoStandings();
|
||||
} elseif ($cur_tab == 'after_contest_standings') {
|
||||
echoStandings(true);
|
||||
} elseif ($cur_tab == 'backstage') {
|
||||
echoBackstage();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -485,14 +485,14 @@ EOD;
|
||||
|
||||
<div class="col-sm-3">
|
||||
<?php
|
||||
if ($contest['cur_progress'] <= CONTEST_IN_PROGRESS) {
|
||||
echoContestCountdown();
|
||||
} elseif ($contest['cur_progress'] <= CONTEST_TESTING) {
|
||||
echoContestJudgeProgress();
|
||||
} else {
|
||||
echoContestFinished();
|
||||
}
|
||||
?>
|
||||
if ($contest['cur_progress'] <= CONTEST_IN_PROGRESS) {
|
||||
echoContestCountdown();
|
||||
} elseif ($contest['cur_progress'] <= CONTEST_TESTING) {
|
||||
echoContestJudgeProgress();
|
||||
} else {
|
||||
echoContestFinished();
|
||||
}
|
||||
?>
|
||||
<?php if ($cur_tab == 'standings' || $cur_tab == 'after_contest_standings'): ?>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
@ -166,7 +166,7 @@
|
||||
$time_form->runAtServer();
|
||||
$managers_form->runAtServer();
|
||||
$problems_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - 比赛管理') ?>
|
||||
<h1 class="page-header" align="center"><?=$contest['name']?> 管理</h1>
|
||||
<ul class="nav nav-tabs mb-3" role="tablist">
|
||||
@ -193,13 +193,13 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$row_id = 0;
|
||||
$row_id = 0;
|
||||
$result = DB::query("select username from contests_permissions where contest_id = {$contest['id']}");
|
||||
while ($row = DB::fetch($result, MYSQLI_ASSOC)) {
|
||||
$row_id++;
|
||||
echo '<tr>', '<td>', $row_id, '</td>', '<td>', getUserLink($row['username']), '</td>', '</tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="text-center">命令格式:命令一行一个,+mike表示把mike加入管理者,-mike表示把mike从管理者中移除</p>
|
||||
@ -216,13 +216,13 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$result = DB::query("select problem_id from contests_problems where contest_id = ${contest['id']} order by dfn asc");
|
||||
$result = DB::query("select problem_id from contests_problems where contest_id = ${contest['id']} order by dfn asc");
|
||||
while ($row = DB::fetch($result, MYSQLI_ASSOC)) {
|
||||
$problem = queryProblemBrief($row['problem_id']);
|
||||
$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>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="text-center">命令格式:命令一行一个,+233表示把题号为233的试题加入比赛,-233表示把题号为233的试题从比赛中移除</p>
|
||||
|
@ -106,7 +106,7 @@
|
||||
$unregister_form->runAtServer();
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - ' . UOJLocale::get('contests::contest registrants')) ?>
|
||||
|
||||
<h1 class="text-center"><?= $contest['name'] ?></h1>
|
||||
@ -123,55 +123,55 @@
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
if ($show_ip) {
|
||||
$header_row = '<tr><th>#</th><th>'.UOJLocale::get('username').'</th><th>remote_addr</th></tr>';
|
||||
if ($show_ip) {
|
||||
$header_row = '<tr><th>#</th><th>'.UOJLocale::get('username').'</th><th>remote_addr</th></tr>';
|
||||
|
||||
$ip_owner = array();
|
||||
foreach (DB::selectAll("select * from contests_registrants where contest_id = {$contest['id']} order by username desc") as $reg) {
|
||||
$user = queryUser($reg['username']);
|
||||
$ip_owner[$user['remote_addr']] = $reg['username'];
|
||||
$ip_owner = array();
|
||||
foreach (DB::selectAll("select * from contests_registrants where contest_id = {$contest['id']} order by username desc") as $reg) {
|
||||
$user = queryUser($reg['username']);
|
||||
$ip_owner[$user['remote_addr']] = $reg['username'];
|
||||
}
|
||||
} else {
|
||||
$header_row = '<tr><th>#</th><th>'.UOJLocale::get('username').'</th></tr>';
|
||||
}
|
||||
} else {
|
||||
$header_row = '<tr><th>#</th><th>'.UOJLocale::get('username').'</th></tr>';
|
||||
}
|
||||
|
||||
echoLongTable(array('*'), 'contests_registrants', "contest_id = {$contest['id']}", 'order by username desc',
|
||||
$header_row,
|
||||
function($contest, $num) {
|
||||
global $myUser;
|
||||
global $show_ip, $ip_owner;
|
||||
echoLongTable(array('*'), 'contests_registrants', "contest_id = {$contest['id']}", 'order by username desc',
|
||||
$header_row,
|
||||
function($contest, $num) {
|
||||
global $myUser;
|
||||
global $show_ip, $ip_owner;
|
||||
|
||||
$user = queryUser($contest['username']);
|
||||
$user_link = getUserLink($contest['username']);
|
||||
if (!$show_ip) {
|
||||
echo '<tr>';
|
||||
} else {
|
||||
if ($ip_owner[$user['remote_addr']] != $user['username']) {
|
||||
echo '<tr class="danger">';
|
||||
} else {
|
||||
$user = queryUser($contest['username']);
|
||||
$user_link = getUserLink($contest['username']);
|
||||
if (!$show_ip) {
|
||||
echo '<tr>';
|
||||
} else {
|
||||
if ($ip_owner[$user['remote_addr']] != $user['username']) {
|
||||
echo '<tr class="danger">';
|
||||
} else {
|
||||
echo '<tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<td>'.$num.'</td>';
|
||||
echo '<td>'.$user_link.'</td>';
|
||||
if ($show_ip) {
|
||||
echo '<td>'.$user['remote_addr'].'</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
},
|
||||
array('page_len' => 100,
|
||||
'get_row_index' => '',
|
||||
'print_after_table' => function() {
|
||||
global $add_new_contestant_form, $add_group_to_contest_form;
|
||||
echo '<td>'.$num.'</td>';
|
||||
echo '<td>'.$user_link.'</td>';
|
||||
if ($show_ip) {
|
||||
echo '<td>'.$user['remote_addr'].'</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
},
|
||||
array('page_len' => 100,
|
||||
'get_row_index' => '',
|
||||
'print_after_table' => function() {
|
||||
global $add_new_contestant_form, $add_group_to_contest_form;
|
||||
|
||||
if (isset($add_new_contestant_form)) {
|
||||
$add_new_contestant_form->printHTML();
|
||||
if (isset($add_new_contestant_form)) {
|
||||
$add_new_contestant_form->printHTML();
|
||||
}
|
||||
if (isset($add_group_to_contest_form)) {
|
||||
$add_group_to_contest_form->printHTML();
|
||||
}
|
||||
}
|
||||
if (isset($add_group_to_contest_form)) {
|
||||
$add_group_to_contest_form->printHTML();
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
?>
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -28,7 +28,7 @@
|
||||
$register_form->succ_href = "/contests";
|
||||
|
||||
$register_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($contest['name']) . ' - 报名') ?>
|
||||
<h1 class="page-header">比赛规则</h1>
|
||||
<ul>
|
||||
|
@ -48,11 +48,11 @@ EOD;
|
||||
echo '<td>', '<div class="text-left">'.$click_zan_block.'</div>', '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('contests')) ?>
|
||||
<h4><?= UOJLocale::get('contests::current or upcoming contests') ?></h4>
|
||||
<?php
|
||||
$table_header = '';
|
||||
$table_header = '';
|
||||
$table_header .= '<tr>';
|
||||
$table_header .= '<th>'.UOJLocale::get('contests::contest name').'</th>';
|
||||
$table_header .= '<th style="width:15em;">'.UOJLocale::get('contests::start time').'</th>';
|
||||
@ -81,22 +81,22 @@ $('#contest-countdown').countdown($rest_second, function() {
|
||||
</div>
|
||||
EOD;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<h4><?= UOJLocale::get('contests::ended contests') ?></h4>
|
||||
<?php
|
||||
echoLongTable(array('*'), 'contests', "status = 'finished'", 'order by id desc', $table_header,
|
||||
echoContest,
|
||||
array('page_len' => 100,
|
||||
'print_after_table' => function() {
|
||||
global $myUser;
|
||||
if (isSuperUser($myUser)) {
|
||||
echo '<div class="text-right">';
|
||||
echo '<a href="/contest/new" class="btn btn-primary">'.UOJLocale::get('contests::add new contest').'</a>';
|
||||
echo '</div>';
|
||||
echoLongTable(array('*'), 'contests', "status = 'finished'", 'order by id desc', $table_header,
|
||||
echoContest,
|
||||
array('page_len' => 100,
|
||||
'print_after_table' => function() {
|
||||
global $myUser;
|
||||
if (isSuperUser($myUser)) {
|
||||
echo '<div class="text-right">';
|
||||
echo '<a href="/contest/new" class="btn btn-primary">'.UOJLocale::get('contests::add new contest').'</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
?>
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -53,4 +53,4 @@
|
||||
header("X-Sendfile: $file_name");
|
||||
header("Content-type: $mimetype");
|
||||
header("Content-Disposition: attachment; filename=$download_name");
|
||||
?>
|
||||
?>
|
||||
|
@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
echoUOJPageHeader(UOJLocale::get('help'));
|
||||
?>
|
||||
?>
|
||||
<article>
|
||||
<header>
|
||||
<h2 class="page-header">常见问题及其解答(FAQ)</h2>
|
||||
|
@ -51,7 +51,7 @@ EOD;
|
||||
$forgot_form->submit_button_config['align'] = 'offset';
|
||||
|
||||
$forgot_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('找回密码') ?>
|
||||
<h2 class="page-header">找回密码</h2>
|
||||
<h4>请输入需要找回密码的用户名:</h4>
|
||||
|
@ -97,7 +97,7 @@
|
||||
};
|
||||
$delete_user_form->runAtServer();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<?php echoUOJPageHeader(UOJLocale::get('groups')) ?>
|
||||
|
||||
@ -109,19 +109,19 @@
|
||||
<h5><?= UOJLocale::get('news') ?></h5>
|
||||
<ul>
|
||||
<?php
|
||||
$current_ac = queryGroupCurrentAC($group['id']);
|
||||
foreach ($current_ac as $ac) {
|
||||
echo '<li>';
|
||||
echo getUserLink($ac['submitter']);
|
||||
echo ' 解决了问题 ';
|
||||
echo '<a href="/problem/', $ac['problem_id'], '">', $ac['problem_title'], '</a> ';
|
||||
echo '<time class="time">(', $ac['submit_time'], ')</time>';
|
||||
echo '</li>';
|
||||
}
|
||||
if (!$current_ac) {
|
||||
echo '(无)';
|
||||
}
|
||||
?>
|
||||
$current_ac = queryGroupCurrentAC($group['id']);
|
||||
foreach ($current_ac as $ac) {
|
||||
echo '<li>';
|
||||
echo getUserLink($ac['submitter']);
|
||||
echo ' 解决了问题 ';
|
||||
echo '<a href="/problem/', $ac['problem_id'], '">', $ac['problem_title'], '</a> ';
|
||||
echo '<time class="time">(', $ac['submit_time'], ')</time>';
|
||||
echo '</li>';
|
||||
}
|
||||
if (!$current_ac) {
|
||||
echo '(无)';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,13 +3,13 @@
|
||||
requirePHPLib('judger');
|
||||
requirePHPLib('data');
|
||||
|
||||
if (!Auth::check()) {
|
||||
become403Page(UOJLocale::get('need login'));
|
||||
}
|
||||
if (!Auth::check()) {
|
||||
become403Page(UOJLocale::get('need login'));
|
||||
}
|
||||
|
||||
if (!isNormalUser($myUser)) {
|
||||
become403Page();
|
||||
}
|
||||
if (!isNormalUser($myUser)) {
|
||||
become403Page();
|
||||
}
|
||||
|
||||
if (isSuperUser($myUser)) {
|
||||
$new_group_form = new UOJForm('new_group');
|
||||
@ -41,12 +41,12 @@
|
||||
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<?php echoUOJPageHeader(UOJLocale::get('groups')) ?>
|
||||
|
||||
<?php
|
||||
$groups_caption = UOJLocale::get('groups');
|
||||
$groups_caption = UOJLocale::get('groups');
|
||||
$users_caption = UOJLocale::get('users count');
|
||||
$header = <<<EOD
|
||||
<tr>
|
||||
@ -65,22 +65,22 @@ EOD;
|
||||
$from = "`groups` a left join groups_users b on a.id = b.group_id";
|
||||
|
||||
echoLongTable(
|
||||
array('a.id as group_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.username) as user_count'),
|
||||
$from, $cond, 'group by a.id order by a.id asc',
|
||||
$header,
|
||||
'echoGroup',
|
||||
array('page_len' => 100,
|
||||
'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'),
|
||||
'print_after_table' => function() {
|
||||
global $myUser;
|
||||
if (isSuperUser($myUser)) {
|
||||
global $new_group_form;
|
||||
$new_group_form->printHTML();
|
||||
}
|
||||
},
|
||||
'head_pagination' => true
|
||||
)
|
||||
);
|
||||
?>
|
||||
array('a.id as group_id', 'a.title as title', 'a.is_hidden as is_hidden', 'count(b.username) as user_count'),
|
||||
$from, $cond, 'group by a.id order by a.id asc',
|
||||
$header,
|
||||
'echoGroup',
|
||||
array('page_len' => 100,
|
||||
'table_classes' => array('table', 'table-bordered', 'table-hover', 'table-striped'),
|
||||
'print_after_table' => function() {
|
||||
global $myUser;
|
||||
if (isSuperUser($myUser)) {
|
||||
global $new_group_form;
|
||||
$new_group_form->printHTML();
|
||||
}
|
||||
},
|
||||
'head_pagination' => true
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -60,10 +60,10 @@
|
||||
$styler->show_small_tip = false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['shjs'] = "";
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('problems::hack').' #'.$hack['id']) ?>
|
||||
|
||||
<?php echoHackListOnlyOne($hack, array(), $myUser) ?>
|
||||
|
@ -48,7 +48,7 @@
|
||||
$cond = '1';
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('hacks')) ?>
|
||||
<div class="d-none d-sm-block">
|
||||
<?php if ($myUser != null): ?>
|
||||
@ -104,6 +104,6 @@
|
||||
<div class="top-buffer-sm"></div>
|
||||
</div>
|
||||
<?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() ?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?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");
|
||||
$countdowns = DB::selectAll("select * from countdowns order by endtime asc limit 5")
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJConfig::$data['profile']['oj-name-short']) ?>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-9">
|
||||
@ -19,11 +19,11 @@
|
||||
<?php $now_cnt = 0; ?>
|
||||
<?php foreach ($blogs as $blog): ?>
|
||||
<?php
|
||||
$now_cnt++;
|
||||
$new_tag = '';
|
||||
if ((time() - strtotime($blog['post_time'])) / 3600 / 24 <= 7) {
|
||||
$new_tag = '<sup style="color:red"> new</sup>';
|
||||
}
|
||||
$now_cnt++;
|
||||
$new_tag = '';
|
||||
if ((time() - strtotime($blog['post_time'])) / 3600 / 24 <= 7) {
|
||||
$new_tag = '<sup style="color:red"> new</sup>';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="/blogs/<?= $blog['id'] ?>"><?= $blog['title'] ?></a><?= $new_tag ?></td>
|
||||
@ -60,8 +60,8 @@
|
||||
<?php foreach ($countdowns as $countdown): ?>
|
||||
<?php
|
||||
$enddate = strtotime($countdown['endtime']);
|
||||
$nowdate = time();
|
||||
$diff = floor(($enddate - $nowdate) / (24 * 60 * 60));
|
||||
$nowdate = time();
|
||||
$diff = floor(($enddate - $nowdate) / (24 * 60 * 60));
|
||||
?>
|
||||
<p class="card-text">
|
||||
<?php if ($diff > 0): ?>
|
||||
|
@ -40,4 +40,4 @@
|
||||
header("X-Sendfile: $file_name");
|
||||
header("Content-type: $mimetype");
|
||||
header("Content-Disposition: attachment; filename=$download_name");
|
||||
?>
|
||||
?>
|
||||
|
@ -209,4 +209,4 @@
|
||||
}
|
||||
|
||||
echo json_encode($submission);
|
||||
?>
|
||||
?>
|
||||
|
@ -18,4 +18,4 @@
|
||||
}
|
||||
|
||||
die("ok");
|
||||
?>
|
||||
?>
|
||||
|
@ -49,10 +49,10 @@
|
||||
unset($_SESSION['phrase']);
|
||||
die();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['md5'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('login')) ?>
|
||||
<h2 class="page-header"><?= UOJLocale::get('login') ?></h2>
|
||||
<form id="form-login" class="form-horizontal" method="post">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
crsf_defend();
|
||||
Auth::logout();
|
||||
?>
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
var prevUrl = document.referrer;
|
||||
|
@ -214,11 +214,11 @@ EOD
|
||||
$custom_test_form->submit_button_config['text'] = UOJLocale::get('problems::run');
|
||||
$custom_test_form->runAtServer();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['mathjax'] = '';
|
||||
$REQUIRE_LIB['shjs'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::problem')) ?>
|
||||
<?php
|
||||
$limit = getUOJConf("/var/uoj_data/{$problem['id']}/problem.conf");
|
||||
@ -226,7 +226,7 @@ EOD
|
||||
$memory_limit = $limit['memory_limit'];
|
||||
|
||||
$problem_uploader = $limit['poster'] ?: $problem['uploader'];
|
||||
?>
|
||||
?>
|
||||
<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">空间限制:<?=$memory_limit!=null?"$memory_limit MB":"N/A"?></span>
|
||||
|
@ -615,10 +615,10 @@ EOD
|
||||
$rejudge_form->runAtServer();
|
||||
$rejudgege97_form->runAtServer();
|
||||
$info_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['dialog'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 数据 - 题目管理') ?>
|
||||
<h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
|
@ -34,7 +34,7 @@
|
||||
);
|
||||
|
||||
$managers_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 管理者 - 题目管理') ?>
|
||||
<h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
@ -53,13 +53,13 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$row_id = 0;
|
||||
$row_id = 0;
|
||||
$result = DB::query("select username from problems_permissions where problem_id = ${problem['id']}");
|
||||
while ($row = DB::fetch($result, MYSQLI_ASSOC)) {
|
||||
$row_id++;
|
||||
echo '<tr>', '<td>', $row_id, '</td>', '<td>', getUserLink($row['username']), '</td>', '</tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="text-center">命令格式:命令一行一个,+mike表示把mike加入管理者,-mike表示把mike从管理者中移除</p>
|
||||
|
@ -143,7 +143,7 @@ EOD;
|
||||
|
||||
$div_classes = array('table-responsive');
|
||||
$table_classes = array('table', 'table-bordered', 'table-hover', 'table-striped');
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('problems')) ?>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
@ -177,7 +177,7 @@ $('#input-show_submit_mode').click(function() {
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
echo '<div class="', join($div_classes, ' '), '">';
|
||||
echo '<div class="', join($div_classes, ' '), '">';
|
||||
echo '<table class="', join($table_classes, ' '), '">';
|
||||
echo '<thead>';
|
||||
echo $header;
|
||||
@ -201,5 +201,5 @@ $('#input-show_submit_mode').click(function() {
|
||||
}
|
||||
|
||||
echo $pag->pagination();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -53,7 +53,7 @@
|
||||
};
|
||||
|
||||
$problem_editor->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - 编辑 - 题目管理') ?>
|
||||
<h1 class="page-header" align="center">#<?=$problem['id']?> : <?=$problem['title']?> 管理</h1>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
|
@ -61,10 +61,10 @@
|
||||
}
|
||||
|
||||
$submissions_sort_by_choice = !isset($_COOKIE['submissions-sort-by-code-length']) ? 'time' : 'tot_size';
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['morris'] = "";
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($problem['title']) . ' - ' . UOJLocale::get('problems::statistics')) ?>
|
||||
|
||||
<h1 class="page-header text-center"><?= $problem['title'] ?> <?= UOJLocale::get('problems::statistics') ?></h1>
|
||||
|
@ -13,7 +13,7 @@
|
||||
} else {
|
||||
become404Page();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader($title) ?>
|
||||
<?php echoRanklist($config) ?>
|
||||
<?php echoUOJPageFooter() ?>
|
||||
|
@ -59,11 +59,11 @@
|
||||
}
|
||||
die();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['md5'] = '';
|
||||
$REQUIRE_LIB['dialog'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('register')) ?>
|
||||
<h2 class="page-header"><?= UOJLocale::get('register') ?></h2>
|
||||
<form id="form-register" class="form-horizontal">
|
||||
|
@ -29,11 +29,11 @@
|
||||
if (isset($_POST['reset'])) {
|
||||
die(resetPassword());
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['dialog'] = '';
|
||||
$REQUIRE_LIB['md5'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('更改密码') ?>
|
||||
<h2 class="page-header">更改密码</h2>
|
||||
<form id="form-reset" class="form-horizontal">
|
||||
|
@ -4,7 +4,7 @@
|
||||
if (!Auth::check()) {
|
||||
become403Page(UOJLocale::get('need login'));
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('关于我') ?>
|
||||
|
||||
<?php if (UOJContext::user()['username'] != 'vfleaking'): ?>
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
requireLib('mathjax');
|
||||
requireLib('shjs');
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('日志') ?>
|
||||
|
||||
<div class="row">
|
||||
|
@ -140,11 +140,11 @@
|
||||
'tail' => 'order by id asc',
|
||||
'page_len' => 20
|
||||
));
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['mathjax'] = '';
|
||||
$REQUIRE_LIB['shjs'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(HTML::stripTags($blog['title']) . ' - 博客') ?>
|
||||
<?php echoBlog($blog, array('show_title_only' => isset($_GET['page']) && $_GET['page'] != 1)) ?>
|
||||
<h2>评论 <span class="glyphicon glyphicon-comment"></span></h2>
|
||||
@ -162,7 +162,7 @@
|
||||
$replies[$idx]['poster_realname'] = queryUser($reply['poster'])['realname'];
|
||||
}
|
||||
$replies_json = json_encode($replies);
|
||||
?>
|
||||
?>
|
||||
<div id="comment-<?= $comment['id'] ?>" class="list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-left comtposterbox mr-3">
|
||||
|
@ -22,7 +22,7 @@
|
||||
$delete_form->succ_href = "/archive";
|
||||
|
||||
$delete_form->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('删除博客 - ' . HTML::stripTags($blog['title'])) ?>
|
||||
<h3>您真的要删除博客 <?= $blog['title'] ?> 吗?该操作不可逆!</h3>
|
||||
<?php $delete_form->printHTML(); ?>
|
||||
|
@ -67,7 +67,7 @@
|
||||
};
|
||||
|
||||
$blog_editor->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('写博客') ?>
|
||||
<div class="text-right">
|
||||
<a href="http://uoj.ac/blog/7">这玩意儿怎么用?</a>
|
||||
|
@ -10,11 +10,11 @@
|
||||
'tail' => 'order by post_time desc limit 5',
|
||||
'echo_full' => true
|
||||
));
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['mathjax'] = '';
|
||||
$REQUIRE_LIB['shjs'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJContext::user()['username'] . '的博客') ?>
|
||||
|
||||
<div class="row">
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
call_user_func(function() { // to prevent variable scope leak
|
||||
|
||||
Route::pattern('id', '[1-9][0-9]{0,9}');
|
||||
Route::pattern('blog_username', '[a-zA-Z0-9_\-]{1,20}');
|
||||
|
||||
|
@ -16,4 +16,4 @@
|
||||
$page_config['PageTitle'] = HTML::stripTags($blog['title']) . ' - 幻灯片';
|
||||
$page_config['content'] = $blog['content'];
|
||||
uojIncludeView('slide', $page_config);
|
||||
?>
|
||||
?>
|
||||
|
@ -66,7 +66,7 @@
|
||||
};
|
||||
|
||||
$blog_editor->runAtServer();
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('写幻灯片') ?>
|
||||
<div class="text-right">
|
||||
<a href="http://uoj.ac/blog/75">这玩意儿怎么用?</a>
|
||||
|
@ -132,10 +132,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
$REQUIRE_LIB['shjs'] = "";
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('problems::submission').' #'.$submission['id']) ?>
|
||||
<?php echoSubmissionsListOnlyOne($submission, array(), $myUser) ?>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
} else {
|
||||
$cond = '1';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader(UOJLocale::get('submissions')) ?>
|
||||
<div class="d-none d-sm-block">
|
||||
<?php if ($myUser != null): ?>
|
||||
@ -86,6 +86,6 @@
|
||||
<div class="top-buffer-sm"></div>
|
||||
</div>
|
||||
<?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() ?>
|
||||
|
@ -307,14 +307,14 @@
|
||||
null
|
||||
);
|
||||
$countdown_adder->addInput('new_countdown_endtime', 'text', '截止日期', date("Y-m-d H:i:s"),
|
||||
function($str, &$vdata) {
|
||||
try {
|
||||
$vdata['new_countdown_endtime'] = new DateTime($str);
|
||||
} catch (Exception $e) {
|
||||
return '无效时间格式';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
function($str, &$vdata) {
|
||||
try {
|
||||
$vdata['new_countdown_endtime'] = new DateTime($str);
|
||||
} catch (Exception $e) {
|
||||
return '无效时间格式';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
null
|
||||
);
|
||||
$countdown_adder->handle = function() {
|
||||
@ -326,21 +326,21 @@
|
||||
};
|
||||
$countdown_adder->runAtServer();
|
||||
|
||||
$countdown_deleter = new UOJForm('delete_countdown');
|
||||
$countdown_deleter->submit_button_config['align'] = 'compressed';
|
||||
$countdown_deleter->addInput('delete_countdown_id', 'text', 'ID', '',
|
||||
function ($delete_countdown_id) {
|
||||
return '';
|
||||
},
|
||||
null
|
||||
);
|
||||
$countdown_deleter->handle = function() {
|
||||
$delete_countdown_id = $_POST['delete_countdown_id'];
|
||||
$delete_countdown_id = DB::escape($delete_countdown_id);
|
||||
$countdown_deleter = new UOJForm('delete_countdown');
|
||||
$countdown_deleter->submit_button_config['align'] = 'compressed';
|
||||
$countdown_deleter->addInput('delete_countdown_id', 'text', 'ID', '',
|
||||
function ($delete_countdown_id) {
|
||||
return '';
|
||||
},
|
||||
null
|
||||
);
|
||||
$countdown_deleter->handle = function() {
|
||||
$delete_countdown_id = $_POST['delete_countdown_id'];
|
||||
$delete_countdown_id = DB::escape($delete_countdown_id);
|
||||
|
||||
DB::query("delete from countdowns where id = '$delete_countdown_id'");
|
||||
};
|
||||
$countdown_deleter->runAtServer();
|
||||
DB::query("delete from countdowns where id = '$delete_countdown_id'");
|
||||
};
|
||||
$countdown_deleter->runAtServer();
|
||||
|
||||
$countdowns_header_row = <<<EOD
|
||||
<tr>
|
||||
@ -349,15 +349,15 @@
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
EOD;
|
||||
$countdowns_print_row = function($row) {
|
||||
echo <<<EOD
|
||||
$countdowns_print_row = function($row) {
|
||||
echo <<<EOD
|
||||
<tr>
|
||||
<td>{$row['id']}</td>
|
||||
<td>{$row['title']}</td>
|
||||
<td>{$row['endtime']}</td>
|
||||
</tr>
|
||||
EOD;
|
||||
};
|
||||
};
|
||||
|
||||
$contest_submissions_deleter = new UOJForm('contest_submissions');
|
||||
$contest_submissions_deleter->addInput('contest_id', 'text', '比赛ID', '',
|
||||
@ -535,11 +535,11 @@ EOD;
|
||||
if (!isset($tabs_info[$cur_tab])) {
|
||||
become404Page();
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php
|
||||
requireLib('shjs');
|
||||
requireLib('morris');
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('系统管理') ?>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
@ -615,13 +615,13 @@ EOD;
|
||||
<?php elseif ($cur_tab === 'custom-test'): ?>
|
||||
<?php $custom_test_deleter->printHTML() ?>
|
||||
<?php
|
||||
$submissions_pag = new Paginator(array(
|
||||
'col_names' => array('*'),
|
||||
'table_name' => 'custom_test_submissions',
|
||||
'cond' => '1',
|
||||
'tail' => 'order by id asc',
|
||||
'page_len' => 5
|
||||
));
|
||||
$submissions_pag = new Paginator(array(
|
||||
'col_names' => array('*'),
|
||||
'table_name' => 'custom_test_submissions',
|
||||
'cond' => '1',
|
||||
'tail' => 'order by id asc',
|
||||
'page_len' => 5
|
||||
));
|
||||
foreach ($submissions_pag->get() as $submission) {
|
||||
$problem = queryProblemBrief($submission['problem_id']);
|
||||
$submission_result = json_decode($submission['result'], true);
|
||||
@ -640,7 +640,7 @@ EOD;
|
||||
echoSubmissionContent($submission, getProblemCustomTestRequirement($problem));
|
||||
echoCustomTestSubmissionDetails($submission_result['details'], "submission-{$submission['id']}-details");
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?= $submissions_pag->pagination() ?>
|
||||
<?php elseif ($cur_tab === 'judger'): ?>
|
||||
<div>
|
||||
|
@ -10,11 +10,11 @@
|
||||
$username = $_GET['username'];
|
||||
|
||||
$REQUIRE_LIB['github_contribution_graph'] = '';
|
||||
?>
|
||||
?>
|
||||
<?php if (validateUsername($username) && ($user = queryUser($username))): ?>
|
||||
<?php echoUOJPageHeader($user['username'] . ' - ' . UOJLocale::get('user profile')) ?>
|
||||
<?php
|
||||
$esc_email = HTML::escape($user['email']);
|
||||
$esc_email = HTML::escape($user['email']);
|
||||
$esc_qq = HTML::escape($user['qq'] != 0 ? $user['qq'] : 'Unfilled');
|
||||
$esc_sex = HTML::escape($user['sex']);
|
||||
$col_sex="color:blue";
|
||||
@ -28,7 +28,7 @@
|
||||
$esc_sex="";
|
||||
$col_sex="color:black";
|
||||
}
|
||||
$esc_motto = HTML::escape($user['motto']);
|
||||
$esc_motto = HTML::escape($user['motto']);
|
||||
?>
|
||||
<div class="card border-info">
|
||||
<h5 class="card-header bg-info"><?= UOJLocale::get('user profile') ?></h5>
|
||||
@ -84,25 +84,25 @@
|
||||
<div class="list-group-item">
|
||||
<?php
|
||||
$_result = DB::query("select date(submit_time), problem_id from submissions where submitter = '{$username}' and score = 100 and date(submit_time) between date_sub(curdate(), interval 1 year) and curdate()");
|
||||
$result = [];
|
||||
$vis = [];
|
||||
while ($row = DB::fetch($_result)) {
|
||||
$id = $row['date(submit_time)'] . ':' . $row['problem_id'];
|
||||
if (!$vis[$id]) {
|
||||
$vis[$id] = 1;
|
||||
$result[strtotime($row['date(submit_time)']) * 1000]++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
$result = [];
|
||||
$vis = [];
|
||||
while ($row = DB::fetch($_result)) {
|
||||
$id = $row['date(submit_time)'] . ':' . $row['problem_id'];
|
||||
if (!$vis[$id]) {
|
||||
$vis[$id] = 1;
|
||||
$result[strtotime($row['date(submit_time)']) * 1000]++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<h4 class="list-group-item-heading"><?= UOJLocale::get('n accepted in last year', count($result)) ?></h4>
|
||||
<div id="accepted-graph"></div>
|
||||
<script>
|
||||
var accepted_graph_data = [
|
||||
<?php
|
||||
foreach ($result as $key => $val) {
|
||||
echo "{ timestamp: {$key}, count: {$val} }, ";
|
||||
}
|
||||
?>
|
||||
foreach ($result as $key => $val) {
|
||||
echo "{ timestamp: {$key}, count: {$val} }, ";
|
||||
}
|
||||
?>
|
||||
];
|
||||
|
||||
$(document).ready(function () {
|
||||
@ -117,17 +117,17 @@
|
||||
<div class="list-group-item">
|
||||
<?php
|
||||
$ac_problems = DB::selectAll("select a.problem_id as problem_id, b.title as title from best_ac_submissions a inner join problems b on a.problem_id = b.id where submitter = '{$user['username']}';");
|
||||
?>
|
||||
?>
|
||||
<h4 class="list-group-item-heading"><?= UOJLocale::get('accepted problems').':'.UOJLocale::get('n problems in total', count($ac_problems))?> </h4>
|
||||
<p class="list-group-item-text">
|
||||
<?php
|
||||
foreach ($ac_problems as $problem) {
|
||||
echo '<a href="/problem/', $problem['problem_id'], '" style="display:inline-block; margin-right:0.25em;">#', $problem['problem_id'], '. ', $problem['title'], '</a>';
|
||||
}
|
||||
if (empty($ac_problems)) {
|
||||
echo UOJLocale::get('none');
|
||||
}
|
||||
?>
|
||||
foreach ($ac_problems as $problem) {
|
||||
echo '<a href="/problem/', $problem['problem_id'], '" style="display:inline-block; margin-right:0.25em;">#', $problem['problem_id'], '. ', $problem['title'], '</a>';
|
||||
}
|
||||
if (empty($ac_problems)) {
|
||||
echo UOJLocale::get('none');
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -81,26 +81,26 @@
|
||||
return json_encode($ret);
|
||||
}
|
||||
|
||||
/*
|
||||
function deleteMsg($msgId) {
|
||||
return 1;
|
||||
$str = <<<EOD
|
||||
select * from user_msg
|
||||
where id = $msgId
|
||||
and read_time is null
|
||||
EOD;
|
||||
$result = DB::query($str);
|
||||
if (DB::fetch($result)) {
|
||||
$str = <<<EOD
|
||||
delete from user_msg
|
||||
where id = $msgId
|
||||
EOD;
|
||||
DB::query($str);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
/*
|
||||
function deleteMsg($msgId) {
|
||||
return 1;
|
||||
$str = <<<EOD
|
||||
select * from user_msg
|
||||
where id = $msgId
|
||||
and read_time is null
|
||||
EOD;
|
||||
$result = DB::query($str);
|
||||
if (DB::fetch($result)) {
|
||||
$str = <<<EOD
|
||||
delete from user_msg
|
||||
where id = $msgId
|
||||
EOD;
|
||||
DB::query($str);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
if (isset($_POST['user_msg'])) {
|
||||
die(handleMsgPost());
|
||||
@ -109,7 +109,7 @@ EOD;
|
||||
} elseif (isset($_GET['getHistory'])) {
|
||||
die(getHistory());
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<?php echoUOJPageHeader('私信') ?>
|
||||
|
||||
|
@ -22,7 +22,7 @@ EOD;
|
||||
echo '<td>'.$msg['send_time'].'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php echoUOJPageHeader('系统消息') ?>
|
||||
<h2>系统消息</h2>
|
||||
<?php echoLongTable(array('*'), 'user_system_msg', "receiver='" . Auth::id() . "'", 'order by id desc', $header_row, 'echoSysMsg', array('table_classes' => array('table'))) ?>
|
||||
|
@ -356,4 +356,4 @@
|
||||
error_log('hack successfully but sync failed.');
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -384,7 +384,7 @@ EOD
|
||||
$('#form-group-$name').text_file_form_group('$name', '$text');
|
||||
</script>
|
||||
EOD
|
||||
);
|
||||
);
|
||||
|
||||
$this->is_big = true;
|
||||
$this->has_file = true;
|
||||
@ -818,4 +818,4 @@ EOD;
|
||||
};
|
||||
return $form;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -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");
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@ -33,4 +33,4 @@
|
||||
UOJLocale::setLocale($_GET['locale']);
|
||||
}
|
||||
UOJLocale::requireModule('basic');
|
||||
?>
|
||||
?>
|
||||
|
@ -156,7 +156,7 @@ marked.setOptions({
|
||||
}
|
||||
})
|
||||
EOD
|
||||
);
|
||||
);
|
||||
} catch (V8JsException $e) {
|
||||
die(json_encode(array('content_md' => '未知错误')));
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
$extra_text = $blog['is_hidden'] ? '<span class="text-muted">[已隐藏]</span> ' : '';
|
||||
|
||||
$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>
|
||||
<div><?= $blog['post_time'] ?> <strong>By</strong> <?= getUserLink($blog['poster']) ?></div>
|
||||
<?php if (!$show_title_only): ?>
|
||||
|
@ -11,9 +11,9 @@
|
||||
<tr>
|
||||
<?php
|
||||
echo $contest_problems[$i]['submission_id'] ? '<td class="success">' : '<td>';
|
||||
echo chr(ord('A') + $i);
|
||||
echo '</td>';
|
||||
?>
|
||||
echo chr(ord('A') + $i);
|
||||
echo '</td>';
|
||||
?>
|
||||
<td><?= getContestProblemLink($contest_problems[$i]['problem'], $contest['id']) ?></td>
|
||||
</tr>
|
||||
<?php endfor ?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
if (!isset($ShowPageFooter)) {
|
||||
$ShowPageFooter = true;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
<?php if ($ShowPageFooter): ?>
|
||||
<div class="uoj-footer">
|
||||
|
@ -28,7 +28,7 @@
|
||||
if (!isset($ShowPageHeader)) {
|
||||
$ShowPageHeader = true;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= UOJLocale::locale() ?>">
|
||||
<head>
|
||||
|
@ -11,7 +11,7 @@
|
||||
if (!isset($slide_config['theme'])) {
|
||||
$slide_config['theme'] = 'moon';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
|
Loading…
Reference in New Issue
Block a user