-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.php
More file actions
166 lines (153 loc) · 7.54 KB
/
status.php
File metadata and controls
166 lines (153 loc) · 7.54 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php $show_title="$MSG_STATUS - $OJ_NAME"; ?>
<?php include("template/$OJ_TEMPLATE/header.php");?>
<script src="template/<?php echo $OJ_TEMPLATE?>/js/textFit.min.js"></script>
<div class="padding" >
<!-- <form action="" class="ui mini form" method="get" role="form" id="form"> -->
<form id=simform class="ui mini form" action="status.php" method="get" style="display: flex; justify-content: center; align-items: center;">
<div class="inline fields" style="margin-bottom: 25px; white-space: nowrap; ">
<label style="font-size: 1.2em; margin-right: 1px;"><?php echo $MSG_PROBLEM_ID?>:</label>
<div class="field"><input name="problem_id" style="width: 70px; " type="text" value="<?php echo isset($problem_id)?htmlspecialchars($problem_id, ENT_QUOTES):"" ?>"></div>
<label style="font-size: 1.2em; margin-right: 1px;"><?php echo $MSG_USER?>:</label>
<div class="field"><input name="user_id" style="width: 100px; " type="text" value="<?php echo isset($user_id)?htmlspecialchars($user_id, ENT_QUOTES):"" ?>"></div>
<!-- <label style="font-size: 1.2em; margin-right: 1px;"><?php echo $MSG_SCHOOL?>:</label>
<div class="field"><input name="school" style="width: 50px; " type="text" value="<?php echo isset($school)?htmlspecialchars($school, ENT_QUOTES):"" ?>"></div>
<label style="font-size: 1.2em; margin-right: 1px;"><?php echo $MSG_GROUP_NAME?>:</label>
<div class="field"><input name="group_name" style="width: 50px; " type="text" value="<?php echo isset($group_name)?htmlspecialchars($group_name, ENT_QUOTES):"" ?>"></div> -->
<label style="font-size: 1.2em; margin-right: 1px;"><?php echo $MSG_LANG?>:</label>
<select class="form-control" size="1" name="language" style="width: 110px;font-size: 1em ">
<option value="-1">All</option>
<?php
if(isset($_GET['language'])){
$selectedLang=intval($_GET['language']);
}else{
$selectedLang=-1;
}
$lang_count=count($language_ext);
$langmask=$OJ_LANGMASK;
$lang=(~((int)$langmask))&((1<<($lang_count))-1);
for($i=0;$i<$lang_count;$i++){
if($lang&(1<<$i))
echo"<option value=$i ".( $selectedLang==$i?"selected":"").">
".$language_name[$i]."
</option>";
}
?>
</select>
<label style="font-size: 1.2em; margin-right: 1px;margin-left: 10px; ">状态:</label>
<select class="form-control" size="1" name="jresult" style="width: 110px; height:35px;">
<?php if (isset($_GET['jresult'])) $jresult_get=intval($_GET['jresult']);
else $jresult_get=-1;
if ($jresult_get>=12||$jresult_get<0) $jresult_get=-1;
if ($jresult_get==-1) echo "<option value='-1' selected>All</option>";
else echo "<option value='-1'>All</option>";
for ($j=0;$j<12;$j++){
$i=($j+4)%12;
if ($i==$jresult_get) echo "<option value='".strval($jresult_get)."' selected>".$jresult[$i]."</option>";
else echo "<option value='".strval($i)."'>".$jresult[$i]."</option>";
}
echo "</select>";
?>
<?php if(isset($_SESSION[$OJ_NAME.'_'.'administrator'])||isset($_SESSION[$OJ_NAME.'_'.'source_browser'])){
if(isset($_GET['showsim']))
$showsim=intval($_GET['showsim']);
else
$showsim=0;
echo "<label style=\"font-size: 1.2em; margin-right: 1px;margin-left: 10px; \">相似度:</label>";
echo "
<select id=\"appendedInputButton\" class=\"form-control\" name=showsim onchange=\"document.getElementById('simform').submit();\" style=\"width: 110px;height:35px;\">
<option value=0 ".($showsim==0?'selected':'').">All</option>
<option value=80 ".($showsim==80?'selected':'').">80</option>
<option value=85 ".($showsim==85?'selected':'').">85</option>
<option value=90 ".($showsim==90?'selected':'').">90</option>
<option value=95 ".($showsim==95?'selected':'').">95</option>
<option value=100 ".($showsim==100?'selected':'').">100</option>
</select>";
}
?>
<button class="ui labeled icon mini green button" type="submit" style="margin-left: 20px;height:35px;">
<i class="search icon"></i>
<?php echo $MSG_SEARCH;?>
</button>
<span class='ui mini grey button' style="height:35px;">AWT:<?php echo round($avg_delay,2)?>s </span>
<script>var AWT=<?php echo round($avg_delay*500,0) ?>;</script>
</div>
</form>
<table id="result-tab" class="ui very basic center aligned table" style="white-space: nowrap; font-size: 1.3em; height:35px;" id="table">
<thead>
<tr>
<th class='desktop-only item'><?php echo $MSG_RUNID?></th>
<th><?php echo $MSG_USER?></th>
<th><?php echo $MSG_NICK?></th>
<th><?php echo $MSG_PROBLEM_ID?></th>
<th><?php echo $MSG_RESULT?></th>
<th><?php echo $MSG_MEMORY?></th>
<th><?php echo $MSG_TIME?></th>
<th ><?php echo $MSG_LANG?></th>
<th class='desktop-only item'><?php echo $MSG_CODE_LENGTH?></th>
<th ><?php echo $MSG_SUBMIT_TIME?></th>
<?php if (isset($_SESSION[$OJ_NAME.'_'.'administrator'])) {
echo "<th class='desktop-only item'>";
echo $MSG_JUDGER;
echo "</th>";
} ?>
</tr>
</thead>
<tbody style='font-weight:700' >
<!-- <tr v-for="item in items" :config="displayConfig" :show-rejudge="false" :data="item" is='submission-item'>
</tr> -->
<?php
foreach($view_status as $row){
$i=0;
echo "<tr>";
foreach($row as $table_cell){
if ($i==4)
echo "<td class='td_result'>";
else if($i==0 || $i>7 && $i!=9)
echo "<td class='desktop-only item '>";
else
echo "<td>";
echo $table_cell;
echo "</td>";
$i++;
}
echo "</tr>\n";
}
?>
</tbody>
</table>
<div style="margin-bottom: 30px; ">
<div style="text-align: center; ">
<div class="ui pagination menu" style="box-shadow: none; ">
<a class="icon item" href="<?php echo "status.php?".$str2;?>" id="page_prev">
Top
</a>
<?php
if (isset($_GET['prevtop']))
echo "<a class=\"item\" href=\"status.php?".$str2."&top=".intval($_GET['prevtop'])."\">Prev</a>";
else
echo "<a class=\"item\" href=\"status.php?".$str2."&top=".($top+20)."\">Prev</a>";
?>
<a class="icon item" href="<?php echo "status.php?".$str2."&top=".$bottom."&prevtop=$top"; ?>" id="page_next">
Next
</a>
</div>
</div>
</div>
<script>
var i = 0;
var judge_result = [<?php
foreach ($judge_result as $result) {
echo "'$result',";
} ?>
''];
var judge_color = [<?php
foreach ($judge_color as $result) {
echo "'$result',";
} ?>
''];
var oj_mark='<?php echo $OJ_MARK ?>';
var user_id="<?php if (isset($_SESSION[$OJ_NAME."_user_id"]) && $OJ_FANCY_RESULT ) echo $_SESSION[$OJ_NAME."_user_id"]; ?>";
var fancy_mp3="<?php if (isset($_SESSION[$OJ_NAME."_user_id"]) && $OJ_FANCY_RESULT ) echo $OJ_FANCY_MP3; ?>";
</script>
<script src="template/<?php echo $OJ_TEMPLATE?>/auto_refresh.js?v=0.522" ></script>
<?php include("template/$OJ_TEMPLATE/footer.php");