-
Notifications
You must be signed in to change notification settings - Fork 8
/
status.php
106 lines (104 loc) · 5.24 KB
/
status.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
$pagetitle="Online Status";
include_once("header.php");
if ( isset($_GET['start']) ) $start = convert_str($_GET['start']);
else $start = "0";
?>
<div id="flip-scroll" class="span12">
<div>
<form id="filterform" class="form-inline" method="">
<b>Filter: </b>
<label>Username: <input type='text' name='showname' id="showname" placeholder="Username" class="input-small" value='<?= $current_user->get_username()?>' /></label>
<label>Problem ID: <input type='text' name='showpid' id="showpid" placeholder="Problem ID" class="input-small" /></label>
<label>Result:
<select name="showres" id="showres" class="input-medium">
<option value=''>All</option>
<option value='Accepted'>Accepted</option>
<option value='Wrong Answer'>Wrong Answer</option>
<option value='Runtime Error'>Runtime Error</option>
<option value='Time Limit Exceed'>Time Limit Exceed</option>
<option value='Memory Limit Exceed'>Memory Limit Exceed</option>
<option value='Output Limit Exceed'>Output Limit Exceed</option>
<option value='Presentation Error'>Presentation Error</option>
<option value='Compile Error'>Compile Error</option>
<option value='Restricted Function'>Restricted Function</option>
<option value='Waiting'>Waiting</option>
<option value='Judge Error'>Judge Error</option>
</select>
</label>
<label>Language:
<select name="showlang" id="showlang" class="input-medium">
<option value="">All</option>
<option value="1">GNU C++</option>
<option value="2">GNU C</option>
<option value="3">Oracle Java</option>
<option value="4">Free Pascal</option>
<option value="5">Python2</option>
<option value="16">Python3</option>
<option value="6">C# (Mono)</option>
<option value="7">Fortran</option>
<option value="8">Perl</option>
<option value="9">Ruby</option>
<option value="10">Ada</option>
<option value="11">SML</option>
<option value="12">Visual C++</option>
<option value="13">Visual C</option>
</select>
</label>
<button type='submit' class="btn btn-primary">Show</button>
</form>
</div>
<div>
<table class="table table-hover table-striped basetable cf" id="statustable" width="100%">
<thead>
<tr>
<th width='9%'>Username</th>
<th width='7%'>RunID</th>
<th width='6%'>PID</th>
<th width='12%'>Result</th>
<th width='9%'>Language</th>
<th width='8%'>Time</th>
<th width='8%'>Memory</th>
<th width='7%'>Length</th>
<th width='13%'>Submit Time</th>
<th width='0%'>Visible</th>
</tr>
</thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
</div>
</div>
<div id="statusdialog" class="modal hide fade" style="display:none">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Title</h3>
</div>
<div class="modal-body">
<div class="well" style="text-align:center" id="rcontrol">
Result: <span id="rresult"></span> Memory Used: <span id="rmemory"></span> KB Time Used: <span id="rtime"></span> ms <br/>
Language: <span id="rlang"></span> Username: <span id="ruser"></span> Problem ID: <span id="rpid"></span> <br/>
Share Code? <div class="btn-group" id="rshare"><button id="sharey" type="button" class="btn btn-info">Yes</button><button id="sharen" type="button" class="btn btn-info">No</button></div>
<?php if($current_user->is_root()) { ?>
<button id="rejudge" class="btn btn-warning">Rejudge</button>
<?php } ?>
<br /><b id='sharenote'>This code is shared.</b>
</div>
<button class="pull-right btn btn-mini btn-inverse" data-clipboard-target="dcontent" id="copybtn">Copy</button>
<pre id="dcontent"></pre>
</div>
</div>
<script type="text/javascript">
var statperpage=<?= $config["limits"]["status_per_page"] ?>;
var spstart=<?= $start ?>;
var refrate=<?=$config["status"]["refresh_rate"]?>;
var lim_times=<?=$config["status"]["max_refresh_times"]?>;
</script>
<script src="js/ZeroClipboard.min.js"></script>
<script src="js/jquery.history.js"></script>
<script type="text/javascript" src="js/status.js?<?=filemtime("js/status.js") ?>"></script>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/prettify.js"></script>
<?php
include_once("footer.php");
?>