173 lines
8.3 KiB
PHP
173 lines
8.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>LMS | Home</title>
|
|
<!--styles links-->
|
|
<link rel="icon" type="image/x-icon" href="<?php echo base_url(); ?>assets-lms/fav.png">
|
|
|
|
<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-lms/css/bootstrap-select.css"> -->
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/font-family.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/all.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/responsive.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/owl-carousel/css/owl.carousel.min.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin.css">
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/style-admin-responsive.css">
|
|
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-lms/css/nepali.datepicker.v3.7.min.css">
|
|
<script src="<?= base_url(); ?>assets-lms/js/nepali.datepicker.v3.7.min.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="wraper">
|
|
<!--left side content-->
|
|
<aside id="mySidebar" class="sideMenu">
|
|
<div class="logo-wrap">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/erisn-white.png">
|
|
</div>
|
|
|
|
<ul>
|
|
<?php
|
|
$linSessData = $_SESSION['lmsAULoginData'];
|
|
if (!isset($linSessData['lms_lin_login']))
|
|
redirect(base_url() . 'admin');
|
|
//echo '<pre>'; print_r($linSessData);exit;
|
|
|
|
$currentURL = current_url();
|
|
$url = explode(base_url(), $currentURL);
|
|
//echo $currentURL;
|
|
//echo '<pre>';print_r($url);
|
|
|
|
$CI = &get_instance();
|
|
$CI->load->model('LmsAdmin_Model');
|
|
|
|
$adminMenuHere = $CI->LmsAdmin_Model->get_admin_menu();
|
|
//echo '<pre>'; print_r($adminMenuHere);exit;
|
|
|
|
$theRoleIds = '';
|
|
$adminRolesHere = $CI->LmsAdmin_Model->get_admin_details('', "SELECT admin_role_ids FROM lms_admin WHERE id = " . $linSessData['lms_lin_id']);
|
|
if (isset($adminRolesHere[0]['admin_role_ids']) && $adminRolesHere[0]['admin_role_ids'] != '')
|
|
$theRoleIds = $adminRolesHere[0]['admin_role_ids'];
|
|
$adminRolePerms = array();
|
|
if ($theRoleIds != '')
|
|
$adminRolePerms = $CI->LmsAdmin_Model->get_lms_admin_role_permissions("admin_role_ids IN(" . $theRoleIds . ")");
|
|
|
|
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));
|
|
|
|
if (!empty($adminMenuHere)) {
|
|
foreach ($adminMenuHere as $key => $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[0];
|
|
$mmmActive = '';
|
|
if (in_array($url[1], $smPageLinks))
|
|
$mmmActive = 'active';
|
|
?>
|
|
<li class="list <?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-lms/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
|
|
<img src="<?php echo base_url(); ?>assets-lms/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 {
|
|
?>
|
|
<li class="list <?php if ($url[1] == $menuData['page_link']) { ?>active<?php } ?>">
|
|
<a href="<?php echo base_url() . $menuData['page_link']; ?>" class="dropdown">
|
|
<!-- <img src="<?php echo base_url(); ?>assets-lms/images/<?php echo $menuData['inactive_icon']; ?>" class="icon-inactive"> -->
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/<?php echo $menuData['active_icon']; ?>" class="icon-active">
|
|
<span><?php echo $menuData['menu_name']; ?></span>
|
|
</a>
|
|
</li>
|
|
<?php
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</ul>
|
|
|
|
|
|
|
|
<!--<ul class="side-list">
|
|
<li class="list active">
|
|
<a href="index.html">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/dashboard1.png" class="icon-inactive">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/dashboard2.png" class="icon-active">
|
|
<span>Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li class="list " >
|
|
<a href="subject-create.html" >
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/books2.png" class="icon-inactive">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/books1.png" class="icon-active">
|
|
<span>Books</span>
|
|
</a>
|
|
|
|
</li>
|
|
<li class="list ">
|
|
<a href="syllabus-list.html">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/issued2.png" class="icon-inactive">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/issued1.png" class="icon-active">
|
|
<span>Issued Books</span>
|
|
</a>
|
|
</li>
|
|
<li class="list">
|
|
<a href="course-list.html">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/returned2.png" class="icon-inactive">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/returned1.png" class="icon-active">
|
|
<span>Returned Books</span>
|
|
</a>
|
|
</li>
|
|
<li class="list">
|
|
<a href="classroom-create.html">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/student2.png" class="icon-inactive">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/student1.png" class="icon-active">
|
|
<span>Students</span>
|
|
</a>
|
|
</li>
|
|
<li class="list listWithDrpdwn">
|
|
<a href="classroom-create.html" class="dropdown-toggle" data-toggle="collapse" data-target="#submenu1" aria-expanded="false">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/student2.png" class="icon-inactive">
|
|
<img src="<?php echo base_url(); ?>assets-lms/images/student1.png" class="icon-active">
|
|
<span>Authentication</span>
|
|
</a>
|
|
<div class="nav collapse tes " id="submenu1" role="menu" aria-labelledby="btn-1">
|
|
<a class="dropdown-item active" href="#">Submenu 1</a>
|
|
<a class="dropdown-item" href="#">option 2 submenu</a>
|
|
<a class="dropdown-item" href="#">Something submenu</a>
|
|
</div>
|
|
</li>
|
|
</ul>-->
|
|
</aside>
|
|
<!--End left side content-->
|