  	<?php
					echo $this->session->flashdata('deletemsg'); 
		   $session_data = $this->session->userdata('logged_in');

   
 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];
$data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	
	 				   $checkoutroom=$this->usermodel->populatuserpermissionsdataarray('accomodation','checkoutroom',$userid);
					   		
	      $viewhouse=$this->usermodel->populatuserpermissionsdataarray('accomodation','viewhouse',$userid);
	      $viewroomcleaned=$this->usermodel->populatuserpermissionsdataarray('accomodation','viewroomcleaned',$userid);

	      $checkin=$this->usermodel->populatuserpermissionsdataarray('accomodation','checkin',$userid);

	      $config=$this->usermodel->populatuserpermissionsdataarray('accomodation','config',$userid);

	      $postexpense=$this->usermodel->populatuserpermissionsdataarray('accomodation','postexpense',$userid);


	      $bankdeposits=$this->usermodel->populatuserpermissionsdataarray('accomodation','bankdeposits',$userid);


	      $housekeeping=$this->usermodel->populatuserpermissionsdataarray('accomodation','housekeeping',$userid);


	      $dailysales=$this->usermodel->populatuserpermissionsdataarray('accomodation','dailysales',$userid);


	      $customerregister=$this->usermodel->populatuserpermissionsdataarray('accomodation','customerregister',$userid);


	      $managehotel=$this->usermodel->populatuserpermissionsdataarray('accomodation','managehotel',$userid);


	      $assignrooms=$this->usermodel->populatuserpermissionsdataarray('accomodation','assignrooms',$userid);


	      $dailypayments=$this->usermodel->populatuserpermissionsdataarray('accomodation','dailypayments',$userid);


	      $dailycollections=$this->usermodel->populatuserpermissionsdataarray('accomodation','dailycollections',$userid);


	      $advancebooking=$this->usermodel->populatuserpermissionsdataarray('accomodation','advancebooking',$userid);


	      $managecustomer=$this->usermodel->populatuserpermissionsdataarray('accomodation','managecustomer',$userid);


	      $managerental=$this->usermodel->populatuserpermissionsdataarray('accomodation','managerental',$userid);

	      $viewreports=$this->usermodel->populatuserpermissionsdataarray('accomodation','viewreports',$userid);
	      $plotexpenses=$this->usermodel->populatuserpermissionsdataarray('accomodation','plotexpenses',$userid);
	      $metereadings=$this->usermodel->populatuserpermissionsdataarray('accomodation','meterreading',$userid);


	 ?>


			<div id="sidebar" class="hidden-print minibar ">
			
			<ul>
						
			
<?php
if( $checkin==true){
 ?>
	 <li> <a id="non-printable"  class="btn btn-default" href="<?php echo base_url(); ?>admin/viewpallmyplots">All Rooms (Buttons)</a></li>

<?php	
}
 ?>
  <?php
if( $bankdeposits==true){
 ?>
				<li>   <a id="non-printable"  class="btn btn-default" href="<?php echo base_url(); ?>user/viewbanks">Make Deposits</a> </li>

<?php	
}
 ?>
  <?php
if( $plotexpenses==true){
 ?>
				<li> <a id="non-printable"   class="btn btn-default" href="<?php echo base_url(); ?>user/viewexpenditure"> Plot expenses</a></li>

<?php	
}
 ?>
 <?php
if( $postexpense==true){
 ?>
				<li> <a id="non-printable"   class="btn btn-default" href="<?php echo base_url(); ?>user/viewexpenses"> General expenses</a></li>

<?php	
}
 ?>
 	
<?php
if( $viewroomcleaned==true){
 ?>
		 		<li> <a id="non-printable"   class="btn btn-default" href="<?php echo base_url(); ?>admin/viewhousekeeping"> House Keeping </a></li>

<?php	
}
 ?>
 
 <?php
if( $housekeeping==true){
 ?>
		 	
			<li> <a id="non-printable"   class="btn btn-default" href="<?php echo base_url(); ?>admin/viewpallmyroomstoclean">Rooms to Clean </a></li>

<?php	
}
 ?>

 

<?php


