-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsidebar.php
99 lines (81 loc) · 3.74 KB
/
sidebar.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
<!-- start: sidebar -->
<aside id="sidebar-left" class="sidebar-left">
<div class="sidebar-header">
<div class="sidebar-title">
Navigation
</div>
<div class="sidebar-toggle d-none d-md-block" data-toggle-class="sidebar-left-collapsed" data-target="html" data-fire-event="sidebar-left-toggle">
<i class="fas fa-bars" aria-label="Toggle sidebar"></i>
</div>
</div>
<div class="nano">
<div class="nano-content">
<nav id="menu" class="nav-main" role="navigation">
<ul class="nav nav-main">
<li>
<a class="nav-link" href="dashboard.php">
<i class="fas fa-home" aria-hidden="true"></i>
<span>Dashboard</span>
</a>
</li>
<li>
<a class="nav-link" href="profile.php">
<i class="fas fa-user" aria-hidden="true"></i>
<span>Profile Settings</span>
</a>
</li>
<li>
<a class="nav-link" href="index.php?logout">
<i class="fas fa-power-off" aria-hidden="true"></i>
<span>Log Out</span>
</a>
</li>
</ul>
</nav>
<hr>
<div class="sidebar-header">
<div class="sidebar-title">
Upcoming Games
</div>
</div>
<ul class="nav nav-main">
<?php
$game_res=mysqli_query($conn, "SELECT gid, DATE_FORMAT(schedule, '%M %e') as dt, DATE_FORMAT(schedule, '%h:%i %p') as tm, status, cost FROM games where schedule >= CURDATE() and status!=0 order by schedule limit 5;");
if(mysqli_num_rows($game_res)>0)
{
while($row=mysqli_fetch_array($game_res))
{
$gid2=$row['gid'];
//echo "<li><span class='title'><a href='game.php?gid=$gid2'>Game #$gid2 - $row[1]</a></span>";
//echo "<span class='description truncate'></span>$row[2] Game Today</li>";
echo "<li><a href='game.php?gid=$gid2' style='color:#0088cc'><i class='fas fa-gamepad' aria-hidden='true'></i>
<span><b>Game #$gid2</b> - $row[1] ".$row['tm']."</span>
</a></li>";
}
}
else
{
//echo "<li class='red' style='padding-bottom:100px;margin-top:20px;'><span class='title'>No Games Scheduled Today!</span>";
}
?>
<li><hr>
<a href='all_games.php' style='color:#0088cc'><i class='fas fa-list' aria-hidden='true'></i>
<span>View Games Archive</span>
</a>
</li>
</ul>
<hr class="separator" />
</div>
<script>
// Maintain Scroll Position
if (typeof localStorage !== 'undefined') {
if (localStorage.getItem('sidebar-left-position') !== null) {
var initialPosition = localStorage.getItem('sidebar-left-position'),
sidebarLeft = document.querySelector('#sidebar-left .nano-content');
sidebarLeft.scrollTop = initialPosition;
}
}
</script>
</div>
</aside>
<!-- end: sidebar -->