-
Notifications
You must be signed in to change notification settings - Fork 0
/
live.php
109 lines (98 loc) · 4.59 KB
/
live.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
<?php
include("db.php");
$todaydate = date('Y-m-d');
$result = mysqli_query($con, "SELECT * FROM meets WHERE Date = '$todaydate'");
if (mysqli_num_rows($result) == 0) {
$message = "There is no meet scheduled for today.";
} else {
while ($row = mysqli_fetch_array($result)) {
$name = $row['Name'];
$id = $row['id'];
if (empty($row['Live'])) {
$message = "Live Results are not available for this meet. Please check on TitanDistance.com after the meet for results.";
} else {
$message = "Please click the link below for live results for the meet.";
$live = $row['Live'];
}
}
if (empty($row['Series'])) {
$url = "/meet/" . $id;
} else {
$result = mysqli_query($con, "SELECT * FROM series");
while ($row = mysqli_fetch_array($result)) {
$series[$id] = $row['slug'];
}
$url = "/meet/" . $series[$row['Series']] . "/" . $d = date("Y", strtotime($row['Date']));
}
}
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Titan Distance Live</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark')
} else {
document.documentElement.setAttribute('data-bs-theme', 'light')
}
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M96PNNSZKB"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-M96PNNSZKB');
</script>
<!-- Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/icons/favicon-16x16.png">
<link rel='manifest' href='/manifest.json'>
<link rel="mask-icon" href="/assets/icons/safari-pinned-tab.svg" color="#ffd700">
<link rel="shortcut icon" href="/assets/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="/assets/icons/browserconfig.xml">
<meta name="theme-color" content="#073763">
</head>
<body>
<div class="px-4 py-5 my-md-5 text-center">
<a href="https://titandistance.com">
<img class="d-block mx-auto mb-4" src="/assets/logos/color.svg" id="logo" alt="Titan Distance" height="64">
</a>
<?php
if (!empty($name)) {
echo "<h1 class='display-5 fw-bold'>Today is " . $name . "</h1>";
}
echo "<div class='col-xs-8 col-lg-10 mx-auto'>";
echo "<p class='lead mb-4'>" . $message . "</p>";
echo "<div class='d-grid gap-2 d-sm-flex justify-content-sm-center'>";
if (!empty($url)) {
echo "<a type='button' class='btn btn-primary btn-lg px-4 me-sm-3' href='" . $url . "'>Meet Home</a>";
}
if (!empty($live)) {
echo "<a type='button' class='btn btn-primary btn-lg px-4 me-sm-3' href='" . $live . "'>Live Results</a>";
}
?>
<a class="btn btn-outline-secondary btn-lg" href="https://titandistance.com/">Return to Titan Distance</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<script>
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.getElementById("logo").src = "/assets/logos/white.svg"
} else {
document.getElementById("logo").src = "/assets/logos/color.svg"
}
</script>
<!-- Cloudflare Web Analytics -->
<script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "7e1ad18bd4604d4486a579c7d687d825"}'></script><!-- End Cloudflare Web Analytics -->
</body>
</html>