-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.php
executable file
·42 lines (39 loc) · 1.43 KB
/
menu.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
<?php
function showMenu($activeMenu) {
$menuToShow = array( "0"=> array("Name" => "Home", "URL" => "index.php"),
"1" => array("Name" => "Configuration", "URL" => "configuration.php"),
"2" => array("Name" => "Commands", "URL" => "commands.php"),
"3" => array("Name" => "Controls", "URL" => "webservice-client.php"),
"4" => array("Name" => "Network", "URL" => "network.php"),
"5" => array("Name" => "Upload", "URL" => "fileupload.php")
);
echo '<!-- Fixed navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Open Striato</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">';
$i = 0;
foreach ($menuToShow as $v) {
if ($activeMenu==$i) {
echo '<li class="active">';
} else {
echo '<li>';
}
echo "<a href=".$v["URL"].">".$v["Name"]."</a>";
$i++;
}
echo ' </ul>
</div><!--/.nav-collapse -->
</div>
</nav>';
}
?>