BBnepal-Accounts/hr/application/views/bustracking-admin/common/left-menu.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

136 lines
5.4 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Human Resources | Home</title>
<!--styles links-->
<link rel="stylesheet" href="<?php echo str_replace('/hr', '', base_url()); ?>assets_admin/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo str_replace('/hr', '', base_url()); ?>assets_admin/css/jquery-ui.min.css">
<link rel="stylesheet" href="<?php echo str_replace('/hr', '', base_url()); ?>assets_admin/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="<?php echo str_replace('/hr', '', base_url()); ?>assets_admin/css/datatable/buttons.dataTables.min.css">
<link rel="stylesheet" href="<?php echo str_replace('/hr', '', base_url()); ?>assets_admin/css/datatable/dt-custom.css">
<!-- <link rel="stylesheet" href="https://cdn.datatables.net/1.10.22/css/jquery.dataTables.min.css"> -->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/font-family.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/all.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/owl-carousel/css/owl.carousel.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/style-admin.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/style-admin-responsive.css">
<link rel="icon" type="image/x-icon" href="<?php echo base_url(); ?>assets-bustracking/fav.png">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/bootstrap-float-label.min.css" />
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/nepali.datepicker.v3.7.min.css">
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
</head>
<body>
<div class="wraper">
<!--left side content-->
<aside id="mySidebar" class="sideMenu">
<div class="logo-wrap m-0 ">
<!-- <?php echo str_replace('hr/', '', base_url()); ?> -->
<img src="<?php echo str_replace('hr/', '', base_url()); ?>/common_assets/<?= $school_info['logo']; ?>" style="width: 100%;">
</div>
<ul class="side-list admin-sidebar">
<?php
if (!isset($currentURL))
$currentURL = '';
$fullurl = $currentURL;
$url = explode('hr/', $fullurl);
// echo '<pre>';
// print_r($fullurl);
// print_r($url);
// exit();
$CI = &get_instance();
$CI->load->model('HRAdmin_Model');
$adminMenuHere = $CI->HRAdmin_Model->get_admin_menu();
$adminRolePerms = $CI->HRAdmin_Model->get_bt_admin_role_permissions("admin_role_ids IN(" . $_SESSION['hr_admin_role_ids'] . ")");
if (!empty($adminRolePerms)) {
$arpStr = '';
$arpArr = array();
foreach ($adminRolePerms as $arp) {
if ($arpStr == '')
$arpStr = $arp['menu_ids'];
else
$arpStr .= ',' . $arp['menu_ids'];
}
$arpArr = array_unique(explode(',', $arpStr));
// print_r($arpArr);
if (!empty($adminMenuHere)) {
foreach ($adminMenuHere as $key => $menuData) {
// print_r($menuData);
if (in_array($key, $arpArr)) {
if (isset($menuData[$key]) && !empty($menuData[$key])) {
$smPageLinks = array();
foreach ($menuData[$key] as $tmactive) {
array_push($smPageLinks, $tmactive['page_link']);
}
//echo '<pre>'; print_r($smPageLinks);
//echo $url[1];
$mmmActive = '';
if (in_array($url[1], $smPageLinks))
$mmmActive = 'active';
?>
<li class="list listWithDrpdwn <?php echo $mmmActive; ?>">
<a href="javascript:void(0)" id="btn-1" class="dropdown-toggle " data-toggle="collapse" data-target="#<?php echo $menuData['menu_name'] . '-submenu'; ?>" aria-expanded="false">
<!-- <img src="<?php echo base_url(); ?>assets_admin/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
<img src="<?php echo base_url(); ?>assets-bustracking/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
<span><?php echo $menuData['menu_name']; ?></span>
</a>
<div class="nav collapse" id="<?php echo $menuData['menu_name'] . '-submenu'; ?>" role="menu" aria-labelledby="btn-1">
<?php
foreach ($menuData[$key] as $subMenu) {
?>
<a class="dropdown-item <?php if ($url[1] == $subMenu['page_link']) { ?>active<?php } ?>" href="<?php echo base_url() . $subMenu['page_link']; ?>"><?php echo $subMenu['menu_name']; ?></a>
<?php
}
?>
</div>
</li>
<?php
} else {
// print_r($menuData['page_link']);
// echo base_url();
// exit();
?>
<li class="list <?= $url[1] == $menuData['page_link'] ? 'active' : ''; ?>">
<a href="<?php echo base_url() . $menuData['page_link']; ?>" class="dropdown">
<!-- <img src="<?php echo base_url(); ?>assets_admin/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
<img src="<?php echo base_url(); ?>assets-bustracking/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
<span><?php echo $menuData['menu_name']; ?></span>
</a>
</li>
<?php
}
} else {
echo 'A';
}
}
// exit();
}
}
?>
</ul>
</aside>