if(( $dailysales==true)||( $dailypayments==true)){
 ?>

<li> <a id="non-printable"  class="btn btn-default"   href="<?php echo base_url(); ?>admin/salesreceipts"> Daily Receipts  Sales</a></li>

<li> <a id="non-printable"  class="btn btn-warning"   href="<?php echo base_url(); ?>admin/pendingbeds"> Occupied beds</a></li>

<li> <a id="non-printable"  class="btn btn-default"   href="<?php echo base_url(); ?>admin/pendingsalesreceipts"> Pending Invoices</a></li>



<li> <a id="non-printable"  class="btn btn-default"   href="<?php echo base_url(); ?>admin/viewbulkreservation"> Bulk Invoices</a></li>



<?php	
}
 ?>
 <?php
if( $customerregister==true){
 ?>
		<li> <a id="non-printable"  class="btn btn-default"   href="<?php echo base_url(); ?>admin/customerregister">  Customer Register</a></li>

<?php	
}
 ?>

  <?php
if( $managerental==true){
	
		
	$category=0;
	$houseno=0;
	$plotno=0;
 ?>
	<div class="btn-group">
      		    <li> <a id="non-printable"  class="btn btn-default"   href="#">  </a>
				
				
				
				

                                    <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" style="padding:7px;">
                                        Manage  Rentals <span class="caret"></span>
                                    </button>
								
                                    <ul class="dropdown-menu dropdown-info pull-right" role="menu"  >
                                        
                                        <!-- teacher EDITING LINK -->
                                      
						
			
			 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/rentdailypayment">Daily payments</a></li>
			    <li class="divider"></li>
		
					 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/overpayment">Over payments</a></li>
			    <li class="divider"></li>
						 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/searchstatement">View statement</a></li>
												<li class="divider"></li>
		

							   					 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/uploaddailypayment">Upload mpesa payments</a></li>
												<li class="divider"></li>
		
	
		
		
		 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/allpayments">LandLord payments</a></li>
												<li class="divider"></li>
		
			 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/searchhouse">Search for Tenants</a></li>
												<li class="divider"></li>
													 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/viewalltenant">View all Tenants</a></li>
												<li class="divider"></li>
							
		
		
		
                                    </ul>
										
										
										    
										
                                </div>
				
				
				
				</li>

<?php	
}
 ?>
 
 
											  

		
 
 




 <?php
if( $viewreports==true){
 ?>

				<li>   <a id="non-printable"  class="btn btn-default" href="<?php echo base_url(); ?>admin/searchbalance">Detailed Sales report </a> </li>
				

<?php	
}
 ?>
 <?php
if( $advancebooking==true){
 ?>
				<li> <a id="non-printable"  class="btn btn-warning"  href="<?php echo base_url(); ?>admin/pendinbookings"> Rooms Reserved </a></li>  

				<li> <a id="non-printable"  class="btn btn-default"  href="<?php echo base_url(); ?>admin/viewalladvance">Advance Bookings </a></li>  

<?php	
}
 ?>

<?php
if( $managecustomer==true){
 ?>

				 <li> <a id="non-printable"  class="btn btn-default"  href="<?php echo base_url(); ?>admin/viewalltenant">Manage Customer </a></li>  

<?php	
}
 ?>
	
<?php
if( $dailycollections==true){
 ?>

     <li> <a id="non-printable"  class="btn btn-default"  href="<?php echo base_url(); ?>user/viewmydailycollections">Daily Collection  </a></li> 

<?php	
}
 ?>
	
											 	<?php

	
 if( $viewhouse==true){
	 ?>
				<li>   <a id="non-printable"  class="btn btn-default" href="<?php echo base_url(); ?>admin/viewpallmyplotsbuttons">View all Meters </a> </li>



	 	<?php	

 }
  ?>
	
	 <?php
if( $managehotel==true){
 ?>

      		    <li> <a id="non-printable"  class="btn btn-default"   href="<?php echo base_url(); ?>admin/viewallplots"> Manage  Business </a></li>

<?php	
}
 ?>
<?php
if( $config==true){
 ?>

   				<li> <a id="non-printable"   class="btn btn-default" href="<?php echo base_url(); ?>admin/viewallpaymentcharge"> Meter  Charges</a></li>

<?php	
}
 ?>
 <?php
if( $metereadings==true){
 ?>

  	 <li> <a id="non-printable"  class="btn btn-info" href="<?php echo base_url(); ?>admin/viewmeterreadings">Meter Readings</a></li>

<?php	
}
 ?>
  	<?php
if( $config==true){
 ?>

   				<li> <a id="non-printable"   class="btn btn-default" href="<?php echo base_url(); ?>admin/viewalldoorlocks"> Door Locks / Cards</a></li>

<?php	
}
 ?>
					
			</ul>
		</div>
	