policybot/application/views/admin/includes/sidebar.php
2021-11-30 16:26:55 +05:30

92 lines
2.9 KiB
PHP

<style>
.sidemenu-container .sidemenu>li>a, .sidemenu-closed.sidemenu-container-fixed .sidemenu-container:hover .sidemenu>li>a {
padding: 10px 15px!important;
}
</style>
<?php
$tableName='menu';
$whereData=array('status'=>1,'parent_id'=>0);
$showField = array('*');
$menus=$this->commonsql_model->selectTable($tableName, $whereData,$showField);
?>
<!-- start sidebar menu -->
<div class="sidebar-container">
<div class="sidemenu-container navbar-collapse collapse fixed-menu">
<div id="remove-scroll" class="left-sidemenu">
<ul class="sidemenu page-header-fixed slimscroll-style" data-keep-expanded="false" data-auto-scroll="true"
data-slide-speed="200" style="padding-top: 20px">
<li class="sidebar-toggler-wrapper hide">
<div class="sidebar-toggler">
<span></span>
</div>
</li>
<!--<li class="sidebar-user-panel">
<div class="user-panel">
<div class="pull-left image">
<img src="<?=base_url();?>bassets/admin/img/dp.jpg" class="img-circle user-img-circle" alt="User Image" />
</div>
<div class="pull-left info">
<p> Dr.Kiran Patel</p>
<a href="#"><i class="fa fa-circle user-online"></i><span class="txtOnline"> Online</span></a>
</div>
</div>
</li>-->
<?php if(isset($menus) && $menus->num_rows()>0){
foreach($menus->result() as $m){
$id=$m->id;
$name=$m->name;
$parent_id=$m->parent_id;
$filename=$m->filename;
$icon=$m->icon;
?>
<li class="nav-item start">
<a href="<?=$filename;?>" class="nav-link nav-toggle">
<i class="material-icons"><?=$icon;?></i>
<span class="title"><?=$name;?></span>
<?php if($filename=="javascript:;"){ ?>
<span class="arrow"></span> <?php } ?>
</a>
<?php $tableName='menu';
$whereData=array('status'=>1,'parent_id'=>$id);
$showField = array('*');
$smenus=$this->commonsql_model->selectTable($tableName, $whereData,$showField);?>
<?php if($smenus->num_rows()>0){ ?>
<ul class="sub-menu">
<?php
foreach($smenus->result() as $sm){
$sname=$sm->name;
$sparent_id=$sm->parent_id;
$sfilename=$sm->filename;
$sicon=$sm->icon;?>
<li class="nav-item ">
<a href="<?=base_url();?><?=$sfilename;?>" class="nav-link ">
<span class="title"><?=$sname;?></span>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
</li>
<?php } } ?>
<li class="nav-item">
<a href="<?=base_url();?>admin/cmenu" class="nav-link nav-toggle">
<i class="material-icons">menu</i>
<span class="title">Custom Menu</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<!-- end sidebar menu -->