user-management-bootstrap/pages/basenav.php

105 lines
3.9 KiB
PHP
Raw Permalink Normal View History

2016-04-20 15:07:12 +02:00
<?php
2016-07-08 00:39:33 +02:00
function declarenavbase()
{
$nav = '
2016-04-20 15:07:12 +02:00
<body>
<div class="brand">Dido System</div>
<div class="address-bar">999 Campo Marzio | BELLINZONA, TI 6500, SWITZERLAND | Tél: +41 (0)78 848-92-94 | Fax: (887) 123-4567</div>
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed -->
<a class="navbar-brand" href="https://controllo.autocontrollo.ch">Dido system</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="https://autocontrollo.ch/">Main site</a>
</li>
<li>
<a href="https://controllo.autocontrollo.ch/">Login</a>
</li>
<li>
<a href="https://controllo.autocontrollo.ch/?p=signup">Signup</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
';
2016-07-08 00:39:33 +02:00
echo $nav;
2016-04-20 15:07:12 +02:00
}
2016-07-08 00:39:33 +02:00
function declarenav($array)
{
$username = $_SESSION['username'];
2016-04-20 15:07:12 +02:00
2016-07-08 00:39:33 +02:00
foreach ($array as list($name, $page)) {
if ($page != 'none') {
$navbar = "
2016-04-20 15:07:12 +02:00
$navbar
<li>
<a href=\"https://controllo.autocontrollo.ch/?p=$page\">$name</a>
</li>
";
2016-07-08 00:39:33 +02:00
}
}
2016-04-20 15:07:12 +02:00
2016-07-08 00:39:33 +02:00
$nav = '
2016-04-20 15:07:12 +02:00
<body>
<div class="brand">Dido System</div>
<div class="address-bar">999 Campo Marzio | BELLINZONA, TI 6500, SWITZERLAND | Tél: +41 (0)78 848-92-94 | Fax: (887) 123-4567</div>
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed -->
<a class="navbar-brand" href="https://controllo.autocontrollo.ch">Dido system</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="https://autocontrollo.ch">Main site</a>
</li>
<li>
<a href="https://controllo.autocontrollo.ch/">Autocontrollo</a>
</li>
'."$navbar".'
<li>
<a href="https://controllo.autocontrollo.ch/logout.php">Logout</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
';
2016-07-08 00:39:33 +02:00
echo $nav;
2016-04-20 15:07:12 +02:00
}