-
Notifications
You must be signed in to change notification settings - Fork 4
/
navigation.php
77 lines (69 loc) · 2.84 KB
/
navigation.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
<?php
include "./core/bootstrap.php";
$userService = new UserService();
$main_gymid = $userService->getUserMainClimbingAreas($userid)["main_gym"];
?>
<div>
<nav class = "navbar navbar-default" >
<div class = "container-fluid">
<a class="navbar-brand" href="main.php"><img src="images/Logo-whitebkgd-xs.png"></a>
<ul class="nav navbar-nav navbar-left">
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Workouts <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="workout-input.php">Log Workout</a></li>
<li><a href="past-workouts.php">Past Workouts</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Stats <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="mystats.php">My Stats</a></li>
<li><a href="sitestats.php">Community Stats</a></li>
<li><a href="rankings.php">Rankings</a></li>
<?php
if (is_null($main_gymid)==false) {
?>
<li><a href="gympage.php?gymid=<?php echo $main_gymid ?>">My Gym Stats</a></li>
<?php } ?>
<li><a href="statsfaq.php">Stats FAQ</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Gyms and Crags <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="add-gym.php">Add New Gym/Crag...</a></li>
<li><a href="gyms.php">View Gyms/Crags</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Events <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="eventcalendar.php">Event Calendar</a></li>
<li><a href="add-event.php">Add an Event</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Me <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="main.php">My Dashboard</a></li>
<li><a href="userprofile.php">My Profile</a></li>
<li><a href="setworkoutprefs.php">Workout Preferences</a></li>
<?php
//extract own username
$stmt = $db->prepare("SELECT username FROM users WHERE userid = ?");
$stmt->execute(array($userid));
$username_result = $stmt->fetch(PDO::FETCH_ASSOC);
$username = $username_result['username'];
?>
<li><a href="publicprofile.php?username=<?php echo $username ?>">View Public Profile</a></li>
<li class="divider"></li>
<li><a href="logout.php">Sign Out</a></li>
</ul>
</li>
</ul>
</div>
</nav>
</div>