<!--Main Menu Disini-->
                    <ul id="sidebarnav">
                        <li class="nav-devider"></li>
                        <!--li class="nav-label">Home</li>
                        <li> <a class="has-arrow  " href="#" aria-expanded="false"><i class="fa fa-tachometer"></i><span class="hide-menu">Dashboard <span class="label label-rouded label-primary pull-right">2</span></span></a>
                            <ul aria-expanded="false" class="collapse">
                                <li><a href="index.html">Ecommerce </a></li>
                                <li><a href="index1.html">Analytics </a></li>
                            </ul>
                        </li-->
					<?php
						$webmaster_grup=$this->session->userdata('webmaster_grup');
                                                $webmasterid=$this->session->userdata('webmaster_marketing');
						$q=GetAll('menu',array('id_parents'=>'where/0','sort'=>'order/ASC','is_active'=>'where/Active'));
						//lastq();
						if($q->num_rows()>0){
							foreach($q->result() as $hasil){
								if($webmaster_grup=='2706'){$allow=1;}else{
	
                                if($this->session->userdata("webmaster_id")=='38'){								
                                $allow=GetValue('view','users_permission',array('menu_id'=>'where/'.$hasil->id,'user_group'=>'where/'.$webmaster_grup));}else{
                                $allow=GetValue('view','users_permission_sf',array('menu_id'=>'where/'.$hasil->id,'user_id'=>'where/'.$webmasterid));}								}
								if($allow==1){
										if($hasil->icon==NULL){$hasil->icon='fa fa-cog';}
													if($hasil->img==''){$hasil->icon=$hasil->icon;}else{
														$hasil->icon='';
													}
								?>
					<li>
						<a class="has-arrow " href="#" aria-expanded="false">
                                                    <!--onClick="renderside(<?php echo $hasil->id?>)"-->
                                                    <i class="menu-icon <?php echo $hasil->icon;?>"  onClick="cobapindah('<?php echo $hasil->filez?>')"><?php if($hasil->img!=NULL){ ?><img src="<?php echo base_url()?>assets/icons/<?php echo $hasil->img;?>" width="24px" height="24px"><?php } ?></i>
							<span class="hide-menu"> <?php echo $hasil->title;?> </span><b class=""></b>
						</a>
                            <ul aria-expanded="false" class="collapse">
                                <?php
						$webmaster_grup=$this->session->userdata('webmaster_grup');
                                                
						$qz=GetAll('menu',array('id_parents'=>'where/'.$hasil->id,'sort'=>'order/ASC','is_active'=>'where/Active'));
                                                if($hasil->id == '99') $qz=GetAll('menu',array('id_parents'=>'where/'.$hasil->id,'sort'=>'order/ASC','is_active'=>'where/Active','id'=>'not_like/134'));
                                                if($hasil->id == '113') $qz=GetAll('menu',array('id'=>'where/zxzs')); 
                                                if($hasil->id == '122') $qz=GetAll('menu',array('id_parents'=>'where/'.$hasil->id,'sort'=>'order/ASC','is_active'=>'where/Active','id'=>'not_like/119'));
						//lastq();
						if($qz->num_rows()>0){
							foreach($qz->result() as $hasilz){
								if($webmaster_grup=='2706'){$allow=1;}else{
								if($this->session->userdata("webmaster_id")=='38'){	
                                                                $allow=GetValue('view','users_permission',array('menu_id'=>'where/'.$hasilz->id,'user_group'=>'where/'.$webmaster_grup));}else{
                                                                $allow=GetValue('view','users_permission_sf',array('menu_id'=>'where/'.$hasilz->id,'user_id'=>'where/'.$webmasterid));} 
								}
								if($allow==1){
				 						if($hasilz->icon==NULL){$hasilz->icon='fa fa-cog';}
													if($hasilz->img==''){$hasilz->icon=$hasilz->icon;}else{
														$hasilz->icon='';
													}
								?>
                                                                <li>
                                                <a href="<?php echo base_url().$hasilz->filez?>"><i class="menu-icon <?php echo $hasilz->icon;?>"  onClick="cobapindah('<?php echo $hasilz->filez?>')"><?php if($hasilz->img!=NULL){ ?><img src="<?php echo base_url()?>assets/icons/<?php echo $hasilz->img;?>" width="16px" height="16px"><?php } ?></i> <?php echo $hasilz->title?></a></li><?php } }}?>
                            </ul>
						
					
                                                     </li> 
                                                                <?php  }?>          
						<?php	}
						}?>
					
					
					<?php if($this->session->userdata('user_type')=='superuser' || $this->session->userdata('webmaster_grup')=='1'){?>
						<li>
                            <a href="<?php echo base_url()?>#" class="dropdown-toggle"><i class="menu-icon glyphicon glyphicon-wrench"></i><span class="menu-text"> Super User Menu</span><b class="arrow fa fa-angle-down"></b></a>
							<b class="arrow"></b>
                            <ul aria-expanded="false" class=​"collapse">
                                <?php if($this->session->userdata('webmaster_grup')=='270611'){?>
                                <li><a href="<?php echo base_url()?>admin"><i class="glyphicon glyphicon-user"></i> User Management</a></li><?php }?>
                                <li><a href="<?php echo base_url()?>admin_grup"><i class="glyphicon glyphicon-user"></i> Admin Grup</a></li>
                                <li><a href="<?php echo base_url()?>menu"><i class="glyphicon glyphicon-list"></i> Menu</a></li>
                                <!--li><a href="<?php echo base_url()?>menu_auth"><i class="glyphicon glyphicon-warning-sign"></i> Menu Authorization</a></li-->
                            </ul>
							
                        </li>
					<?php }?>
				</ul>
									
				<!-- /.nav-list -->

				<!-- /section:basics/sidebar.layout.minimize -->
				
						<?php //$this->load->view('layout/sidesetting')?>
			<?php //$this->load->view('layout/sidemenu')?>
			
