-
Notifications
You must be signed in to change notification settings - Fork 0
/
meet.php
1473 lines (1371 loc) · 85.7 KB
/
meet.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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
include "db.php";
if (!isset($_GET["id"])) {
http_response_code(400);
header('Location: /notfound?from=meets&id=null');
exit();
}
$id = htmlspecialchars($_GET["id"]);
if (strpos($_GET["id"], '/') !== false) {
list($urlslug, $year) = explode("/", $id, 2);
$result = mysqli_query($con, "SELECT * FROM meets WHERE Date LIKE '" . $year . "-%' AND Series = '" . $urlslug . "'");
} else {
$result = mysqli_query($con, "SELECT * FROM meets WHERE id='" . $_GET["id"] . "'");
}
if (mysqli_num_rows($result) == 0) {
http_response_code(404);
header('Location: /notfound?from=meets&id=' . $id);
exit();
}
while ($row = mysqli_fetch_array($result)) {
$id = $row['id'];
if (!empty($row['Series']) && empty($urlslug)) {
$year = date("Y", strtotime($row['Date']));
http_response_code(301);
header('Location: /meet/' . $row['Series'] . "/" . $year);
}
$require = "meet";
$name = $row['Name'];
$date = date("l, F d, Y", strtotime($row['Date']));
$unformatteddate = $row['Date'];
$location = $row['Location'];
$athnet = $row['AthNet'];
$message = $row['Message'];
$notes = $row['Notes'];
$season = $row['Season'];
$live = $row['Live'];
$stream = $row['Stream'];
$results = $row['Results'];
$series = $row['Series'];
$website = $row['Website'];
$weather = $row['Weather'];
$levels = $row['Levels'];
$status = $row['Status'];
$heat = $row['Heats'];
$tickets = $row['Tickets'];
$schedule = $row['Schedule'];
$opponentsArray = explode(", ", $row['Opponents']);
$official = $row['Official']; //Two Day
if (!empty($row['Day2Time'])) {
$date = $date . " -<br>" . date("l, F d, Y", strtotime($row['Day2Time']));
}
//Page Title
if (!empty($series)) {
$pgtitle = $row['Name'] . " (" . $year . ")";
} else {
$pgtitle = $row['Name'];
}
if ($row['Sport'] == "xc" || $row['Sport'] == "rr") {
$sport = "xc";
$xc = mysqli_query($con, "SELECT * FROM overallxc WHERE meet='" . $id . "'");
$resultsAvailable = (mysqli_num_rows($xc) > 0);
$indoor = 0;
} else if ($row['Sport'] == "in" || $row['Sport'] == "out") {
$sport = "tf";
$tf = mysqli_query($con, "SELECT * FROM overalltf WHERE meet='" . $id . "'");
$resultsAvailable = (mysqli_num_rows($tf) > 0);
if ($row['Sport'] == "in") {
$indoor = 1;
} else if ($row['Sport'] == "out") {
$indoor = 0;
} else {
exit("Error in Season. Please report to webmaster.");
}
} else {
exit("Error Finding Season.");
}
}
//Photos
$result = mysqli_query($con, "SELECT * FROM photos WHERE meet='" . $id . "'");
if (mysqli_num_rows($result) > 0) {
$photos = 1;
} else {
$photos = 0;
}
if ($official != 0 && $official != 5) {
$result = mysqli_query($con, "SELECT * FROM news WHERE meet='" . $id . "' AND recap = 1 AND public = 1");
} elseif ($official == 0 || $official == 4) {
$result = mysqli_query($con, "SELECT * FROM news WHERE meet='" . $id . "' AND info = 1 AND public = 1");
}
while ($row = mysqli_fetch_array($result)) {
$content = $row['content'];
$title = $row['title'];
$image = $row['image'];
$newsslug = $row['slug'];
}
if (empty($image)) {
$result = mysqli_query($con, "SELECT * FROM photos WHERE meet='" . $id . "' LIMIT 1");
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
$image = "meets/" . $row['cover'];
}
}
}
if (strpos($name, "Unknown") !== false) {
$noindex = true;
} else {
$noindex = false;
}
include "header.php";
if (isset($noindex) && $noindex != true) {
echo '<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SportsEvent",
"name": "' . $name . '",
"description": "' . $name . ' results and news from Titan Distance",
"startDate": "' . date("c", strtotime($unformatteddate)) . '",
"competitor": [
{
"@type": "SportsTeam",
"name": "Glenbrook South High School"
}
],
"location": "' . $location . '",
"sport": "Track And Field",
"eventStatus":"EventScheduled",
"eventAttendanceMode":"OfflineEventAttendanceMode"
}
</script>';
}
?>
<div class="container-xl my-2">
<div class="row">
<div class="col-lg-3">
<div class="card h-100">
<div class="card-body text-center text-lg-start">
<div class="series-navigation d-flex justify-content-between">
<?php if (!empty($series)) {
echo "<div>";
$result = mysqli_query($con, "SELECT Date FROM meets WHERE Date < '" . $unformatteddate . "' AND Series = '" . $series . "' ORDER BY Date DESC LIMIT 1");
while ($row = mysqli_fetch_array($result)) {
$yr = date("Y", strtotime($row['Date']));
echo "<a href='./" . $yr . "'><i class='bi bi-arrow-left'></i>" . $yr . "</a>";
}
echo "</div>";
echo "<div>";
$result = mysqli_query($con, "SELECT Date FROM meets WHERE Date > '" . $unformatteddate . "' AND Series = '" . $series . "' ORDER BY Date ASC LIMIT 1");
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
$yr = date("Y", strtotime($row['Date']));
echo "<a href='./" . $yr . "'>" . $yr . "<i class='bi bi-arrow-right'></i></a>";
}
} else {
echo '<a id="shareButton" class="bi bi-box-arrow-in-up-right" data-bs-toggle="tooltip" data-bs-title="Share" onclick="share(\'' . $name . '\')"></a>';
}
echo "</div>";
} ?>
</div>
<div id="meetInfo" class="border-bottom mb-2 pb-2">
<h4 id="meetName"><?php echo $name; ?></h4>
<h5 class="mb-0 fs-6" <?php if ($status == "C") {
echo 'style="text-decoration:line-through; color:#dc3545;"';
} else if ($status == "P") {
echo 'style="color:#dc3545;"';
} ?>><i class="bi bi-calendar-fill me-1"></i><?php echo $date; ?></h5>
<h5 class="mb-0 fs-6" <?php if ($status == "C") {
echo 'style="text-decoration:line-through; color:#dc3545;"';
} else if ($status == "R") {
echo 'style="color:#dc3545;"';
} ?>><i class="bi bi-geo-alt-fill me-1"></i><?php echo $location; ?></h5>
<?php
if (!empty($weather)) {
echo "<h5 class='mb-0 fs-6'><i class='bi bi-cloud-sun-fill me-1'></i>$weather</h5>";
} else if ($indoor == 1) {
echo "<h5 class='mb-0 fs-6'><i class='bi bi-snow2 me-1'></i>Indoor Meet</h5>";
}
?>
</div>
<div class="nav flex-column nav-pills d-none d-lg-block" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<?php
echo "<a class='nav-link active' id='home-tab' data-bs-toggle='pill' data-bs-target='#home' role='tab' aria-controls='home-tab' aria-selected='false'><i class='bi bi-house-fill me-1'></i>Home</a>";
$dropdown[] = "<option value='home' name='home'>Home</option>";
if (($official == 0 || $official == 4) && !empty($content)) {
echo "<a class='nav-link' id='news-tab' data-bs-toggle='pill' data-bs-target='#news' role='tab' aria-controls='news-tab' aria-selected='true'><i class='bi bi-newspaper me-1'></i>Meet Information</a>";
$dropdown[] = "<option value='news' name='news'>Meet Information</option>";
} elseif ($official != 0 && !empty($content)) {
echo "<a class='nav-link' id='news-tab' data-bs-toggle='pill' data-bs-target='#news' role='tab' aria-controls='news-tab' aria-selected='true'><i class='bi bi-newspaper me-1'></i>Meet Recap</a>";
$dropdown[] = "<option value='news' name='news'>Meet Recap</option>";
}
//INDIVIDUAL RESULTS
$teamscores = false;
if ($resultsAvailable == true || $official == 4) {
echo "<a class='nav-link' id='results-tab' data-bs-toggle='pill' data-bs-target='#results' role='tab' aria-controls='scores-tab' aria-selected='false'><i class='bi bi-list-ol me-1'></i>Individual Results</a>";
$dropdown[] = "<option value='results' name='results'>Individual Results</option>";
$result = mysqli_query($con, "SELECT * FROM overallscores WHERE meet='" . $id . "'");
if (mysqli_num_rows($result) > 0) {
echo "<a class='nav-link' id='scores-tab' data-bs-toggle='pill' data-bs-target='#scores' role='tab' aria-controls='scores-tab' aria-selected='false'><i class='bi bi-trophy-fill me-1'></i>Team Scores</a>";
$dropdown[] = "<option value='scores' name='scores'>Team Scores</option>";
$teamscores = true;
}
$result = mysqli_query($con, "SELECT DISTINCT school FROM overalltf WHERE meet = '" . $id . "'");
if ($sport == "tf" && mysqli_num_rows($result) > 1) {
echo "<a class='nav-link' id='dscores-tab' data-bs-toggle='pill' data-bs-target='#dscores' role='tab' aria-controls='dscores-tab' aria-selected='false'><i class='bi bi-list-stars me-1'></i>Distance Scores</a>";
$dropdown[] = "<option value='dscores' name='dscores'>Distance Scores</option>";
}
}
if (!empty($schedule)) {
echo "<a class='nav-link' id='schedule-tab' data-bs-toggle='pill' data-bs-target='#schedule' role='tab' aria-controls='standards-tab' aria-selected='false'><i class='bi bi-clock-fill me-1'></i>Meet Schedule</a>";
$dropdown[] = "<option value='schedule' name='schedule'>Meet Schedule</option>";
}
if ($location == "David Pasquini Fieldhouse" or $location == "John Davis Titan Stadium" or $location == "Glenbrook South High School") {
echo "<a class='nav-link' id='venue-tab' data-bs-toggle='pill' data-bs-target='#venue' role='tab' aria-controls='venue-tab' aria-selected='false'><i class='bi bi-geo-alt-fill me-1'></i>" . $location . "</a>";
$dropdown[] = "<option value='venue' name='venue'>" . $location . "</option>";
} elseif ($sport == "xc" && $location !== "Unknown" && $location !== "TBD" && $location !== "TBA") {
echo "<a class='nav-link' id='venue-tab' data-bs-toggle='pill' data-bs-target='#venue' role='tab' aria-controls='venue-tab' aria-selected='false'><i class='bi bi-geo-alt-fill me-1'></i>Course Information</a>";
$dropdown[] = "<option value='venue' name='venue'>Course Information</option>";
} elseif ($location !== "Unknown" && $location !== "TBD" && $location !== "TBA") {
echo "<a class='nav-link' id='venue-tab' data-bs-toggle='pill' data-bs-target='#venue' role='tab' aria-controls='venue-tab' aria-selected='false'><i class='bi bi-geo-alt-fill me-1'></i>Map & Directions</a>";
$dropdown[] = "<option value='venue' name='venue'>Map & Directions</option>";
}
if ($series == "titan") {
echo "<a class='nav-link' id='meetrecords-tab' data-bs-toggle='pill' data-bs-target='#meetrecords' role='tab' aria-controls='meetrecords-tab' aria-selected='false'><i class='bi bi-lightning-fill me-1'></i>Titan Invite Records</a>";
$dropdown[] = "<option value='meetrecords' name='meetrecords'>Meet Records</option>";
}
// if ($id == "513") {
// echo "<a class='nav-link' id='alumni-tab' data-bs-toggle='pill' data-bs-target='#alumni' role='tab' aria-controls='alumni-tab' aria-selected='false'><i class='bi bi-balloon-fill me-1'></i>Hasenstein Retirement Celebration</a>";
// $dropdown[] = "<option value='alumni' name='alumni'>Hasenstein Retirement Celebration</option>";
// }
if (($official == 0 || $official == 4) && !empty($tickets)) {
echo "<a class='nav-link' id='heat' href='" . $tickets . "' role='tab' target='_blank'><i class='bi bi-ticket-fill me-1'></i>Buy Tickets</a>";
$dropdown[] = "<option value='link-" . $tickets . "' name='tickets'>Tickets</option>";
}
if (!empty($heat)) {
echo "<a class='nav-link' id='heat' href='" . $heat . "' role='tab' target='_blank'><i class='bi bi-clipboard-check-fill me-1'></i>Heat Sheet</a>";
$dropdown[] = "<option value='link-" . $heat . "' name='heat'>Heat Sheet</option>";
}
if (!empty($live)) {
echo "<a class='nav-link' id='live' href='" . $live . "' role='tab' target='_blank'><i class='bi bi-bar-chart-fill me-1'></i>LIVE Results</a>";
$dropdown[] = "<option value='link-" . $live . "' name='live'>LIVE Results</option>";
}
if (!empty($stream)) {
echo "<a class='nav-link' id='stream' href='" . $stream . "' role='tab' target='_blank'><i class='bi bi-tv me-1'></i>Live Stream/Video</a>";
$dropdown[] = "<option value='link-" . $stream . "' name='stream'>Live Stream/Video</option>";
}
if ($photos == 1) {
echo "<a class='nav-link' id='photos-tab' data-bs-toggle='pill' data-bs-target='#photos' role='tab' aria-controls='photos-tab' aria-selected='false'><i class='bi bi-camera-fill me-1'></i>Photos</a>";
$dropdown[] = "<option value='photos' name='photos'>Photos</option>";
}
if (!empty($results)) {
echo "<a class='nav-link' id='download' href='" . $results . "' role='tab' target='_blank'><i class='bi bi-file-earmark-pdf-fill me-1'></i>Download Results</a>";
$dropdown[] = "<option value='link-" . $results . "' name='results'>Download Results</option>";
}
if (!empty($athnet)) {
echo "<a class='nav-link' id='ath-net' href='" . $athnet . "' role='tab' target='_blank'><img src='/assets/icons/AthNetSquare.svg' class='me-1 my-auto' width='14px'>AthleticNET Page</a>";
$dropdown[] = "<option value='link-" . $athnet . "' name='athnet'>AthleticNET</option>";
}
if (!empty($website)) {
echo "<a class='nav-link' id='homepage' href='" . $website . "' role='tab' target='_blank'>Meet Website<i class='bi bi-box-arrow-in-up-right ms-1'></i></a>";
$dropdown[] = "<option value='link-" . $website . "' name='results'>Meet Website</option>";
}
if (!empty($results)) {
echo "<a class='nav-link' id='report' href='https://forms.gle/NQjahvTVmbNnsASo8' role='tab' target='_blank'>Request Correction<i class='bi bi-box-arrow-in-up-right ms-1'></i></a>";
$dropdown[] = "<option value='link-https://forms.gle/NQjahvTVmbNnsASo8' name='report'>Request Correction</option>";
}
?>
</div>
<div class="form-group d-block d-lg-none">
<select class="form-select" id="selectTab" data-clarity-unmask="true">
<?php foreach ($dropdown as $d) {
echo $d;
} ?>
</select>
</div>
</div>
</div>
</div>
<div class="col-lg-9 mt-2 mt-lg-0 h-100">
<?php
if ($season == "Community") {
echo "<div class='alert alert-primary' role='alert'>This event is not school-sponsored, in accordance with IHSA By-law 3.101. Athletes compete Unattached at these events, and are only listed as Glenbrook South* for technical purposes.</div>";
}
if (!empty($message)) {
echo "<div class='alert alert-danger' role='alert'>" . $message . "</div>";
}
if (!empty($notes)) {
echo "<div class='alert alert-info' role='alert'>" . $notes . "</div>";
}
if ($official == 3) {
echo "<div class='alert alert-danger' role='alert'>These results have been marked <strong>Unofficial</strong> in our database. While every effort is made to ensure their accuracy, discrepancies may be displayed.</div>";
}
?>
<div class="card h-100">
<div class="card-body p-2 p-lg-3">
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<h2><?php echo $name; ?></h2>
<div id="meetButtons" class="text-center text-lg-start">
<?php
if (($official == 0 || $official == 4) && !empty($live)) {
if (strpos($live, "athletic.live") !== false || strpos($live, "live.athletic.net") !== false || strpos($live, "results.lakeshoreathleticservices.com") !== false || strpos($live, "live.timingmd.net") !== false || strpos($live, "anet.live") !== false || strpos($live, "live.palatinepack.com") !== false || strpos($live, "results.adkinstrak.com") !== false || strpos($live, "anet.live") !== false || strpos($live, "live.lakeshoreathleticservices.com") !== false) {
echo '<a class="btn btn-primary mx-2 my-1" href="' . $live . '" role="button" target="_blank" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Live Results on AthleticLIVE"><img src="https://titandistance.com/assets/icons/athleticlive.svg" height="16px" alt="Live Results"></a>';
} else {
echo '<a class="btn btn-primary mx-2 my-1" href="' . $live . '" role="button" target="_blank" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Results Available during Meet"><i class="bi bi-bar-chart-fill me-1"></i>LIVE Results</a>';
}
} else if ($official != 0) { //Should Live and Results be shown if in progres?
echo '<button type="button" class="btn btn-primary mx-2 my-1" onclick="openTab(\'results\')" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Meet Results"><i class="bi bi-list-ol me-1"></i>Results</button>';
if ($teamscores == true) {
echo '<button type="button" class="btn btn-primary mx-2 my-1" onclick="openTab(\'scores\')" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Team Scores"><i class="bi bi-trophy-fill me-1"></i>Scores</button>';
}
} else if (($official == 0 || $official == 4) && empty($live) && !empty($heat)) {
echo '<a class="btn btn-primary mx-2 my-1" href="' . $heat . '" role="button" target="_blank"><i class="bi bi-clipboard-check-fill me-1"></i>Heat Sheet</a>';
}
if (!empty($athnet)) {
echo '<a class="btn btn-primary mx-2 my-1" href="' . $athnet . '" role="button" target="_blank" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Meet Page on AthleticNET"><img src="https://titandistance.com/assets/icons/AthleticNet.svg" height="16px" alt="AthleticNET"></a>';
}
if (($official == 0 || $official == 4) && !empty($schedule)) {
echo '<button type="button" class="btn btn-primary mx-2 my-1" onclick="openTab(\'schedule\')" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Schedule of Events"><i class="bi bi-clock-fill me-1"></i>Meet Schedule</button>';
}
if (($official == 0 || $official == 4) && !empty($tickets)) {
echo '<a type="button" class="btn btn-primary mx-2 my-1" href="' . $tickets . '" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Buy Tickets" target="_blank"><i class="bi bi-ticket-fill me-1"></i>Tickets</a>';
}
// if ($id == "513") {
// echo '<button type="button" class="btn btn-primary mx-2 my-1" onclick="openTab(\'alumni\')" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="Hasenstein Retirement Celebration"><i class="bi bi-balloon-fill me-1"></i>Coach Hasenstein Retirement Celebration</button>';
// }
?>
</div>
<div class="card mt-3">
<div class="card-header fw-bold">Meet Information</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Meet Name: <?php echo $name; ?></li>
<li class="list-group-item">Meet Date: <?php echo $date; ?></li>
<li class="list-group-item">Location: <?php echo $location; ?></li>
<?php
if (sizeof($opponentsArray) > 1) {
echo "<li class='list-group-item'>Opponents: ". join(", ", $opponentsArray)."</li>";
} ?>
<li class="list-group-item">Levels: <?php echo $levels; ?></li>
<?php
if ($resultsAvailable == true) {
echo "<li class='list-group-item'>Results Status: ";
if ($official == 1) {
echo "<span class='badge bg-success'>Official Results (F.A.T.)</span>";
} elseif ($official == 2) {
echo "<span class='badge bg-warning'>Official Results (Hand Timed)</span>";
} elseif ($official == 3) {
echo "<span class='badge bg-danger'>Unofficial Results</span>";
} elseif ($official == 4) {
echo "<span class='badge bg-primary'>In Progress</span>";
} elseif ($official == 5) {
echo "<span class='badge bg-success'>Partial Results (F.A.T.)</span>";
} elseif ($official == 6) {
echo "<span class='badge bg-warning'>Partial Results (Hand Timed)</span>";
}
echo "</li>";
}
?>
</ul>
</div>
</div>
<div class="tab-pane fade" id="news" role="tabpanel" aria-labelledby="news-tab">
<?php
if ($official == 0 || $official == 4) {
echo "<h2>Meet Information</h2>";
} elseif ($official != 0) {
if (!empty($title)) {
echo "<h2><a href='/news/" . $newsslug . "'>" . $title . "</a></h2>";
} else {
echo "<h2>Meet Recap</h2>";
}
}
if (empty($content)) {
echo "<p>No meet recap or information is available at this time. Please be sure to use the links on the left to view more about the meet.</p><p>If this meet has already occured, our results are missing or have not been processed into our database.</p>";
} else {
$content = str_replace("../athlete/", "/athlete/", $content);
echo $content;
}
?>
</div>
<div class="tab-pane fade" id="results" role="tabpanel" aria-labelledby="results-tab">
<div class='d-flex justify-content-between align-items-center mb-2'>
<h2>Individual Results</h2>
<div class=''>
<?php
if ($official == 1) {
echo "<span class='badge bg-success'>Official Results (F.A.T.)</span>";
} elseif ($official == 2) {
echo "<span class='badge bg-warning'>Official Results (Hand Timed)</span>";
} elseif ($official == 3) {
echo "<span class='badge bg-danger'>Unofficial Results</span>";
} elseif ($official == 4) {
echo "<span class='badge bg-primary'>In Progress</span>";
} elseif ($official == 5) {
echo "<span class='badge bg-success'>Partial Results (F.A.T.)</span>";
} elseif ($official == 6) {
echo "<span class='badge bg-warning'>Partial Results (Hand Timed)</span>";
}
?>
<div class='form-check form-switch d-none d-lg-block'>
<input type='checkbox' class='form-check-input' onChange='showHighlight(this.checked)' id='INDVhighlightSwitch' checked>
<label class='custom-control-label' for='INDVhighlightSwitch'>Toggle Highlight</label>
</div>
<div class='form-check form-switch d-none d-lg-block'>
<input type='checkbox' class='form-check-input' onChange='toggleSplits();' id='splitsSwitch'>
<label class='custom-control-label' for='splitsSwitch'>Toggle Splits</label>
</div>
</div>
</div>
<?php
$meetEvents = [];
$meetLevels = [];
if ($sport == "tf") {
echo "<select class='form-select' aria-label='Event Selector' id='selectEvent'
onChange='showTFResults(this.value)' data-clarity-unmask='true'>
<option selected disabled>Select Event</option>";
$result = mysqli_query($con, "SELECT DISTINCT event,level FROM overalltf WHERE meet = '" . $id . "' AND (relay IS NULL or name = 'RELAY')");
while ($row = mysqli_fetch_array($result)) {
echo "<option value='" . $row['event'] . "-" . $row['level'] . "'>" . $teams[$row['level']] . " " . $trackevents[$row['event']] . "</option>";
$meetEvents[] = "\"" . $row['event'] . "-" . $row['level'] . "\"";
if (!in_array($row['level'], $meetLevels)) {
$meetLevels[] = $row['level'];
}
}
echo "<option value='all'>Show All</option>";
echo "</select>";
} else if ($sport == "xc") {
echo "<select class='form-select' aria-label='Event Selector' id='selectEvent'
onChange='showXCResults(this.value)' data-clarity-unmask='true'>
<option selected disabled>Select Division</option>";
$result = mysqli_query($con, "SELECT DISTINCT level FROM overallxc WHERE meet = '" . $id . "' ORDER BY level ASC");
while ($row = mysqli_fetch_array($result)) {
echo "<option value='" . $row['level'] . "'>" . $teams[$row['level']] . "</option>";
$meetEvents[] = "\"" . $row['level'] . "\"";
if (!in_array($row['level'], $meetLevels)) {
$meetLevels[] = $row['level'];
}
}
echo "<option value='all'>Show All</option>";
echo "</select>";
}
?>
<div class="mt-3" id="indresultsContainer">
<?php if ($resultsAvailable == true) {
echo "<p>Please select an event/division from the dropdown above.</p>";
} else {
echo '<div class="alert alert-primary" role="alert">Results unavailable for this meet at this time.</div>';
}
?>
</div>
</div>
<div class="tab-pane fade" id="scores" role="tabpanel" aria-labelledby="scores-tab">
<?php
echo "<div class='d-flex justify-content-between align-items-center mb-2'>";
echo "<h2>Team Scores</h2>";
echo "<div class='d-none d-lg-block'>";
echo "<div class='form-check form-switch'>";
echo "<input type='checkbox' class='form-check-input' onChange='showHighlight(this.checked)' id='highlightSwitch' checked>";
echo "<label class='custom-control-label' for='highlightSwitch'>Toggle Highlight</label>";
echo "</div>";
echo "</div>";
echo "</div>";
if ($sport == "tf") {
echo "<p><strong>Team scores for all events, including sprints, hurdles, field, etc.</strong></p>";
}
?>
<div id="scoresContainer">
<?php
$quad = 0;
foreach ($meetLevels as $l) {
$result = mysqli_query($con, "SELECT * FROM overallscores WHERE meet='" . $id . "' AND level = '" . $l . "'");
echo "<h4>" . $teams[$l] . "</h4>";
echo "<table class='table table-sm'>";
echo "<thead><tr><th>Place</th><th>School</th><th>Score</th></tr></thead>";
while ($row = mysqli_fetch_array($result)) {
if ($row['school'] == "Glenbrook South" or $row['school'] == "Glenview (Glenbrook South)" && $row['place'] == 1) {
echo "<tr class='row-highlight' onclick='launchConfetti()'>";
} else if ($row['school'] == "Glenbrook South" or $row['school'] == "Glenview (Glenbrook South)") {
echo "<tr class='row-highlight'>";
} else {
echo "<tr>";
}
echo "<td>" . $row['place'] . "</td>";
echo "<td>" . $row['school'] . "</td>";
echo "<td>" . $row['score'] . "</td>";
echo "</tr>";
if (strpos($row['score'], '-') !== false) {
$quad = 1;
}
}
echo "</table>";
if (mysqli_num_rows($result) <= 0) {
echo "<p class='card-text'><strong>This is either an unscored meet, or team results are missing from our database. If you believe this is an error, please reach out.</strong></p>";
}
}
if ($quad == 1) {
echo "<p>This meet is a scored team meet, where each team is scored against each other. This is why you see a record instead of a score.</p>";
}
?>
</div>
</div>
<?php
if ($sport == "tf") {
echo '<div class="tab-pane fade" id="dscores" role="tabpanel" aria-labelledby="dscores-tab">';
echo "<div class='d-flex justify-content-between align-items-center mb-2'>";
echo "<h2>Distance Team Scores</h2>";
echo "<div class='d-none d-lg-block'>";
echo "<div class='form-check form-switch'>";
echo "<input type='checkbox' class='form-check-input' onChange='showHighlight(this.checked)' id='highlightSwitch' checked>";
echo "<label class='custom-control-label' for='highlightSwitch'>Toggle Highlight</label>";
echo "</div>";
echo "</div>";
echo "</div>";
echo '<p><strong>Automated team scoring only for Distance Events (3200m,1600m,800m,4x800m) using <a data-bs-toggle="tooltip" data-bs-placement="top" title="10-8-6-4-2-1">IHSA State Series</a> scoring.</strong></p>';
foreach ($meetLevels as $l) {
$result = mysqli_query($con, "SELECT school, COUNT(*) FROM overalltf WHERE meet=" . $id . " AND level = " . $l . " GROUP BY school");
while ($row = mysqli_fetch_array($result)) {
$scores[$row['school']] = 0;
$math[$row['school']] = [];
}
$result = mysqli_query($con, "SELECT * FROM overalltf WHERE meet='" . $id . "' AND level = " . $l . " AND (event = '3200m' OR event = '1600m' OR event = '800m' OR event = '4x800m') AND place IS NOT NULL");
while ($row = mysqli_fetch_array($result)) {
$place = $row['place'];
if ($place == 1) {
$score = 10;
} elseif ($place == 2) {
$score = 8;
} elseif ($place == 3) {
$score = 6;
} elseif ($place == 4) {
$score = 4;
} elseif ($place == 5) {
$score = 2;
} elseif ($place == 6) {
$score = 1;
} else {
$score = 0;
}
$scores[$row['school']] += $score;
if ($score > 0) {
$math[$row['school']][] = $score;
}
}
arsort($scores);
echo "<h4>" . $teams[$l] . "</h4>";
echo "<table class='table table-sm'>";
echo "<thead><tr><th>Place</th><th>School</th><th>Score</th></tr></thead>";
$n = 1;
foreach ($scores as $s => $p) {
if ($s == "Glenbrook South" or $s == "Glenview (Glenbrook South)") {
echo "<tr class='row-highlight'>";
} else {
echo "<tr>";
}
echo "<td>" . $n . "</td>";
echo "<td>" . $s . "</td>";
echo "<td data-bs-toggle='tooltip' data-bs-placement='left' title='" . join(" + ", $math[$s]) . " = " . $p . "'>" . $p . "</td>";
echo "</tr>";
$n += 1;
}
echo "</table>";
}
echo "</div>";
}
?>
<div class="tab-pane fade" id="venue" role="tabpanel" aria-labelledby="venue-tab">
<?php
$result = mysqli_query($con, 'SELECT * FROM locations WHERE name="' . $location . '"');
if (mysqli_num_rows($result) !== 0) {
while ($row = mysqli_fetch_array($result)) {
if ($location == "John Davis Titan Stadium") {
include $_SERVER['DOCUMENT_ROOT'] . "/includes/venues/stadium.php";
} elseif ($location == "David Pasquini Fieldhouse") {
include $_SERVER['DOCUMENT_ROOT'] . "/includes/venues/fieldhouse.php";
} elseif ($location == "Glenbrook South High School") {
include $_SERVER['DOCUMENT_ROOT'] . "/includes/venues/xccourse.php";
} else {
$geojson = $row['geojson'];
echo "<h2>" . $location . "</h2>";
if (!empty($row['xccourse']) && $sport == "xc") {
echo "<img class='img-fluid' src='/assets/images/course-maps/" . $row['xccourse'] . "' loading='lazy'>";
echo "<hr>";
}
if (!empty($row['coordinates'])) {
echo "<div id='coursemap'></div>";
echo "<script>
mapboxgl.accessToken = '" .
$mapboxapikey .
"';
var map = new mapboxgl.Map({
container: 'coursemap', // container id
style: 'mapbox://styles/jkurtzweil2/ckgacb5xw02fp19r16el5q4xc', // style URL
center: [" .
$row['coordinates'] .
"], // starting position [lng, lat]
zoom: 15 // starting zoom
});
var marker = new mapboxgl.Marker()
.setLngLat([" .
$row['coordinates'] .
"])
.addTo(map);";
echo "</script>";
}
if (!empty($row['gmap'])) {
echo "<div class='text-center'>";
echo "<a class='btn btn-primary mt-2 mx-2' href='https://www.google.com/maps/search/?api=1&query=" . $row['name'] . "&query_place_id=" . $row['gmap'] . "' role='button' target='_blank'>Open in Google Maps</a>";
if (!empty($row['osm'])) {
echo "<a class='btn btn-primary mt-2 mx-2' href='https://openstreetmap.org/way/" . $row['osm'] . "' role='button' target='_blank'>Open in OpenStreetMap</a>";
}
echo "<a class='btn btn-primary mt-2 mx-2' href='https://maps.apple.com/?q=" . $row['name'] . "&near=42.090002,-87.855138' role='button' target='_blank'>Open in Apple Maps</a>";
echo "</div>";
} else {
echo "<div class='text-center'>";
echo "<a class='btn btn-primary mt-2' href='https://maps.google.com/?q=" . addslashes($location) . "' role='button' target='_blank'>Open in Google Maps</a>";
echo "</div>";
}
//Top Times
if ($sport == "xc") {
echo "<hr>";
echo "<h4>Top " . $row['primarydistance'] . " Times by GBS Athletes";
if ($row['verified'] == 1) {
echo "<i class=\"ms-4 text-success bi bi-patch-check-fill\" data-bs-toggle=\"tooltip\" data-bs-placement=\"top\" title=\"Verified as Accurate & Updated\"></i>";
} else {
echo "<i class=\"ms-4 text-warning bi bi-patch-exclamation-fill\" data-bs-toggle=\"tooltip\" data-bs-placement=\"top\" title=\"Some Times May be Missing\"></i>";
}
echo "</h4>";
if (empty($row['startdate'])) {
$result2 = mysqli_query($con, "SELECT * FROM meets WHERE Location = '" . addslashes($location) . "' ORDER BY Date DESC");
} else {
$result2 = mysqli_query($con, "SELECT * FROM meets WHERE Location = '" . addslashes($location) . "' AND Date >= '" . $row['startdate'] . "' ORDER BY Date DESC");
}
$meets2 = [];
while ($row2 = mysqli_fetch_array($result2)) {
array_push($meets2, $row2['id']);
}
echo "
<div class=\"table-responsive\">
<table class=\"table table-condensed table-sm table-hover\">
<thead>
<tr>
<th>Time</th>
<th>Athlete</th>
<th>Year</th>
</thead>
<tbody>";
$duplicates = [];
$num = 0;
$result2 = mysqli_query($con, "SELECT * FROM overallxc" . " WHERE meet IN (" . join(",", $meets2) . ") AND distance = '" . $row['primarydistance'] . "' AND school = 'Glenbrook South' ORDER BY time ASC LIMIT 50");
while ($row2 = mysqli_fetch_array($result2)) {
if (in_array($row2['name'], $duplicates) or $num >= 10) {
continue;
}
echo "<tr>";
echo "<td>" . $row2["time"] . "</td>";
if (!empty($row2['profile'])) {
echo "<td><a href='/athlete/" . $row2['profile'] . "'>" . $row2["name"] . "</a></td>";
} else {
echo "<td>" . $row2["name"] . "</td>";
}
echo "<td><a href='/meet/" . $row2['meet'] . "'>" . date("Y", strtotime($row2['date'])) . "</a></td>";
echo "</tr>";
$duplicates[] = $row2['name'];
$num += 1;
}
echo " </tbody>
</table>
</div>";
}
echo " <h4>Previous GBS Appearances</h4>
<div class=\"table-responsive\">
<table class=\"table table-condensed table-sm table-hover\">
<thead>
<tr>
<th>Date</th>
<th>Name</th>
<th>Season</th>
</thead>
<tbody>";
$result = mysqli_query($con, "SELECT * FROM meets WHERE Location = '" . addslashes($location) . "' AND Date < '" . $unformatteddate . "' AND NOT `Status` <=> 'C' ORDER BY Date DESC");
while ($row = mysqli_fetch_array($result)) {
//Badge
if (array_key_exists($row['Badge'], $badges)) {
$badge = "<span class='ms-1 badge " . $badges[$row['Badge']][0] . "' data-bs-toggle='tooltip' data-bs-placement='top' title='" . $badges[$row['Badge']][2] . "'>" . $badges[$row['Badge']][1] . "</span>";
} else {
$badge = "";
}
if ($row['Official'] == "3") {
$badge = $badge . "<span class='badge bg-danger ms-1' data-bs-toggle='tooltip' data-bs-placement='top' title='Results marked as Unofficial, and may not be complete.'>U</span>";
}
echo "<tr>";
echo "<td>" . date("n/j/y", strtotime($row['Date'])) . "</td>";
echo "<td><a href='/meet/" . $row['id'] . "'>" . $row['Name'] . $badge . "</a></td>";
echo "<td>" . $row["Season"] . "</td>";
echo "</tr>";
}
echo " </tbody>
</table>
</div>";
}
}
} else {
echo "<h2>" . $location . "</h2>";
echo "<div class='embed-responsive embed-responsive-4by3'>";
echo "<iframe class='embed-responsive-item' width='600' height='450' src='https://www.google.com/maps/embed/v1/search?key=" . $gmapapikey . "&q=" . $location . "' allowfullscreen></iframe>";
echo "</div>";
}
?>
</div>
<?php
if ($series == "titan") {
echo '<div class="tab-pane fade" id="meetrecords" role="tabpanel" aria-labelledby="meetrecords-tab">';
include $_SERVER['DOCUMENT_ROOT'] . "/includes/titanrecords.php";
echo "</div>";
}
// if ($id == 513) {
// echo '<div class="tab-pane fade" id="alumni" role="tabpanel" aria-labelledby="alumni-tab">';
// include $_SERVER['DOCUMENT_ROOT'] . "/includes/hasstitan.php";
// echo "</div>";
// }
if (!empty($schedule)) {
echo '<div class="tab-pane fade" id="schedule" role="tabpanel" aria-labelledby="schedule-tab">';
echo '<h2>Meet Schedule</h2>';
$scheduleArray = json_decode($schedule);
$scheduleEvents = $scheduleArray->events;
$scheduleSetup = $scheduleArray->setup;
echo "<table class='table caption-top'>";
if (!empty($scheduleSetup->caption)) {
echo "<caption>" . $scheduleSetup->caption . "</caption>";
}
echo "<thead><tr>";
if (!empty($scheduleSetup->time) && $scheduleSetup->time == true) {
echo "<th>Time</th>";
}
echo "<th>Event</th>";
if (!empty($scheduleSetup->heats) && $scheduleSetup->heats == true) {
echo "<th>Heats</th>";
}
if (!empty($scheduleSetup->automark) && $scheduleSetup->automark == true) {
echo "<th>Auto Qualifying Mark</th>";
}
echo "</tr></thead>";
foreach ($scheduleEvents as $d) {
if (!empty($d->raw)) {
echo $d->raw;
} else {
if (!empty($d->highlight) && $d->highlight == true) {
echo "<tr class='row-highlight'>";
} else {
echo "<tr>";
}
if (!empty($scheduleSetup->time) && $scheduleSetup->time == true) {
if (!empty($d->time)) {
echo "<td>" . $d->time . "</td>";
} else {
echo "<td></td>";
}
}
echo "<td>" . $d->event;
if( strpos( $d->event, "National Anthem" ) !== false) {
echo "<img src='/assets/us_flag.svg' height='18' class='ms-2' alt='USA'>";
}
echo "</td>";
if (!empty($scheduleSetup->heats) && $scheduleSetup->heats == true) {
if (!empty($d->heats)) {
echo "<td>" . $d->heats . "</td>";
} else {
echo "<td></td>";
}
}
if (!empty($scheduleSetup->automark) && $scheduleSetup->automark == true) {
if (!empty($d->automark)) {
echo "<td>" . $d->automark . "</td>";
} else {
echo "<td></td>";
}
}
echo "</tr>";
}
}
echo "</table>";
if (isset($scheduleSetup->appendix)) {
echo $scheduleSetup->appendix;
}
echo "</div>";
}
?>
<div class="tab-pane fade" id="photos" role="tabpanel" aria-labelledby="photos-tab">
<h2>Photos</h2>
<?php
echo "<div class='row row-cols-1 row-cols-lg-2'>";
$result = mysqli_query($con, "SELECT * FROM photos WHERE meet='" . $id . "'");
while ($row = mysqli_fetch_array($result)) {
echo "<div class='col mb-2'>";
echo "<a class='card text-center hover-card text-reset' href='" . $row['link'] . "'>";
echo "<img src='/assets/images/meets/" . $row['cover'] . "' class='card-img-top' loading='lazy'>";
echo "<div class='card-body'>";
echo "<p class='card-text'>Photographer(s): " . $row['credits'] . "</p>";
echo "</div>";
echo "</a>";
echo "</div>";
}
echo "</div>";
?>
</div>
<div class="tab-pane fade" id="athletes" role="tabpanel" aria-labelledby="athletes-tab">
<h2>Athlete Results</h2>
<div class="alert alert-warning" role="alert">
Coming Soon! - Under Construction.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//INDIVIDUAL RESULTS
var events = {
"3200m": "3200m Run",
"1600m": "1600m Run",
"1000m": "1000m Run",
"800m": "800m Run",
"400m": "400m Dash",
"300mIH": "300m Intermediate Hurdles",
"300m": "300m Dash",
"200m": "200m Dash",
"160m": "160m Dash",
"110mHH": "110m High Hurdles",
"110m IH": "110m Intermediate Hurdles",
"100m": "100m Dash",
"60m": "60m Dash",
"50y": "50y Dash",
"60mHH": "60m High Hurdles",
"50mLH": "50m Low Hurdles",
"55mIH": "55m Intermediate Hurdles",
"55mHH": "55m High Hurdles",
"55mLH": "55m Low Hurdles",
"55m": "55m Dash",
"50m": "50m Dash",
"SP": "Shot Put",
"DT": "Discus",
"HJ": "High Jump",
"PV": "Pole Vault",
"LJ": "Long Jump",
"TJ": "Triple Jump",
"4x1600m": "4x1600m Relay",
"4x800m": "4x800m Relay",
"4x400m": "4x400m Relay",
"4x240m": "4x2 Lap Relay",
"4x200m": "4x200m Relay",
"4x160m": "4x1 Lap Relay",
"4x100m": "4x100m Relay",
"DMR": "Distance Medley Relay",
"SMR": "Sprint Medley Relay",
"Throwers": "Throwers Relay",
"800mSMR": "800m Sprint Medley Relay",
"1600mSMR": "1600m Spring Medley Relay",
"LHR": "Low Hurdle Relay",
"HHR": "High Hurdle Relay",
'60yLH': "60 Yard Low Hurdles",
"1500m": "1500m Run",
"1mi": "1 Mile Run"
};
var levels = {
1: "Varsity",
2: "Junior Varsity",
3: "Sophomore",
4: "Freshmen",
5: "Frosh/Soph",
6: "Open",
7: "Junior Varsity 2",
8: "Unknown"
}
var splits = {};
var response, results;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
response = this.responseText;
results = JSON.parse(response);
<?php
if ($sport == "xc" && count($meetLevels) == 1) {
echo "showXCResults(" . $meetLevels[0] . ");\n";
echo "document.getElementById(\"selectEvent\").value=" . $meetLevels[0] . ";\n";
echo "document.getElementById(\"selectEvent\").classList.add(\"d-none\");\n";
}
?>
}
};
var url = "/api/results.php?id=<?php echo $id; ?>"
xhttp.open("GET", url, true);
xhttp.send();
var indresultsContainer = document.getElementById("indresultsContainer");
var INDVhighlightSwitch = document.getElementById("INDVhighlightSwitch");
function showTFResults(raw) {
var tables = [];
if (raw == "all") {
tables.push(<?php echo implode(",", $meetEvents); ?>)
} else {
tables.push(raw)
}
indresultsContainer.innerHTML = ""
tables.forEach(generateTFTables)
indresultsContainer.innerHTML += "<button type=\"button\" class=\"btn btn-secondary btn-sm\" onClick=\"printindResults()\"><i class=\"bi bi-printer-fill me-1\"></i>Print Results</button><a type=\"button\" class=\"btn btn-secondary btn-sm ms-2\" href=\"https://docs.google.com/forms/d/e/1FAIpQLSdCNMNZBMD5wCgcQ2SBcwuVOTOdV0y4j33HlwR53fCCaLaPag/viewform?usp=pp_url&entry.1449250561=Result+Correction\">Request Correction</a>"
indresultsContainer.innerHTML += "<p class='mt-4'>*<a href='https://caltaf.com/pointscalc/calc.html' target='_blank'>IAAF (now World Athletic) points</a> ranging from 0-1400 based on the 2017 scale, compare event performances. Indoor and outdoor meets have distinct scoring criteria, favoring superior outdoor performances. Conversions to World Athletic standards apply for events like 1600m to 1 mile and 3200m to 2 miles. Note: During beta, performance variations may occur, and hand-time conversions are not included. Discrepancies are actively being addressed.</p>"
activateTooltips();
document.getElementById("splitsSwitch").checked = false;
}
function generateTFTables(single) {
single = single.split("-")
var event = single[0]
var level = single[1]
splits[single] = {
"num": 0,
"names": {}
}
let table = "<table class='table table-sm table-striped resultsTable' data-td-rt='" + single + "' id='" + levels[level].toLowerCase().replace(" ", "_") + event + "Table" + "'>";
table += "<thead><tr id='results-head'><th>Place</th><th>Name</th><th>Grade</th><th>Result</th><th>Team</th><th data-bs-toggle=\"tooltip\" data-bs-placement=\"bottom\" data-bs-title=\"IAAF Points (0-1400)\">Points*</th></tr></thead>";
table += "<tbody>";
for (let x in results) {
if (results[x].level == level && results[x].event == event && (results[x].relay == null || results[x].name == "RELAY")) {
var gbs;
if (results[x].school == "Glenbrook South" || results[x].school == "Glenbrook South*") {
gbs = true;
} else {
gbs = false;
}
if (gbs == true) {
if (INDVhighlightSwitch.checked == true) {
table += "<tr class='row-highlight' data-td-resultid='" + results[x].id + "'>";
} else {
table += "<tr class='row-nohighlight' data-td-resultid='" + results[x].id + "'>";
}
} else {
table += "<tr data-td-resultid='" + results[x].id + "'>";
}
if (results[x].place == null) {
table += "<th></th>";
} else {
if (gbs == true && results[x].place == 1) {
table += "<th onClick='launchConfetti()'>" + results[x].place + "</th>";
} else {
table += "<th>" + results[x].place + "</th>";
}