-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
97 lines (86 loc) · 5.72 KB
/
sidebar.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
include("admin/conf/config.php");
$email = $_SESSION['email'];
$results = "SELECT level FROM `employee` WHERE email = '$email'" ;
$sql = $conn->query( $results);
foreach( $sql as $row ) {
$accessLevel = $row['level'];
}
?>
<!--side bar - links collection-->
<aside class = "col-lg-3 col-md-4 col-sm-12 col-xs-12 my-3 py-3 mx-0 px-0 card">
<nav class="navbar navbar-expand-lg navbar-expand-md " id = "sidebar-wrapper">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<ul class="sidebar-nav">
<li><a class="sidebar-nav-item" href="dashboard.php" aria-current="page">
<img src = "imgs\dashboard logo.jpg" alt = "logo" > </img>Dashboard</a>
</li>
<?php
if($accessLevel != "Strategic"){
//only STRATEGIC level employee accounts can access
//=> COMPANY information & LOCATION configuration and
//=> Employee Accounts Managment
?>
<li><a class="sidebar-nav-item " href="#" aria-current="page" >
<img src = "imgs\store config.png" alt = "logo" > </img>Company Info Configuration</a>
</li>
<li><a class="sidebar-nav-item " href="#" aria-current="page" >
<img src = "imgs\locations.png" alt = "logo" > </img>Store Location(s)</a>
</li>
<li><a class="sidebar-nav-item" href="#" aria-current="page">
<img src = "imgs\employee account management.png" alt = "logo"></img>Employee Account Management</a>
</li>
<?php }else { ?>
<li><a class="sidebar-nav-item" href="company-info-config.php" aria-current="page">
<img src = "imgs\store config.png" alt = "logo" > </img>Company Info Configuration</a>
</li>
<li><a class="sidebar-nav-item" href="store-location.php" aria-current="page">
<img src = "imgs\locations.png" alt = "logo"></img>Store Location(s)</a>
</li>
<li><a class="sidebar-nav-item" href="view-employee-mgmt.php" aria-current="page">
<img src = "imgs\employee account management.png" alt = "logo"></img>Employee Account Management</a>
</li>
<?php }
//Operational level accounts cannot access => Employee Accounts Mgmt & Suppliers Info Mgmt...
if($accessLevel != "Operational"){ ?>
<li><a class="sidebar-nav-item" href="view-supplier-mgmt.php" aria-current="page">
<img src = "imgs\supplier logo.png" alt = "logo"></img>Suppliers Info Management</a>
</li>
<?php } else { ?>
<li><a class="sidebar-nav-item" href="#" aria-current="page">
<img src = "imgs\supplier logo.png" alt = "logo"></img>Suppliers Info Management</a>
</li>
<?php }
//Accessible by All Levels => Inventory Management
?>
<li><a class="sidebar-nav-item" href="view-inventory-mgmt.php" aria-current="page">
<img src = "imgs\inventory mgmt.jpg" alt = "logo"></img> Inventory Management</a>
</li>
<?php
//Accessible by All Levels => Customer Management
?>
<li><a class="sidebar-nav-item" href="view-customer-mgmt.php" aria-current="page">
<img src = "imgs\user profile.png" alt = "logo"></img>Customer Info Management</a>
</li>
<?php
//Accessible by All Levels => Sale Management
?>
<li><a class="sidebar-nav-item" href="view-sale-mgmt.php" aria-current="page">
<img src = "imgs\sale mgmt.png" alt = "logo"></img>Sale Management</a>
</li>
<?php //only STRATEGIC and Tactical level employee accounts can access into Report sectors...
if($accessLevel != "Operational"){ ?>
<li><a class="sidebar-nav-item" href="report-dashboard.php" aria-current="page">
<img src = "imgs\report.png" alt = "logo"></img>Reporting</a>
</li>
<?php } else { ?>
<li><a class="sidebar-nav-item" href="#" aria-current="page">
<img src = "imgs\report.png" alt = "logo"></img>Reporting</a>
</li>
<?php } ?>
</ul>
</div>
</div>
</nav>
</aside>