This repository has been archived by the owner on Sep 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdraw_powerpoint_display.php
132 lines (128 loc) · 5.19 KB
/
draw_powerpoint_display.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
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
<?php /* begin license *
*
* Tabbie, Debating Tabbing Software
* Copyright Contributors
*
* This file is part of Tabbie
*
* Tabbie 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 2 of the License, or
* (at your option) any later version.
*
* Tabbie 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 Tabbie; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* end license */
require_once("includes/backend.php");
require_once("includes/adjudicator.php");
$roundno=@$_GET['roundno'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Draw :: Round <?= $roundno ?></title>
<meta name="generator" content="S5" />
<meta name="version" content="S5 1.1" />
<meta name="presdate" content="20050728" />
<meta name="author" content="Eric A. Meyer" />
<meta name="company" content="Complex Spiral Consulting" />
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
<!-- style sheet links -->
<link rel="stylesheet" href="view/ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="view/ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="view/ui/default/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="view/ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- S5 JS -->
<script src="view/ui/default/slides.js" type="text/javascript"></script>
</head>
<body>
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<h1>Draw :: Round <?= $roundno ?></h1>
<h2>Created with Tabbie, see <a href="http://smoothtournament.com">http://smoothtournament.com</a>.</h2>
</div>
</div>
<div class="presentation">
<div class="slide">
<h1>Draw for Round <?= $roundno ?></h1>
<div id="autoplay"><a href="javascript: auto();">Start Show</a></div>
</div>
<?php
// Get the individual debate details
$venue_query = "SELECT d.debate_id AS debate_id, d.og AS ogid, d.oo AS ooid, d.cg AS cgid, d.co AS coid, d.venue_id AS venue_id, venue.venue_name AS venue_name, venue.venue_location AS venue_location, oguniv.univ_code AS og_univ_code, ogteam.team_code AS og_team_code, oouniv.univ_code AS oo_univ_code, ooteam.team_code AS oo_team_code, cguniv.univ_code AS cg_univ_code, cgteam.team_code AS cg_team_code, couniv.univ_code AS co_univ_code, coteam.team_code AS co_team_code ";
$venue_query .= "FROM draws AS d, venue AS venue, university AS oguniv, team AS ogteam, university AS oouniv, team AS ooteam, university AS cguniv, team AS cgteam, university AS couniv, team AS coteam ";
$venue_query .= "WHERE d.round_no=? AND d.venue_id = venue.venue_id AND ogteam.team_id = d.og AND oguniv.univ_id = ogteam.univ_id AND ooteam.team_id = d.oo AND oouniv.univ_id = ooteam.univ_id AND cgteam.team_id = d.cg AND cguniv.univ_id = cgteam.univ_id AND coteam.team_id = d.co AND couniv.univ_id = coteam.univ_id ";
$venue_query .= "ORDER BY RAND() ";
$venue_result = qp($venue_query, array($roundno));
if (!$venue_result) {
print $DBConn->ErrorMsg();
}
while ($venue_row=$venue_result->FetchRow())
{
$debate_id = $venue_row['debate_id'];
echo <<< END
<div class='slide'>
<h1>{$venue_row['venue_name']}</h1>
<div id='left'>
<div id='leftup'>
<h2>Opening Government</h2>
<p>{$venue_row['og_univ_code']} {$venue_row['og_team_code']}</p>
</div>
<div id='leftdown'>
<h2>Closing Government</h2>
<p>{$venue_row['cg_univ_code']} {$venue_row['cg_team_code']}</p>
</div>
</div>
<div id='right'>
<div id='rightup'>
<h2>Opening Opposition</h2>
<p>{$venue_row['oo_univ_code']} {$venue_row['oo_team_code']}</p>
</div>
<div id='rightdown'>
<h2>Closing Opposition</h2>
<p>{$venue_row['co_univ_code']} {$venue_row['co_team_code']}</p>
</div>
</div>\n
END;
$chfadj = get_chair($roundno, $debate_id);
echo <<< END
<div id='bottom'>
<h2>Adjudicators</h2>
<p>{$chfadj}
END;
// Get Panelists
echo ", ".implode(", ", get_panel($roundno, $debate_id));
$trainees = get_trainees($roundno, $debate_id);
if ($trainees) {
echo ", ".implode(" (t), ", $trainees)." (t)";
}
echo "</p>\n";
echo <<< END
</div>
</div>\n
END;
}
echo <<< END
<div class='slide'>
<p class="show"><a href='javascript: goTo( 0 );'>Show Draw Again</a></p>
<p class="show"><a href='motion.php?roundno=$roundno'>Show Motion</a></p>
</div>
END;
?>
</div>
</body>
</html>