-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathheader.php
More file actions
55 lines (45 loc) · 1.42 KB
/
Copy pathheader.php
File metadata and controls
55 lines (45 loc) · 1.42 KB
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>E-Fresh Billing System</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="banner">
<div id="welcome">
<?php if (isset($_SESSION['user_id'])) : ?>
<span>Welcome<br><?php echo $_SESSION['username']; ?></span>
<?php else : ?>
<span><i>guest</i></span>
<?php endif; ?>
</div>
<div id="logout">
<?php if (isset($_SESSION['user_id'])) : ?>
<form action="index.php" method="post">
<span><input class="button_logout" type="submit" value="Logout" name="logout"></span>
</form>
<?php endif; ?>
</div>
<?php
$menu1 = $menu2 = $menu3 = $menu4 = 'menu_inactive';
$filename = basename($_SERVER['SCRIPT_NAME'], '.php');
if ($filename == 'bill') {
$menu1 = 'menu_active';
} else if ($filename == 'customers') {
$menu2 = 'menu_active';
} else if ($filename == 'inventory') {
$menu3 = 'menu_active';
} else if ($filename == 'info') {
$menu4 = 'menu_active';
}
?>
<div id="title">E-Fresh Billing System</div>
<div id="menu">
<div id="<?php echo $menu1; ?>"><a href="bill.php">Bill</a></div>
<div id="<?php echo $menu2; ?>"><a href="customers.php">Customers</a></div>
<div id="<?php echo $menu3; ?>"><a href="inventory.php">Inventory</a></div>
<div id="<?php echo $menu4; ?>"><a href="info.php">Info</a></div>
</div>
</div>
<div id="box">