forked from BNUACM/bnuoj-web-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contest_report.php
39 lines (37 loc) · 1.07 KB
/
contest_report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
include_once("functions/contests.php");
include_once("functions/users.php");
include_once("functions/sidebars.php");
$cid=convert_str($_GET["cid"]);
if (contest_exist($cid)&&$current_user->is_root()||contest_get_val($cid,"isprivate")==0||
(contest_get_val($cid,"isprivate")==1&&$current_user->is_in_contest($cid))||
(contest_get_val($cid,"isprivate")==2&&contest_get_val($cid,"password")==$_COOKIE[$config["cookie_prefix"]."contest_pass_$cid"])) {
?>
<div class="span9">
<?php
if (contest_passed($cid)) {
?>
<h3 class="pagetitle">Contest Report</h3>
<div id="contestrep" class="well">
<?= contest_get_val($cid,"report") ?>
</div>
<?php
} else {
?>
<p class="alert alert-warning">Contest not finished, come back later :) .</p>
<?php
}
?>
</div>
<div class="span3">
<?=sidebar_contest_show($cid)?>
</div>
<?php
} else {
?>
<div class="span12">
<p class="alert alert-error">Report Unavailable!</p>
</div>
<?php
}
?>