-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
62 lines (58 loc) · 2.36 KB
/
header.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
<?php
require_once('functions.php');
function echoActiveClassIfRequestMatches($requestUri)
{
$current_file_name = basename($_SERVER['REQUEST_URI']);
if ($current_file_name == $requestUri)
echo 'class="active"';
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Eventit</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container header">
<div class="logo"></div>
<nav class="navbar navbar-default">
<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>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li <?=echoActiveClassIfRequestMatches("index.php")?>>
<a href="index.php"><i class="fa fa-home"></i> Forside</a>
</li>
<li <?=echoActiveClassIfRequestMatches("eventliste.php")?>>
<a href="eventliste.php"><i class="fa fa-calendar"></i> Arrangementer</a>
</li>
<li <?=echoActiveClassIfRequestMatches("orglist.php")?>>
<a href="orglist.php"><i class="fa fa-sitemap"></i> Arrangører</a>
</li>
<li <?=echoActiveClassIfRequestMatches("loginform.php")?>>
<a href="login.php"><?=(loggedIn() == true) ? "<i class='fa fa-sign-out'></i> Log ud" : "<i class='fa fa-sign-in'></i> Log ind"?></a>
</li>
<li <?=echoActiveClassIfRequestMatches("opretform.php")?> <?=echoActiveClassIfRequestMatches("minside.php")?>>
<a href="opretform.php"><?=(loggedIn() == true) ? "<i class='fa fa-bars'></i> Min side" : "<i class='fa fa-user'></i> Opret bruger"?></a>
</li>
<li <?=echoActiveClassIfRequestMatches("opret-arrangement.php")?>>
<a href="opret-arrangement.php"><i class='fa fa-plus-square'></i> Opret arrangement</a>
</li>
</ul>
<form class="navbar-form navbar-right">
<input type="text" placeholder="Søg" class="form-control" disabled="disabled">
<button type="submit" class="btn btn-success" disabled="disabled">Søg</button>
</form>
</div><!--/.navbar-collapse -->
</nav>
</div>