Small update
[Hockey-Test.git] / echl15-16 / php / xhtml.php
blob11bce7df5f8a17e0346a4b947b8dc280caf6dab6
1 <?php
2 if (!ob_start("ob_gzhandler")) {
3 ob_start();
5 date_default_timezone_set("UTC");
6 header("Content-Type: application/xhtml+xml; charset=UTF-8");
7 header("Content-Style-Type: text/css");
8 header("Content-Script-Type: text/javascript");
9 header("Content-Language: en");
10 header("Vary: Accept-Encoding,Cookie");
11 header("X-Content-Type-Options: nosniff");
12 header("X-UA-Compatible: IE=Edge");
13 header("Cache-Control: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
14 header("Pragma: private, no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0");
15 header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
16 header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
17 header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
18 $leaguename = "ECHL";
19 $fullurl = "http://localhost/hockey/echl/";
20 $fileurl = "xhtml.php";
21 if (isset($_SERVER['HTTPS'])) {
22 $fullurl = "https://".$_SERVER["SERVER_NAME"].str_replace("//", "/", dirname($_SERVER["SCRIPT_NAME"])."/");
24 if (!isset($_SERVER['HTTPS'])) {
25 $fullurl = "http://".$_SERVER["SERVER_NAME"].str_replace("//", "/", dirname($_SERVER["SCRIPT_NAME"])."/");
27 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
29 <!DOCTYPE html>
30 <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
31 <head>
32 <meta charset="UTF-8" />
33 <base href="<?php echo $fullurl; ?>" />
34 <title><?php echo $leaguename; ?> Games &amp; Team Stats</title>
35 </head>
36 <body>
37 <?php
38 if (!isset($_GET['act']) && isset($_GET['view'])) {
39 $_GET['act'] = "view";
41 if (!isset($_GET['act']) && isset($_GET['games'])) {
42 $_GET['act'] = "view";
44 if (!isset($_GET['act']) && isset($_GET['stats'])) {
45 $_GET['act'] = "stats";
47 if (!isset($_GET['act']) && isset($_GET['calendar'])) {
48 $_GET['act'] = "calendar";
50 if (!isset($_GET['order']) && isset($_GET['asc'])) {
51 $_GET['order'] = "ascending";
53 if (isset($_GET['order']) && $_GET['order'] == "asc") {
54 $_GET['order'] = "ascending";
56 if (!isset($_GET['order']) && isset($_GET['ascending'])) {
57 $_GET['order'] = "ascending";
59 if (!isset($_GET['order']) && isset($_GET['desc'])) {
60 $_GET['order'] = "descending";
62 if (isset($_GET['order']) && $_GET['order'] == "desc") {
63 $_GET['order'] = "descending";
65 if (!isset($_GET['order']) && isset($_GET['descending'])) {
66 $_GET['order'] = "descending";
68 if (!isset($_GET['order'])) {
69 $_GET['order'] = "descending";
71 if (isset($_GET['month']) && strlen($_GET['month']) == 1) {
72 $_GET['month'] = "0".$_GET['month'];
74 if (isset($_GET['day']) && strlen($_GET['day']) == 1) {
75 $_GET['day'] = "0".$_GET['day'];
77 if (isset($_GET['date']) && strlen($_GET['date']) == 8) {
78 $chckyear = substr($_GET['date'], 0, 4);
79 $chckmonth = substr($_GET['date'], 4, 2);
80 if ($chckmonth > 12) {
81 $chckmonth = $chckmonth = "12";
83 if ($chckmonth < 1) {
84 $chckmonth = $chckmonth = "01";
86 $chckday = substr($_GET['date'], 6, 2);
87 if ($chckday > gmdate("t", gmmktime(0, 0, 0, $chckmonth, 1, $chckyear))) {
88 $chckday = gmdate("t", gmmktime(0, 0, 0, $chckmonth, 1, $chckyear));
90 if ($chckday < 1) {
91 $chckday = "01";
93 $_GET['date'] = $chckyear.$chckmonth.$chckday;
95 if (isset($_GET['date']) && strlen($_GET['date']) == 6) {
96 $chckyear = substr($_GET['date'], 0, 4);
97 if ($chckmonth > 12) {
98 $chckmonth = $chckmonth = "12";
100 if ($chckmonth < 1) {
101 $chckmonth = $chckmonth = "01";
103 $chckmonth = substr($_GET['date'], 4, 2);
104 $_GET['date'] = $chckyear.$chckmonth;
106 if ((isset($_GET['day']) && strlen($_GET['day']) == 2)) {
107 if ((isset($_GET['year']) && strlen($_GET['year']) == 4)) {
108 if ((isset($_GET['month']) && strlen($_GET['month']) == 2)) {
109 if ($_GET['month'] > 12) {
110 $_GET['month'] = 12;
112 if ($_GET['month'] < 1) {
113 $_GET['month'] = "01";
115 if ($_GET['day'] < 1) {
116 $_GET['day'] = "01";
118 if ($_GET['day'] > gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']))) {
119 $_GET['day'] = gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']));
122 if ((!isset($_GET['month']) || strlen($_GET['month']) != 2)) {
123 $_GET['month'] = gmdate("m");
124 if ($_GET['day'] < 1) {
125 $_GET['day'] = "01";
127 if ($_GET['day'] > gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']))) {
128 $_GET['day'] = gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']));
132 if ((!isset($_GET['year']) || strlen($_GET['year']) != 4)) {
133 if ((isset($_GET['month']) && strlen($_GET['month']) == 2)) {
134 if ($_GET['month'] > 12) {
135 $_GET['month'] = 12;
137 if ($_GET['month'] < 1) {
138 $_GET['month'] = "01";
140 $_GET['year'] = gmdate("Y");
141 if ($_GET['day'] < 1) {
142 $_GET['day'] = "01";
144 if ($_GET['day'] > gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']))) {
145 $_GET['day'] = gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']));
148 if ((!isset($_GET['month']) || strlen($_GET['month']) != 2)) {
149 if ($_GET['month'] > 12) {
150 $_GET['month'] = 12;
152 if ($_GET['month'] < 1) {
153 $_GET['month'] = "01";
155 $_GET['year'] = gmdate("Y");
156 $_GET['month'] = gmdate("m");
157 if ($_GET['day'] < 1) {
158 $_GET['day'] = "01";
160 if ($_GET['day'] > gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']))) {
161 $_GET['day'] = gmdate("t", gmmktime(0, 0, 0, $_GET['month'], 1, $_GET['year']));
166 if (!isset($_GET['year']) && isset($_GET['month']) && isset($_GET['day']) &&
167 is_numeric($_GET['month']) && is_numeric($_GET['day']) &&
168 strlen($_GET['month']) == 2 && strlen($_GET['day']) == 2) {
169 $_GET['date'] = gmdate("Y").$_GET['month'].$_GET['day'];
171 if (isset($_GET['year']) && isset($_GET['month']) && isset($_GET['day']) &&
172 is_numeric($_GET['year']) && is_numeric($_GET['month']) && is_numeric($_GET['day']) &&
173 strlen($_GET['year']) >= 4 && strlen($_GET['month']) == 2 && strlen($_GET['day']) == 2) {
174 $_GET['date'] = $_GET['year'].$_GET['month'].$_GET['day'];
176 if ($_GET['act'] == "stats") {
177 if (!isset($_GET['conference'])) {
178 $_GET['conference'] = "All";
180 if (!isset($_GET['division'])) {
181 $_GET['division'] = "All";
184 if (!isset($_GET['act'])) {
185 $_GET['act'] = "calendar";
187 if ($_GET['act'] != "view" && $_GET['act'] != "games" && $_GET['act'] != "stats" && $_GET['act'] != "calendar") {
188 $_GET['act'] = "calendar";
190 if (file_exists("./echl15-16.db3")) {
191 $sqldb = new SQLite3("./echl15-16.db3");
192 } else {
193 $sqldb = new SQLite3("../hockey15-16.db3");
195 $sqldb->exec("PRAGMA encoding = \"UTF-8\";");
196 $sqldb->exec("PRAGMA auto_vacuum = 1;");
197 $sqldb->exec("PRAGMA foreign_keys = 1;");
198 $sqlite_games_string = "";
199 $firstgamedate = $sqldb->querySingle("SELECT Date FROM ".$leaguename."Games WHERE id=1");
200 $lastgamedate = $sqldb->querySingle("SELECT Date FROM ".$leaguename."Games WHERE id=(SELECT MAX(id) FROM ".$leaguename."Games)");
201 if ($lastgamedate < gmdate("Y").gmdate("m").gmdate("d")) {
202 $lastgamedate = gmdate("Y").gmdate("m").gmdate("d");
204 if ($_GET['act'] == "calendar") {
205 if (isset($_GET['date']) && strlen($_GET['date']) == 8) {
206 if (!isset($_GET['month']) || !is_numeric($_GET['month'])) {
207 $_GET['month'] = substr($_GET['date'], 4, 2);
209 if (!isset($_GET['year']) || !is_numeric($_GET['year'])) {
210 $_GET['year'] = substr($_GET['date'], 0, 4);
213 if (isset($_GET['date']) && strlen($_GET['date']) == 6) {
214 if (!isset($_GET['month']) || !is_numeric($_GET['month'])) {
215 $_GET['month'] = substr($_GET['date'], 4, 2);
217 if (!isset($_GET['year']) || !is_numeric($_GET['year'])) {
218 $_GET['year'] = substr($_GET['date'], 0, 4);
221 if (!isset($_GET['month']) || !is_numeric($_GET['month']) or !strlen($_GET['month']) == 2) {
222 $_GET['month'] = gmdate("m");
224 if (!isset($_GET['date']) && is_numeric($_GET['month']) && strlen($_GET['month']) == 2) {
225 if (!isset($_GET['year']) || !is_numeric($_GET['year']) || strlen($_GET['year']) < 4) {
226 $_GET['year'] = gmdate("Y");
228 $startday = $_GET['year'].$_GET['month']."01";
229 $tmplastdaymonth = gmdate("t", gmmktime(12, 30, 0, intval($_GET['month']), 1, intval($_GET['year'])));
230 $endday = $_GET['year'].$_GET['month'].$tmplastdaymonth;
232 $curtimestamp = gmmktime(12, 30, 0, intval($_GET['month']), 1, intval($_GET['year']));
233 $weekdaystart = intval(gmdate("w", $curtimestamp));
234 $numofdays = intval(gmdate("t", $curtimestamp));
235 $endtimestamp = gmmktime(12, 30, 0, intval($_GET['month']), $numofdays, intval($_GET['year']));
236 $weekdayend = intval(gmdate("w", $endtimestamp));
237 $monthonly = gmdate("F", $curtimestamp);
238 $yearonly = gmdate("Y", $curtimestamp);
239 $monthyear = $monthonly." ".$yearonly;
240 $daycount = 1;
241 $daynextcount = 1;
242 $prevmonth = intval($_GET['month']);
243 $prevmonthyear = intval($_GET['year']);
244 if ($prevmonth > 1) {
245 $prevmonth -= 1;
247 if ($prevmonth <= 1) {
248 $prevmonth = 12;
249 $prevmonthyear -= 1;
251 $prevmonthstamp = gmmktime(12, 30, 0, intval($prevmonth), 1, intval($prevmonthyear));
252 $prevmonthonly = gmdate("F", $prevmonthstamp);
253 $prevyearonly = gmdate("Y", $prevmonthstamp);
254 $prevmonthyear = $prevmonthonly." ".$prevyearonly;
255 $nextmonth = intval($_GET['month']);
256 $nextmonthyear = intval($_GET['year']);
257 if ($nextmonth < 12) {
258 $nextmonth += 1;
260 if ($nextmonth >= 12) {
261 $nextmonth = 1;
262 $nextmonthyear += 1;
264 $nextmonthstamp = gmmktime(12, 30, 0, intval($nextmonth), 1, intval($nextmonthyear));
265 $nextmonthonly = gmdate("F", $nextmonthstamp);
266 $nextyearonly = gmdate("Y", $nextmonthstamp);
267 $nextmonthyear = $nextmonthonly." ".$nextyearonly;
268 echo " <table style=\"width: 100%;\">\n";
269 echo " <tr>\n <th><a href=\"".$fileurl."?calendar&amp;date=".urlencode(gmdate("Y", $prevmonthstamp).gmdate("m", $prevmonthstamp))."\">".$prevmonthyear."</a></th>\n <th colspan=\"5\"><a href=\"".$fileurl."?games&amp;date=".urlencode(gmdate("Y", $curtimestamp).gmdate("m", $curtimestamp))."\">".$monthyear."</a></th>\n <th><a href=\"".$fileurl."?calendar&amp;date=".urlencode(gmdate("Y", $nextmonthstamp).gmdate("m", $nextmonthstamp))."\">".$nextmonthyear."</a></th>\n </tr>\n";
270 echo " <tr>\n <td style=\"width: 14%; font-weight: bold;\">Sunday</td>\n <td style=\"width: 14%; font-weight: bold;\">Monday</td>\n <td style=\"width: 14%; font-weight: bold;\">Tuesday</td>\n <td style=\"width: 14%; font-weight: bold;\">Wednesday</td>\n <td style=\"width: 14%; font-weight: bold;\">Thursday</td>\n <td style=\"width: 14%; font-weight: bold;\">Friday</td>\n <td style=\"width: 14%; font-weight: bold;\">Saturday</td>\n </tr>\n";
271 while ($daynextcount <= $weekdaystart) {
272 if ($daynextcount == 1) {
273 echo " <tr>\n";
275 echo " <td style=\"width: 14%; height: 100px; vertical-align: top;\">&#xA0;</td>\n";
276 $daynextcount += 1;
278 while ($daycount <= $numofdays) {
279 $daycheck = $daycount;
280 if (strlen($daycount) == 1) {
281 $daycheck = "0".$daycount;
283 $numofgames = 0;
284 if ($_GET['year'].$_GET['month'].$daycheck >= $firstgamedate && $_GET['year'].$_GET['month'].$daycheck <= $lastgamedate) {
285 $prenumofgames = $sqldb->query("SELECT COUNT(*) as count FROM ".$leaguename."Games WHERE Date=".$_GET['year'].$_GET['month'].$daycheck." ORDER BY Date DESC, id DESC");
286 $numofgamesarray = $prenumofgames->fetchArray();
287 $numofgames = intval($numofgamesarray['count']);
288 $gamedaystr = $daycount;
289 $numgamesstr = "No Games";
291 if ($_GET['year'].$_GET['month'].$daycheck < $firstgamedate || $_GET['year'].$_GET['month'].$daycheck > $lastgamedate) {
292 $gamedaystr = $daycount;
293 $numgamesstr = "&#xA0;";
295 if ($_GET['year'].$_GET['month'].$daycheck >= $firstgamedate && $_GET['year'].$_GET['month'].$daycheck <= $lastgamedate) {
296 if ($numofgames > 0) {
297 $gamedaystr = "<a href=\"".$fileurl."?games&amp;date=".urlencode(gmdate("Y", $curtimestamp).gmdate("m", $curtimestamp).$daycheck)."\">".$daycount."</a>";
299 if ($numofgames == 1) {
300 $numgamesstr = "1 Game";
302 if ($numofgames > 1) {
303 $numgamesstr = $numofgames." Games";
306 if ($daynextcount == 1) {
307 echo " <tr>\n";
309 echo " <td style=\"width: 14%; height: 100px; vertical-align: top;\">".$gamedaystr."<br /><br /><div style=\"text-align: center;\">".$numgamesstr."</div></td>\n";
310 if ($daynextcount == 7) {
311 echo " </tr>\n";
312 $daynextcount = 0;
314 $daynextcount += 1;
315 $daycount += 1;
317 if ($daynextcount > 1) {
318 while ($daynextcount <= 7) {
319 if ($daynextcount == 1) {
320 echo " <tr>\n";
322 echo " <td style=\"width: 14%; height: 100px; vertical-align: top;\">&#xA0;</td>\n";
323 if ($daynextcount == 7) {
324 echo " </tr>\n";
326 $daynextcount += 1;
329 echo " </table>\n";
331 if ($_GET['act'] == "view") {
332 $SelectWhere = "";
333 $SelectWhereNext = false;
334 if (isset($_GET['date']) && is_numeric($_GET['date']) && strlen($_GET['date']) == 8) {
335 $SelectWhere = "WHERE Date=".$sqldb->escapeString($_GET['date'])." ";
336 $SelectWhereNext = true;
338 if (isset($_GET['date']) && is_numeric($_GET['date']) && strlen($_GET['date']) == 6) {
339 $getyear = substr($_GET['date'], 0, 4);
340 $getmonth = substr($_GET['date'], 4, 2);
341 $startday = $getyear.$getmonth."01";
342 $tmplastdaymonth = gmdate("t", gmmktime(12, 30, 0, intval($_GET['month']), 1, intval($_GET['year'])));
343 $endday = $getyear.$getmonth.$tmplastdaymonth;
344 $SelectWhere = "WHERE (Date>=".$sqldb->escapeString($startday)." AND Date<=".$sqldb->escapeString($endday).") ";
345 $SelectWhereNext = true;
347 if (!isset($_GET['month']) || !is_numeric($_GET['month']) or !strlen($_GET['month']) == 2) {
348 $_GET['month'] = gmdate("m");
350 if (!isset($_GET['date']) && is_numeric($_GET['month']) && strlen($_GET['month']) == 2) {
351 if (!isset($_GET['year']) || !is_numeric($_GET['year']) || strlen($_GET['year']) < 4) {
352 $_GET['year'] = gmdate("Y");
354 $startday = $_GET['year'].$_GET['month']."01";
355 $tmplastdaymonth = gmdate("t", gmmktime(12, 30, 0, intval($_GET['month']), 1, intval($_GET['year'])));
356 $endday = $_GET['year'].$_GET['month'].$tmplastdaymonth;
357 $SelectWhere = "WHERE (Date>=".$sqldb->escapeString($startday)." AND Date<=".$sqldb->escapeString($endday).") ";
358 $SelectWhereNext = true;
360 if (isset($_GET['team'])) {
361 if ($SelectWhereNext == true) {
362 $SelectWhere .= " AND (HomeTeam='".$sqldb->escapeString($_GET['team'])."' OR AwayTeam='".$sqldb->escapeString($_GET['team'])."') ";
364 if ($SelectWhereNext == false) {
365 $SelectWhere = "WHERE (HomeTeam='".$sqldb->escapeString($_GET['team'])."' OR AwayTeam='".$sqldb->escapeString($_GET['team'])."') ";
366 $SelectWhereNext = true;
369 if (!isset($_GET['order'])) {
370 $_GET['order'] = "descending";
372 if ($_GET['order'] == "asc" || $_GET['order'] == "ascending") {
373 $results = $sqldb->query("SELECT * FROM ".$leaguename."Games ".$SelectWhere."ORDER BY Date ASC, id ASC");
375 if ($_GET['order'] == "desc" || $_GET['order'] == "descending") {
376 $results = $sqldb->query("SELECT * FROM ".$leaguename."Games ".$SelectWhere."ORDER BY Date DESC, id DESC");
378 echo "<table style=\"width: 100%;\">\n";
379 while ($row = $results->fetchArray()) {
380 $toneres = $sqldb->querySingle("SELECT CityName, TeamName, FullName FROM ".$leaguename."Teams WHERE FullName='".$sqldb->escapeString($row['HomeTeam'])."'", true);
381 $ttwores = $sqldb->querySingle("SELECT CityName, TeamName, FullName FROM ".$leaguename."Teams WHERE FullName='".$sqldb->escapeString($row['AwayTeam'])."'", true);
382 $tarenares = $sqldb->querySingle("SELECT CityName, ArenaName, FullArenaName FROM ".$leaguename."Arenas WHERE FullArenaName='".$sqldb->escapeString($row['AtArena'])."'", true);
383 if ($row['NumberPeriods'] == 3) {
384 $PerPeriodScore = explode(",", $row['TeamScorePeriods']);
385 $PerTeamScoreOne = explode(":", $PerPeriodScore[0]);
386 $PerTeamScoreTwo = explode(":", $PerPeriodScore[1]);
387 $PerTeamScoreThree = explode(":", $PerPeriodScore[2]);
388 $PerTeamScoreTotal = explode(":", $row['TeamFullScore']);
389 $PerPeriodSOG = explode(",", $row['ShotsOnGoal']);
390 $PerTeamSOGOne = explode(":", $PerPeriodSOG[0]);
391 $PerTeamSOGTwo = explode(":", $PerPeriodSOG[1]);
392 $PerTeamSOGThree = explode(":", $PerPeriodSOG[2]);
393 $PerTeamSOGTotal = explode(":", $row['FullShotsOnGoal']);
394 $tonebold = "";
395 if ($PerTeamScoreTotal[0] > $PerTeamScoreTotal[1]) {
396 $tonebold = " font-weight: bold;";
398 $ttwobold = "";
399 if ($PerTeamScoreTotal[0] < $PerTeamScoreTotal[1]) {
400 $ttwobold = " font-weight: bold;";
402 $LineOne = " <tr>\n <th colspan=\"7\"><a href=\"x".$fileurl."?games&amp;date=".urlencode($row['Date'])."&amp;team=".urlencode($toneres['FullName'])."&amp;#".$leaguename."Game-".urlencode($row['Date'])."-".urlencode(preg_replace('/\s+/', '', $toneres['FullName']))."-vs-".urlencode(preg_replace('/\s+/', '', $ttwores['FullName']))."\" id=\"".$leaguename."Game-".$row['Date']."-".preg_replace('/\s+/', '', htmlspecialchars($toneres['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8"))."-vs-".preg_replace('/\s+/', '', htmlspecialchars($ttwores['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8"))."\">".htmlspecialchars($toneres['TeamName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." vs ".htmlspecialchars($ttwores['TeamName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." at ".htmlspecialchars($tarenares['ArenaName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." on ".substr($row['Date'], 4, 2)."/".substr($row['Date'], 6, 2)."/".substr($row['Date'], 0, 4)."</a></th>\n </tr>\n <tr>\n <th>Teams</th>\n <th>1st</th>\n <th>2nd</th>\n <th>3rd</th>\n <th>&#xA0;</th>\n <th>&#xA0;</th>\n <th>Total</th>\n </tr>\n <tr>\n <td style=\"text-align: center;".$tonebold."\"><a href=\"x".$fileurl."?games&amp;team=".urlencode($toneres['FullName'])."\">".htmlspecialchars($toneres['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$PerTeamScoreOne[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTwo[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreThree[0]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTotal[0]."</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">Shots on Goal</td>\n <td style=\"text-align: center;\">".$PerTeamSOGOne[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTwo[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGThree[0]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTotal[0]."</td>\n </tr>\n <tr>\n <th>Teams</th>\n <th>1st</th>\n <th>2nd</th>\n <th>3rd</th>\n <th>&#xA0;</th>\n <th>&#xA0;</th>\n <th>Total</th>\n </tr>\n <tr>\n <td style=\"text-align: center;".$ttwobold."\"><a href=\"x".$fileurl."?games&amp;team=".urlencode($ttwores['FullName'])."\">".htmlspecialchars($ttwores['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$PerTeamScoreOne[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTwo[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreThree[1]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTotal[1]."</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">Shots on Goal</td>\n <td style=\"text-align: center;\">".$PerTeamSOGOne[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTwo[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGThree[1]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTotal[1]."</td>\n </tr>\n";
404 if ($row['NumberPeriods'] == 4) {
405 $PerPeriodScore = explode(",", $row['TeamScorePeriods']);
406 $PerTeamScoreOne = explode(":", $PerPeriodScore[0]);
407 $PerTeamScoreTwo = explode(":", $PerPeriodScore[1]);
408 $PerTeamScoreThree = explode(":", $PerPeriodScore[2]);
409 $PerTeamScoreFour = explode(":", $PerPeriodScore[3]);
410 $PerTeamScoreTotal = explode(":", $row['TeamFullScore']);
411 $PerPeriodSOG = explode(",", $row['ShotsOnGoal']);
412 $PerTeamSOGOne = explode(":", $PerPeriodSOG[0]);
413 $PerTeamSOGTwo = explode(":", $PerPeriodSOG[1]);
414 $PerTeamSOGThree = explode(":", $PerPeriodSOG[2]);
415 $PerTeamSOGFour = explode(":", $PerPeriodSOG[3]);
416 $PerTeamSOGTotal = explode(":", $row['FullShotsOnGoal']);
417 $tonebold = "";
418 if ($PerTeamScoreTotal[0] > $PerTeamScoreTotal[1]) {
419 $tonebold = " font-weight: bold;";
421 $ttwobold = "";
422 if ($PerTeamScoreTotal[0] < $PerTeamScoreTotal[1]) {
423 $ttwobold = " font-weight: bold;";
425 $LineOne = " <tr>\n <th colspan=\"7\"><a href=\"x".$fileurl."?games&amp;date=".urlencode($row['Date'])."&amp;team=".urlencode($toneres['FullName'])."&amp;#".$leaguename."Game-".$row['Date']."-".urlencode(preg_replace('/\s+/', '', $toneres['FullName']))."-vs-".urlencode(preg_replace('/\s+/', '', $ttwores['FullName']))."\" id=\"".$leaguename."Game-".urlencode($row['Date'])."-".preg_replace('/\s+/', '', htmlspecialchars($toneres['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8"))."-vs-".preg_replace('/\s+/', '', htmlspecialchars($ttwores['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8"))."\">".htmlspecialchars($toneres['TeamName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." vs ".htmlspecialchars($ttwores['TeamName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." at ".htmlspecialchars($tarenares['ArenaName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." on ".substr($row['Date'], 4, 2)."/".substr($row['Date'], 6, 2)."/".substr($row['Date'], 0, 4)."</a></th>\n </tr>\n <tr>\n <th>Teams</th>\n <th>1st</th>\n <th>2nd</th>\n <th>3rd</th>\n <th>OT</th>\n <th>&#xA0;</th>\n <th>Total</th>\n </tr>\n <tr>\n <td style=\"text-align: center;".$tonebold."\"><a href=\"x".$fileurl."?games&amp;team=".urlencode($toneres['FullName'])."\">".htmlspecialchars($toneres['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$PerTeamScoreOne[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTwo[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreThree[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreFour[0]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTotal[0]."</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">Shots on Goal</td>\n <td style=\"text-align: center;\">".$PerTeamSOGOne[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTwo[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGThree[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGFour[0]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTotal[0]."</td>\n </tr>\n <tr>\n <th>Teams</th>\n <th>1st</th>\n <th>2nd</th>\n <th>3rd</th>\n <th>OT</th>\n <th>&#xA0;</th>\n <th>Total</th>\n </tr>\n <tr>\n <td style=\"text-align: center;".$ttwobold."\"><a href=\"x".$fileurl."?games&amp;team=".urlencode($ttwores['FullName'])."\">".htmlspecialchars($ttwores['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$PerTeamScoreOne[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTwo[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreThree[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreFour[1]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTotal[1]."</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">Shots on Goal</td>\n <td style=\"text-align: center;\">".$PerTeamSOGOne[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTwo[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGThree[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGFour[1]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTotal[1]."</td>\n </tr>\n";
427 if ($row['NumberPeriods'] == 5) {
428 $PerPeriodScore = explode(",", $row['TeamScorePeriods']);
429 $PerTeamScoreOne = explode(":", $PerPeriodScore[0]);
430 $PerTeamScoreTwo = explode(":", $PerPeriodScore[1]);
431 $PerTeamScoreThree = explode(":", $PerPeriodScore[2]);
432 $PerTeamScoreFour = explode(":", $PerPeriodScore[3]);
433 $PerTeamScoreFive = explode(":", $PerPeriodScore[4]);
434 $PerTeamScoreTotal = explode(":", $row['TeamFullScore']);
435 $PerPeriodSOG = explode(",", $row['ShotsOnGoal']);
436 $PerTeamSOGOne = explode(":", $PerPeriodSOG[0]);
437 $PerTeamSOGTwo = explode(":", $PerPeriodSOG[1]);
438 $PerTeamSOGThree = explode(":", $PerPeriodSOG[2]);
439 $PerTeamSOGFour = explode(":", $PerPeriodSOG[3]);
440 $PerTeamSOGTotal = explode(":", $row['FullShotsOnGoal']);
441 $tonebold = "";
442 if ($PerTeamScoreTotal[0] > $PerTeamScoreTotal[1]) {
443 $tonebold = " font-weight: bold;";
445 $ttwobold = "";
446 if ($PerTeamScoreTotal[0] < $PerTeamScoreTotal[1]) {
447 $ttwobold = " font-weight: bold;";
449 $LineOne = " <tr>\n <th colspan=\"7\"><a href=\"x".$fileurl."?games&amp;date=".urlencode($row['Date'])."&amp;team=".urlencode($toneres['FullName'])."&amp;#".$leaguename."Game-".$row['Date']."-".urlencode(preg_replace('/\s+/', '', $toneres['FullName']))."-vs-".urlencode(preg_replace('/\s+/', '', $ttwores['FullName']))."\" id=\"".$leaguename."Game-".urlencode($row['Date'])."-".preg_replace('/\s+/', '', htmlspecialchars($toneres['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8"))."-vs-".preg_replace('/\s+/', '', htmlspecialchars($ttwores['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8"))."\">".htmlspecialchars($toneres['TeamName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." vs ".htmlspecialchars($ttwores['TeamName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." at ".htmlspecialchars($tarenares['ArenaName'], ENT_COMPAT | ENT_XHTML, "UTF-8")." on ".substr($row['Date'], 4, 2)."/".substr($row['Date'], 6, 2)."/".substr($row['Date'], 0, 4)."</a></th>\n </tr>\n <tr>\n <th>Teams</th>\n <th>1st</th>\n <th>2nd</th>\n <th>3rd</th>\n <th>OT</th>\n <th>SO</th>\n <th>Total</th>\n </tr>\n <tr>\n <td style=\"text-align: center;".$tonebold."\"><a href=\"x".$fileurl."?games&amp;team=".urlencode($toneres['FullName'])."\">".htmlspecialchars($toneres['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$PerTeamScoreOne[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTwo[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreThree[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreFour[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreFive[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTotal[0]."</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">Shots on Goal</td>\n <td style=\"text-align: center;\">".$PerTeamSOGOne[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTwo[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGThree[0]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGFour[0]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTotal[0]."</td>\n </tr>\n <tr>\n <th>Teams</th>\n <th>1st</th>\n <th>2nd</th>\n <th>3rd</th>\n <th>OT</th>\n <th>SO</th>\n <th>Total</th>\n </tr>\n <tr>\n <td style=\"text-align: center;".$ttwobold."\"><a href=\"x".$fileurl."?games&amp;team=".urlencode($ttwores['FullName'])."\">".htmlspecialchars($ttwores['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$PerTeamScoreOne[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTwo[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreThree[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreFour[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreFive[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamScoreTotal[1]."</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">Shots on Goal</td>\n <td style=\"text-align: center;\">".$PerTeamSOGOne[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTwo[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGThree[1]."</td>\n <td style=\"text-align: center;\">".$PerTeamSOGFour[1]."</td>\n <td style=\"text-align: center;\">&#xA0;</td>\n <td style=\"text-align: center;\">".$PerTeamSOGTotal[1]."</td>\n </tr>\n";
451 echo $LineOne."\n <tr>\n <td colspan=\"7\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n <tr>\n <td colspan=\"7\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n";
453 echo "</table>\n<div>&#xA0;<br />&#xA0;</div>\n\n";
455 if ($_GET['act'] == "stats") {
456 $SelectWhere = "";
457 $SelectWhereNext = false;
458 if (isset($_GET['date']) && is_numeric($_GET['date']) && strlen($_GET['date']) == 8) {
459 $SelectWhere = "WHERE Date<=".$sqldb->escapeString($_GET['date'])." ";
460 $SelectWhereNext = true;
462 $sqldb->exec("CREATE TEMP TABLE ".$leaguename."Standings AS SELECT * FROM ".$leaguename."Stats ".$SelectWhere." GROUP BY TeamID ORDER BY TeamID ASC, Date DESC");
463 echo "<table style=\"width: 100%;\">";
464 $tresults = $sqldb->query("SELECT * FROM ".$leaguename."Standings ORDER BY Points DESC, GamesPlayed ASC, TWins DESC, Losses ASC, GoalsDifference DESC");
465 echo "\n <tr>\n <th colspan=\"18\"><a href=\"index.php?stats&amp;#OverallStats\" id=\"OverallStats\">".$leaguename." Team Stats &amp; Standings</a></th>\n </tr>";
466 echo "\n <tr>\n <th colspan=\"2\">Team</th>\n <th>GP</th>\n <th>W</th>\n <th>L</th>\n <th>OTL</th>\n <th>SOL</th>\n <th>P</th>\n <th>PCT</th>\n <th>ROW</th>\n <th>GF</th>\n <th>GA</th>\n <th>DIFF</th>\n <th>Home</th>\n <th>Away</th>\n <th>S/O</th>\n <th>L10</th>\n <th>Streak</th>\n </tr>";
467 $teamplace = 1;
468 while ($trow = $tresults->fetchArray()) {
469 if ($trow['Shootouts'] == "0:0") {
470 $trow['Shootouts'] = "-";
472 if ($trow['GoalsDifference'] == "0") {
473 $trow['GoalsDifference'] = "E";
475 echo "\n <tr>\n <td style=\"text-align: center;\">".$teamplace."</td>\n <td style=\"text-align: center;\"><a href=\"x".$fileurl."?games&amp;date=".urlencode($trow['Date'])."&amp;team=".urlencode($trow['FullName'])."\">".htmlspecialchars($trow['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$trow['GamesPlayed']."</td>\n <td style=\"text-align: center;\">".$trow['TWins']."</td>\n <td style=\"text-align: center;\">".$trow['Losses']."</td>\n <td style=\"text-align: center;\">".$trow['OTLosses']."</td>\n <td style=\"text-align: center;\">".$trow['SOLosses']."</td>\n <td style=\"text-align: center;\">".$trow['Points']."</td>\n <td style=\"text-align: center;\">".number_format($trow['PCT'], 3)."</td>\n <td style=\"text-align: center;\">".$trow['ROW']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsFor']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsAgainst']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsDifference']."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['HomeRecord'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['AwayRecord'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['Shootouts'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['LastTen'])."</td>\n <td style=\"text-align: center;\">".$trow['Streak']."</td>\n </tr>";
476 $teamplace += 1;
478 $conresults = $sqldb->query("SELECT * FROM ".$leaguename."Conferences");
479 while ($conrow = $conresults->fetchArray()) {
480 if ($_GET['conference'] == "All" || $_GET['conference'] == $conrow['Conference']) {
481 echo " <tr>\n <td colspan=\"18\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n <tr>\n <td colspan=\"18\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n";
482 $tresults = $sqldb->query("SELECT * FROM ".$leaguename."Standings WHERE Conference='".$sqldb->escapeString($conrow['Conference'])."' ORDER BY Points DESC, GamesPlayed ASC, TWins DESC, Losses ASC, GoalsDifference DESC");
483 echo "\n <tr>\n <th colspan=\"18\"><a href=\"index.php?stats&amp;#".$conrow['Conference']."ConferenceStats\" id=\"".$conrow['Conference']."ConferenceStats\">".$leaguename." ".$conrow['Conference']." Conference Stats &amp; Standings</a></th>\n </tr>";
484 echo "\n <tr>\n <th colspan=\"2\">Team</th>\n <th>GP</th>\n <th>W</th>\n <th>L</th>\n <th>OTL</th>\n <th>SOL</th>\n <th>P</th>\n <th>PCT</th>\n <th>ROW</th>\n <th>GF</th>\n <th>GA</th>\n <th>DIFF</th>\n <th>Home</th>\n <th>Away</th>\n <th>S/O</th>\n <th>L10</th>\n <th>Streak</th>\n </tr>";
485 $teamplace = 1;
486 while ($trow = $tresults->fetchArray()) {
487 if ($trow['Shootouts'] == "0:0") {
488 $trow['Shootouts'] = "-";
490 if ($trow['GoalsDifference'] == "0") {
491 $trow['GoalsDifference'] = "E";
493 echo "\n <tr>\n <td style=\"text-align: center;\">".$teamplace."</td>\n <td style=\"text-align: center;\"><a href=\"x".$fileurl."?games&amp;date=".urlencode($trow['Date'])."&amp;team=".urlencode($trow['FullName'])."\">".htmlspecialchars($trow['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$trow['GamesPlayed']."</td>\n <td style=\"text-align: center;\">".$trow['TWins']."</td>\n <td style=\"text-align: center;\">".$trow['Losses']."</td>\n <td style=\"text-align: center;\">".$trow['OTLosses']."</td>\n <td style=\"text-align: center;\">".$trow['SOLosses']."</td>\n <td style=\"text-align: center;\">".$trow['Points']."</td>\n <td style=\"text-align: center;\">".number_format($trow['PCT'], 3)."</td>\n <td style=\"text-align: center;\">".$trow['ROW']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsFor']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsAgainst']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsDifference']."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['HomeRecord'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['AwayRecord'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['Shootouts'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['LastTen'])."</td>\n <td style=\"text-align: center;\">".$trow['Streak']."</td>\n </tr>";
494 $teamplace += 1;
498 $divresults = $sqldb->query("SELECT * FROM ".$leaguename."Divisions");
499 while ($divrow = $divresults->fetchArray()) {
500 if ($_GET['division'] == "All" || $_GET['division'] == $divrow['Division']) {
501 echo " <tr>\n <td colspan=\"18\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n <tr>\n <td colspan=\"18\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n";
502 $tresults = $sqldb->query("SELECT * FROM ".$leaguename."Standings WHERE Division='".$sqldb->escapeString($divrow['Division'])."' ORDER BY Points DESC, GamesPlayed ASC, TWins DESC, Losses ASC, GoalsDifference DESC");
503 echo "\n <tr>\n <th colspan=\"18\"><a href=\"index.php?stats&amp;#".$divrow['Division']."DivisionStats\" id=\"".$divrow['Division']."DivisionStats\">".$leaguename." ".$divrow['Division']." Division Team Stats &amp; Standings</a></th>\n </tr>";
504 echo "\n <tr>\n <th colspan=\"2\">Team</th>\n <th>GP</th>\n <th>W</th>\n <th>L</th>\n <th>OTL</th>\n <th>SOL</th>\n <th>P</th>\n <th>PCT</th>\n <th>ROW</th>\n <th>GF</th>\n <th>GA</th>\n <th>DIFF</th>\n <th>Home</th>\n <th>Away</th>\n <th>S/O</th>\n <th>L10</th>\n <th>Streak</th>\n </tr>";
505 $teamplace = 1;
506 while ($trow = $tresults->fetchArray()) {
507 if ($trow['Shootouts'] == "0:0") {
508 $trow['Shootouts'] = "-";
510 if ($trow['GoalsDifference'] == "0") {
511 $trow['GoalsDifference'] = "E";
513 echo "\n <tr>\n <td style=\"text-align: center;\">".$teamplace."</td>\n <td style=\"text-align: center;\"><a href=\"x".$fileurl."?games&amp;date=".urlencode($trow['Date'])."&amp;team=".urlencode($trow['FullName'])."\">".htmlspecialchars($trow['FullName'], ENT_COMPAT | ENT_XHTML, "UTF-8")."</a></td>\n <td style=\"text-align: center;\">".$trow['GamesPlayed']."</td>\n <td style=\"text-align: center;\">".$trow['TWins']."</td>\n <td style=\"text-align: center;\">".$trow['Losses']."</td>\n <td style=\"text-align: center;\">".$trow['OTLosses']."</td>\n <td style=\"text-align: center;\">".$trow['SOLosses']."</td>\n <td style=\"text-align: center;\">".$trow['Points']."</td>\n <td style=\"text-align: center;\">".number_format($trow['PCT'], 3)."</td>\n <td style=\"text-align: center;\">".$trow['ROW']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsFor']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsAgainst']."</td>\n <td style=\"text-align: center;\">".$trow['GoalsDifference']."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['HomeRecord'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['AwayRecord'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['Shootouts'])."</td>\n <td style=\"text-align: center;\">".str_replace(":", "-", $trow['LastTen'])."</td>\n <td style=\"text-align: center;\">".$trow['Streak']."</td>\n </tr>";
514 $teamplace += 1;
518 echo " <tr>\n <td colspan=\"18\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n <tr>\n <td colspan=\"18\" style=\"text-align: center;\">&#xA0;</td>\n </tr>\n";
519 echo "\n</table>\n<div>&#xA0;<br />&#xA0;</div>\n\n";
522 </body>
523 </html>