-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.inc.php
41 lines (35 loc) · 1.17 KB
/
navbar.inc.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
<?php
function printNavBar()
{
global $page;
$page0Class = $page1Class = $page2Class = $page3Class = $page4Class = "";
if ($page == 0) $page0Class = "class='active'";
if ($page == 1) $page1Class = "class='active'";
if ($page == 2) $page2Class = "class='active'";
if ($page == 3) $page3Class = "class='active'";
if ($page == 4) $page4Class = "class='active'";
print <<< EOT
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=#myNavbar>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand $page0Class" href="index.php">FDM Invite</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li $page1Class><a href="about.php">About</a> </li>
<li $page2Class><a href="regInfo.php">Registration Information</a></li>
<li $page3Class><a href="raceday.php">Race Day</a></li>
<li $page4Class><a href="awards.php">Awards/Results</a></li>
</ul>
</div>
</div>
</nav>
EOT;
}
printNavBar();
?>