-
Notifications
You must be signed in to change notification settings - Fork 4
/
header.php
executable file
·67 lines (62 loc) · 2.26 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
63
64
65
66
67
<?php if(empty($title)) $title = "Chauffeur";
if(isset($_COOKIE["user"])) session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><?php if(isset($title)) echo $title; ?></title>
<link rel="shortcut icon" href="/images/icon.png">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="jquery-3.3.1.min.js"></script>
<script src="/bootstrap/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
<link href="/bootstrap/sticky-footer-navbar.css" rel="stylesheet">
<link rel="stylesheet" href="/fontawesome/css/fontawesome-all.min.css">
<style>
.nav-navy_blue
{
background-color:#001f3f !important;
}
</style>
</head>
<body>
<script type="text/javascript">var j = jQuery.noConflict();</script>
<header>
<nav class="navbar navbar-expand-lg navbar-dark nav-navy_blue">
<a
class="navbar-brand" href="#">
<!--<img src="/images/icon.png" height="20px" />--> The Chauffeur</a>
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link text-white" href="/index.php"><i class="fa fa-home"></i> Home</a>
</li>
</ul>
<ul class="navbar-nav">
<?php include_once 'functions.php';
if(isset($_COOKIE["user"]))
echo '<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="" id="dropdown_user" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user"></i> Hello '.$_SESSION["user"].'</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown_user">
<a class="dropdown-item" href="/'.strtolower($_SESSION['group']).'.php">Dashboard</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/logout.php">logout</a>
</div>';
else
echo '<li class="nav-item"><a class="nav-link text-white" href="/login.php"><i class="fa fa-user"></i> Login</a>';
?>
</li>
</ul>
</nav>
</header>
<main role="main" class="container">
<?php
if(!isset($notloggedin)){
if(!isset($_COOKIE["user"]))
{
echo '<div class="container">
<h2 class="alert alert-danger">You have to login to access this page</h2><br>
</div>';
include 'footer.php'; die;
}
}
?>