[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: sidebar.php
<?php $username = $_SESSION['username_Xw211qAAsq4']; $shopname = $_SESSION['business_name_Xw211qAAsq4']; ?> <div data-simplebar class="h-100"> <div class="navbar-brand-box"> <a href="#" class="logo"> <i class="mdi mdi-album"></i> <span style="font-size:15px"> <?= $shopname;?> </span> <button type="button" class="btn btn-sm mr-2 d-lg-none px-3 font-size-16 header-item waves-effect" id="vertical-menu-btn"> <i class="fa fa-fw fa-bars"></i> </button> </a> </div> <div id="sidebar-menu"> <!-- Left Menu Start --> <ul class="metismenu list-unstyled" id="side-menu"> <li class="menu-title">Menu</li> <li> <a href="index.php" class="waves-effect"><i class="mdi mdi-home-analytics"></i><span class="badge badge-pill badge-primary float-right"></span><span>Dashboard</span></a> </li> <li> <?php $stmt = $con->prepare("SELECT account_type FROM barber_admin WHERE username = ? and business_name = ?"); $stmt->execute(array($username,$shopname)); $userstatus = $stmt->fetchAll(); foreach($userstatus as $sta) { $namee = $sta['account_type']; } $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Service Category'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="service-category" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Services category</span></a> </li> <?php } elseif($namee != "Admin") { ?> <li><a href="service-category" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Services category</span></a> </li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Service'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="services" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Services</span></a> </li> <?php } elseif($namee != "Admin") { ?> <li><a href="services" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Services</span></a> </li> <?php } else {?> <?php }?> <li> <a href="javascript: void(0);" class="has-arrow waves-effect"><i class="mdi mdi-table-merge-cells"></i><span>Services Sales</span></a> <ul class="sub-menu" aria-expanded="false"> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'In-House Sales'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="today-sales"> Today In-house Sales</a></li> <li><a href="appointment">Appointment</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="today-sales"> Today In-house Sales</a></li> <li><a href="appointment">Appointment</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Online Appointments'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="sales">All Service Sales</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="sales">All Service Sales</a></li> <?php } else {?> <?php }?> </ul> </li> <li> <a href="javascript: void(0);" class="has-arrow waves-effect"><i class="mdi mdi-table-merge-cells"></i><span>Products</span></a> <ul class="sub-menu" aria-expanded="false"> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Suppliers'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="suppliers">Suppliers</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="suppliers">Suppliers</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Product Stock'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="product-stock">Product stock</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="product-stock">Product stock</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Product Stock'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="pos">POS</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="pos">POS</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Product Sales'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="product-sales">Product sales</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="product-sales">Product sales</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Product Out of Stock'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="out-of-stock">Out of stock</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="out-of-stock">Out of stock</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Add New Stock'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="add-new-stock">Add new stock</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="add-new-stock">Add new stock</a></li> <?php } else {?> <?php }?> </ul> </li> <li> <a href="javascript: void(0);" class="has-arrow waves-effect"><i class="mdi mdi-black-mesa"></i><span>Purchases</span></a> <ul class="sub-menu" aria-expanded="false"> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Vendors'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="vendors">Vendor</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="vendors">Vendor</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Expenses'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="expenses">Expenses</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="expenses">Expenses</a></li> <?php } else {?> <?php }?> </ul> </li> <li> <a href="javascript: void(0);" class="has-arrow waves-effect"><i class="mdi mdi-black-mesa"></i><span>Payroll</span></a> <ul class="sub-menu" aria-expanded="false"> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Payroll'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="payroll">Record Payroll</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="payroll">Record Payroll</a></li> <?php } else {?> <?php }?> </ul> </li> <li class="menu-title">More</li> <li> <a href="javascript: void(0);" class="has-arrow waves-effect"><i class="mdi mdi-format-page-break"></i><span>Staff</span></a> <ul class="sub-menu" aria-expanded="false"> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Employee'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="department">Department </a></li> <li><a href="employees">Employees </a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="department">Department </a></li> <li><a href="employees">Employees </a></li> <?php } else {?> <?php }?> <li><a href="employee-schedule">Employees Schedule</a></li> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Commission Rate'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="commission-rate">Commission rate</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="commission-rate">Commission rate</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Manage Users'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="manage-users">Account managers</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="manage-users">Account managers</a></li> <?php } else {?> <?php }?> </ul> </li> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Customers'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="customers" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Customers</span></a> </li> <?php } elseif($namee != "Admin") { ?> <li><a href="customers" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Customers</span></a> </li> <?php } else {?> <?php }?> <li> <a href="javascript: void(0);" class="has-arrow waves-effect"><i class="mdi mdi-poll"></i><span>Reports</span></a> <ul class="sub-menu" aria-expanded="true"> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Sales Report'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="sales_report">Sales report</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="sales_report">Sales report</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Commission Rate'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="comission_report">Commission report</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="comission_report">Commission report</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Expenses Report'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="expenses_report">Expenses report</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="expenses_report">Expenses report</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Customers Report'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="customer_report">Customer report</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="customer_report">Customer report</a></li> <?php } else {?> <?php }?> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee' and page_name = 'Products Report'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <li><a href="product_report">Products report</a></li> <?php } elseif($namee != "Admin") { ?> <li><a href="product_report">Products report</a></li> <?php } else {?> <?php }?> </ul> </li> <?php $select_role = mysqli_query($new,"SELECT * FROM role_permissions WHERE business_name = '$shopname' and type = '$namee'"); $rowroles = mysqli_fetch_array($select_role); $rolestatus = $rowroles['status']; $page = $rowroles['page_name']; if($rolestatus == "1"){?> <?php } elseif($namee != "Admin") { ?> <li><a href="role-permissions" class=" waves-effect"><i class="mdi mdi-calendar-range-outline"></i><span>Role permission</span></a> </li> <?php } else {?> <?php }?> </ul> </div> <!-- Sidebar --> </div>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002