aboutsummaryrefslogtreecommitdiff
path: root/old/webcast/contest/index.php
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2013-07-02 05:46:45 +0000
committercassio <cassiopc@gmail.com>2013-07-02 05:46:45 +0000
commitbe2491b093b1f0ca430bede679ecbb670041e483 (patch)
treefe2da63d1811cb93e4352a43a113ace37b9f6017 /old/webcast/contest/index.php
parenta9aa438ea0558eb0044cf1e54a9190ddb41b65e5 (diff)
downloadboca-be2491b093b1f0ca430bede679ecbb670041e483.tar.gz
boca-be2491b093b1f0ca430bede679ecbb670041e483.zip
restructuring of boca's git
Diffstat (limited to 'old/webcast/contest/index.php')
-rw-r--r--old/webcast/contest/index.php61
1 files changed, 61 insertions, 0 deletions
diff --git a/old/webcast/contest/index.php b/old/webcast/contest/index.php
new file mode 100644
index 0000000..3efc719
--- /dev/null
+++ b/old/webcast/contest/index.php
@@ -0,0 +1,61 @@
+<?php
+
+require '../../db.php';
+require '../config.php';
+
+header('Content-type: text/plain; encoding=utf-8');
+
+$ct = DBContestInfo($contest);
+
+echo
+ $ct['contestname'] . "\n";
+
+echo
+ $ct['contestduration']/60 . '' .
+ $ct['contestlastmileanswer']/60 . '' .
+ $ct['contestlastmilescore']/60 . '' .
+ $ct['contestpenalty']/60 . "\n";
+
+$c = DBConnect();
+
+$r = DBExec($c,
+ 'SELECT problemnumber FROM problemtable' .
+ ' WHERE contestnumber = ' . $contest .
+ ' AND problemnumber > 0');
+
+$numProblems = DBnlines($r);
+
+$r = DBExec($c,
+ 'SELECT username, userfullname FROM usertable' .
+ ' WHERE contestnumber = ' . $contest .
+ ' AND userenabled = \'t\' AND usersitenumber = ' . $site .
+ ' AND usertype = \'team\'');
+
+$numTeams = DBnlines($r);
+
+echo
+ $numTeams . '' .
+ $numProblems . "\n";
+
+for ($i = 0; $i < $numTeams; $i++) {
+ $a = DBRow($r, $i);
+ $teamID = $a['username'];
+ if(isset($a['usershortname']))
+ $teamName = $a['usershortname'];
+ else
+ $teamName = $a['userfullname'];
+ if(isset($a['usershortinstitution']))
+ $teamUni = $a['usershortinstitution'];
+ else
+ $teamUni = $teamName;
+
+ echo
+ $teamID . '' .
+ $teamUni . '' .
+ $teamName . "\n";
+}
+
+echo '1' . '' . '1' . "\n";
+echo $numProblems . '' . 'Y' . "\n";
+
+?>