<div class="static-sidebar-wrapper sidebar-blue">
                    <div class="static-sidebar">
                        <div class="sidebar">
	<div class="widget" id="widget-profileinfo">
        <div class="widget-body">
            <div class="userinfo ">
                <div class="avatar pull-left">
                    <img src="<?=base_url()?>assets/demo/avatar/avatar_15.png" class="img-responsive img-circle"> 
                    <div class="editprof" ><a href="<?=site_url(ADMINFOLDER."/admins/editadmin/".$this->session->userdata("AdminID"))?>">Edit Profile</a> </div>
                </div>
                <div class="info">
                    <span class="username"><?=$this->session->userdata("userName")?></span>                    
                    <span class="useremail"><a href="<?=site_url(ADMINFOLDER."/logout")?>">Logout</a></span>
                </div>

                <div class="acct-dropdown clearfix dropdown">
                    <span class="pull-left"><span class="online-status online"></span>Online</span>
                    <!-- <span class="pull-right dropdown-toggle" data-toggle="dropdown"><a href="javascript:void(0)" class="btn btn-fab-caret btn-xs btn-fab"><i class="material-icons">arrow_drop_down</i><div class="ripple-container"></div></a></span>
                    <ul class="dropdown-menu">
                        <li><span class="online-status online"></span> Online</li>
                        <li><span class="online-status online"></span> Online</li>
                        <li><span class="online-status online"></span> Online</li>
                        <li><span class="online-status online"></span> Online</li>
                    </ul> -->
                </div>
            </div>
        </div>
    </div>
	<div class="widget stay-on-collapse" id="widget-sidebar">
        <nav role="navigation" class="widget-body">
	<ul class="acc-menu">
            <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/home")?>"><span class="icon">
		<i class="material-icons">home</i></span><span>Dashboard</span><span class="badge badge-teal">2</span></a></li>
                
                
                
                
                <!--// ==================================  menus depend on permissions-->
                <?
                $permisisonid = $this->session->userdata("UperId");
                if($permisisonid != 0)
                $useradminmenus = $this->general->get_query_result("Select AM.* From ed_adminmenus AM Left Join ed_permissions P ON AM.AMID = P.AdminMenuID Left Join ed_permissionlevel PL ON P.PLID = PL.PLID where PL.PLID = ".$permisisonid." AND P.View = 1 AND AM.PAMID = 0");
                else
                $useradminmenus = $this->general->get_query_result("Select AM.* From ed_adminmenus AM where AM.PAMID = 0");
                
                foreach($useradminmenus as $row)
                {                             
                    $submenu =  $this->general->getAllRecordsWhere(ADMINMNEUS,array("PAMID" => $row->AMID));
                ?>
                    <li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">pages</i></span><span><?=$row->MenuName?></span></a>
                    <ul class="acc-menu">   
                        
                        <?
                        foreach($submenu as $ro)
                        {
                        ?>
                            <li><a  class="withripple" href="<?=$ro->MenuURL?>"><?=$ro->MenuName?></a></li>                                                    
                        <?
                        }
                        ?>    
                            
                    </ul>
                    </li>
                <?
                }
                ?>
                
                
        
                <!--// ============================================ old menu
                <li class="nav-separator"><span>USERS</span></li> 
		<li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">flash_on</i></span><span>Admins</span></a>
			<ul class="acc-menu">
				<li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/admins/")?>">List All Admins</a></li>
				<li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/admins/AddItem")?>">Create New Admin</a></li>				
			</ul>
		</li>

		<li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">settings</i></span><span>Customers</span></a>
			<ul class="acc-menu">
				<li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/customers")?>">List All Customers</a></li>			                                               
			</ul>
		</li>

        <li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">shuffle</i></span><span>Suppliers</span></a>
        	<ul class="acc-menu">
        		<li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/suppliers")?>">List All Providers</a></li>				
        	</ul>
        </li>
		
		

		

        <li class="nav-separator"><span>Sales</span></li>


        <li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">pages</i></span><span>Products</span></a>
                <ul class="acc-menu">                                        
                        <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/products/")?>">Product Management</a></li>
                        <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/products/productslist/")?>">Product Listing</a></li>
                        <li><a  class="withripple" href="extras-profile.html">Purchases</a></li>
                        <li><a  class="withripple" href="extras-invoice.html">Invoices</a></li>				                        
                </ul>
        </li>


        <li class="nav-separator"><span>Reports</span></li>

        <li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">email</i></span><span>Revenue</span></a>
                <ul class="acc-menu">
                        <li><a  class="withripple" href="app-inbox.html">All</a></li>
                        <li><a  class="withripple" href="app-inbox-read.html">Provider Revenue</a></li>				
                </ul>
        </li>
                
        

<li class="nav-separator"><span>Website Map</span></li>

                
                <li><a  class="withripple" href="javascript:;"><span class="icon"><i class="material-icons">pages</i></span><span>Categories</span></a>
                <ul class="acc-menu">                                                                			
                        <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/categories/")?>">Category List</a></li>                        
                        <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/fieldsgroups/")?>">Fields Groups</a></li>                        
                        <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/fields/")?>">Fields List</a></li>                        
                        <li><a  class="withripple" href="<?=site_url(ADMINFOLDER."/choices/")?>">Choices List</a></li>                        
                </ul>
        </li>
                
// =================================================================-->


        

        
		
	</ul>
</nav>
    </div>
</div>
                    </div>
                </div>