-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmatchresults.html
194 lines (183 loc) · 7.87 KB
/
matchresults.html
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en"><!-- InstanceBegin template="/Templates/MainTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- InstanceBeginEditable name="doctitle" -->
<meta name="description" content="View live qualification match results from BE 11." />
<title>Match Results - Brunswick Eruption 11</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" />
<link href="buttons/buttons.css" rel="stylesheet" type="text/css"/>
<script src="jquery1.6.2.js" type="text/javascript"></script>
<link rel="icon" type="image/png" href="images/favicon.png" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6958956-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<!-- Facebook and Twitter scripts -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<!-- End Facebook and Twitter scripts -->
<div id="headerBackground">
<div id="header">
<img id="headerImage" src="./images/header.png" alt="" onDragStart="return false;"/>
</div>
</div>
<div id="sticky_navigation_wrapper">
<div id="sticky_navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="register.html">Register</a></li>
<li><a href="volunteer.html">Volunteer</a></li>
<li><a href="teams.html">Team List</a></li>
<li><a href="awards.html">Awards</a></li>
<li><a href="agenda.html">Agenda</a></li>
<li><a href="local.html">Directions</a></li>
<li><a href="history.html">History</a></li>
<li><a href="subscribe.html">Subscribe</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div>
<h3 class="centered"><a class="no-decoration"href="rankings.html">Team Rankings</a> | <a class="no-decoration" href="webcast.html">Webcast</a></h3>
<div class="mainContent">
<h3 class="centered">Qualification Match Results</h3>
<table id="qualificationResultsTable" class="centered table table-striped table-bordered table-condensed">
<tr>
<td><strong>Match</strong></td>
<td><strong>Red 1</strong></td>
<td><strong>Red 2</strong></td>
<td><strong>Red 3</strong></td>
<td><strong>Blue 1</strong></td>
<td><strong>Blue 2</strong></td>
<td><strong>Blue 3</strong></td>
<td><strong>Red Score</strong></td>
<td><strong>Blue Score</strong></td>
</tr>
</table>
<h3 class="centered">Elimination Match Results</h3>
<table id="eliminationResultsTable" class="centered table table-striped table-bordered table-condensed">
<tr>
<td><strong>Match</strong></td>
<td><strong>Red 1</strong></td>
<td><strong>Red 2</strong></td>
<td><strong>Red 3</strong></td>
<td><strong>Blue 1</strong></td>
<td><strong>Blue 2</strong></td>
<td><strong>Blue 3</strong></td>
<td><strong>Red Score</strong></td>
<td><strong>Blue Score</strong></td>
</tr>
</table>
<script type="text/javascript">
$("document").ready( function() {
$.ajax( {
url: "getMatchResults.php",
type: "GET",
dataType: 'json',
success: function( matchResults ) {
var resultsTable;
for (var i = 0; i < matchResults.length; i++) {
if (matchResults[i].type === 'Q') {
resultsTable = document.getElementById('qualificationResultsTable');
} else if (matchResults[i].type === 'E') {
resultsTable = document.getElementById('eliminationResultsTable');
} else {
return;
}
var rowCount = resultsTable.rows.length;
var row = resultsTable.insertRow(rowCount);
var cell;
if (matchResults[i].type === 'E') {
var elimMatch = '';
switch(matchResults[i].matchNumber) {
case 1: elimMatch = 'QF 1-1'; break;
case 2: elimMatch = 'QF 2-1'; break;
case 3: elimMatch = 'QF 3-1'; break;
case 4: elimMatch = 'QF 4-1'; break;
case 5: elimMatch = 'QF 1-2'; break;
case 6: elimMatch = 'QF 2-2'; break;
case 7: elimMatch = 'QF 3-2'; break;
case 8: elimMatch = 'QF 4-2'; break;
case 9: elimMatch = 'QF 1-3'; break;
case 10: elimMatch = 'QF 2-3'; break;
case 10: elimMatch = 'QF 3-3'; break;
case 12: elimMatch = 'QF 4-3'; break;
case 13: elimMatch = 'SF 1-1'; break;
case 14: elimMatch = 'SF 2-1'; break;
case 15: elimMatch = 'SF 1-2'; break;
case 16: elimMatch = 'SF 2-2'; break;
case 17: elimMatch = 'SF 1-3'; break;
case 18: elimMatch = 'SF 2-3'; break;
case 19: elimMatch = 'F 1'; break;
case 20: elimMatch = 'F 2'; break;
case 21: elimMatch = 'F 3'; break;
}
row.insertCell(0).innerHTML = elimMatch;
} else {
row.insertCell(0).innerHTML = matchResults[i].matchNumber;
}
cell = row.insertCell(1);
cell.innerHTML = matchResults[i].red[0];
cell.className = 'redTeam';
cell = row.insertCell(2);
cell.innerHTML = matchResults[i].red[1];
cell.className = 'redTeam';
cell = row.insertCell(3);
cell.innerHTML = matchResults[i].red[2];
cell.className = 'redTeam';
cell = row.insertCell(4);
cell.innerHTML = matchResults[i].blue[0];
cell.className = 'blueTeam';
cell = row.insertCell(5);
cell.innerHTML = matchResults[i].blue[1];
cell.className = 'blueTeam';
cell = row.insertCell(6);
cell.innerHTML = matchResults[i].blue[2];
cell.className = 'blueTeam';
var redScore = matchResults[i].redFinal
var blueScore = matchResults[i].blueFinal;
cell = row.insertCell(7);
cell.innerHTML = redScore;
cell.className = (redScore > blueScore) ? 'redWinner' : 'redScore';
cell = row.insertCell(8);
cell.innerHTML = blueScore;
cell.className = (blueScore > redScore) ? 'blueWinner' : 'blueScore';
}
}
});
});
</script>
</div>
<img id="floral" src="./images/flower.png" alt=""/>
<div id="social">
<div class="fb-like" data-href="http://www.facebook.com/BrunswickEruption" data-send="false" data-layout="box_count" data-width="50" data-show-faces="false" data-font="lucida grande"></div>
<a href="https://twitter.com/BrunsEruption" class="twitter-follow-button" data-show-count="false" data-size="large" data-show-screen-name="false">Follow @BrunsEruption</a>
</div>
<div id="footer">
<div id="footerContent">
<a href="http://www.usfirst.org" target="_blank"> <img id="FIRSTlogo" src="images/FIRST_vert.gif" alt=""/></a>
<a href="http://www.raiderrobotix.org" target="_blank"> <img id="RaiderRobotixLogo" src="images/Team25Logo.png" alt=""/></a>
</div>
<div id="copyright">
Copyright Raider Robotix / Brunswick Eruption 2012
</div>
</div>
</body>
</html>