blob: 001d48e4278fefa4e09d2c183a68841be41e01cf (
plain)
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
|
<?php
////////////////////////////////////////////////////////////////////////////////
//BOCA Online Contest Administrator
// Copyright (C) 2003-2012 by BOCA Development Team (bocasystem@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
// Last modified 05/aug/2012 by cassio@ime.usp.br
require('header.php');
$sitetime = DBAllSiteTime($_SESSION["usertable"]["contestnumber"], $site);
?>
<br />
<center><h2>Site Start/Stop Logs</h2></center>
<table border="0">
<?php
echo " <td nowrap width=\"50%\" align=right>Start date (contest=" . dateconv($ct["conteststartdate"]) . "):</td>";
echo "<td width=\"50%\"><b>" . dateconv($st["sitestartdate"]) . "</b></td>\n";
echo "<tr>";
if (!$st["siterunning"]) {
echo " <tr>\n";
echo " <td nowrap width=\"50%\" align=right><b>Finished at:</b></td>\n";
echo " <td width=\"50%\"><b>" . dateconv($st["siteendeddate"]);
if($st["siteautoended"]) echo " (auto)";
echo "</b></td>\n";
echo " </tr>\n";
if($st["siteautoended"]) {
$w = (int) ($st["siteduration"]/60);
$ww = $st["siteduration"] % 60;
}
else {
$w = (int) ($st["currenttime"]/60);
$ww = $st["currenttime"] % 60;
}
echo " <tr>\n";
echo " <td nowrap width=\"50%\" align=right><b>Real duration:</b></td>\n";
echo " <td width=\"50%\"><b>$w minutes";
if($ww != 0) echo " plus $ww seconds";
echo "</b></td>\n";
echo " </tr>\n";
}
echo "<tr>\n";
echo " <td width=\"50%\" align=right>Planned Duration (contest=";
echo $ct["contestduration"]/60;
echo "):</td>";
?>
<td width="50%">
<?php echo $st["siteduration"]/60; ?>
</td>
</tr>
<tr>
<?php
echo " <td width=\"50%\" align=right>Stop answering (contest=";
echo $ct["contestlastmileanswer"]/60;
echo "):</td>";
?>
<td width="50%">
<?php echo $st["sitelastmileanswer"]/60; ?>
</td>
</tr>
<tr>
<?php
echo " <td width=\"50%\" align=right>Stop scoreboard (contest=";
echo $ct["contestlastmilescore"]/60;
echo "):</td>";
?>
<td width="50%">
<?php echo $st["sitelastmilescore"]/60; ?>
</td>
</tr>
<tr>
<td width=\"50%\" align=right>Number of Clars:</td>
<td width="50%"><?php echo $st["sitenextclar"]; ?>
</td>
</tr>
<tr>
<td width=\"50%\" align=right>Number of Runs:</td>
<td width="50%"><?php echo $st["sitenextrun"]; ?>
</td>
</tr>
<tr>
<td width=\"50%\" align=right>Number of Tasks:</td>
<td width="50%"><?php echo $st["sitenexttask"]; ?>
</td>
</tr>
</table>
</center>
<center>
<br />
<table border=1>
<tr>
<td nowrap width=\"50%\" align=right>Starting at</td><td nowrap width=\"50%\" align=left>Ending at</td>
</tr>
<?php
$n = count($sitetime);
for ($i=0; $i< $n; $i++) {
echo "<tr>";
echo "<td nowrap align=right>";
echo dateconv($sitetime[$i]["sitestartdate"]);
echo "</td>";
echo "<td nowrap align=left>";
if($sitetime[$i]["siteenddate"] == 0) {
if($st["siterunning"])
echo "still open";
else echo "auto-ended";
}
else
echo dateconv($sitetime[$i]["siteenddate"]);
echo "</td>";
echo "</tr>";
}
?>
</table>
</center>
<?php include("$locr/footnote.php"); ?>
|