


	 <link href="<?php echo base_url(); ?>assets/select/chosen.min.css" rel="stylesheet" media="screen">
	
		   
		   		   <script src="<?php echo base_url(); ?>assets/select/chosen.jquery.min.js"></script>

				   <style>
.grid-container {
  display: grid;
  grid-template-columns: auto auto auto ;
  background-color:gray;
  padding: 10px;
 
}
.grid-item {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.8);
  padding:5px;
  font-size: 30px;
  text-align: center;
}
</style>
	
        <script>
        $(function() {
<!--             $(".datepicker").datepicker(); -->
<!--             $(".uniform_on").uniform() -->;
            $(".chzn-select").chosen();
   <!--          $('.textarea').wysihtml5(); -->

        });
        </script>
           <script type="text/javascript">
  
  
		 $(document).on("click", "#managebtncheckout", function()
        {
          var roomidentifier = $(this).data('id');
		  $("#roomidentifier").val(roomidentifier); 
		  
		    var houseno2 = $(this).data('houseno');
		  $("#houseno2").val(houseno2); 
		     var plotno2 = $(this).data('plotno');
		  $("#plotno2").val(plotno2); 
		   
        });
		
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(this).data('id');
		  $("#roomid").val(itemid); 
		  
		  
		   
		   
        });
		
		
    function selectAllCheckBoxes(obj){
        $('input:checkbox:not(:disabled).checkBoxInLoop').prop('checked', jQuery(obj).prop('checked'));
    }

    function unselectCheckBoxUnik(){

        /*first you verify if the quantity of checkboxes equals number of checkboxes*/
        a = $('input:checkbox:not(:disabled).checkBoxInLoop:checked').size();
        b = $('input:checkbox:not(:disabled).checkBoxInLoop').size();

        /*if equals, mark a checkBoxUnik*/
        ((a == b)? $('#checkBoxUnik').prop("checked", true) : $('#checkBoxUnik').prop("checked", false));
    }

		
    </script>     
    
		
		<?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'];	
	      $viewhouse=$this->usermodel->populatuserpermissionsdataarray('accomodation','viewhouse',$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);

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


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

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

			?>
      




<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#add" data-toggle="tab"><i class="entypo-menu"></i> 
			View House Details
                    	</a></li>
						
							<li>
            	<a href="#list" data-toggle="tab"><i class="entypo-plus-circled"></i>
			
				 <a href="<?php echo base_url(); ?>admin/viewpallmyplots">	Go back</a>
                    	</a></li>
						
								<li>
							
								<?php
					if( $checkoutroom==true){
						?>
        <a data-toggle='modal' data-target='#Checkout' class="btn btn-warning">Bulk Check Out</a>


						
					<?php	
					}
					
					?>


                    	</li>
			
					
		</ul>
    	<!------CONTROL TABS END------>
    
            <!----TABLE LISTING STARTS-->
      
	 	<div class="col-md-2">
				<div id="sidebar" class="hidden-print minibar ">
			
			<?php
				$this->load->view('template/accommodationmenu');
			
			?>
		
		</div>
	</div>	
			<div class="col-md-10">

<H1> WELCOME TO ROOM CLEANING WINDOW</H1>

   

<?php
 $grandtotal=0;
echo $this->session->flashdata('msg'); 
 if(is_array($house)) 

 {

?>
 <div class="grid-container">


   <?php

	  $allplotno;
  	foreach ($house as $c): 

		 

             ?>



       
               
            <?php 
		 $houseno=$c->houseno;
	 $plotno=$c->plotno;
 $houseid=$c->id;
 
 $booking  = $this->usermodel->populatealldatanorraythree('bookroom','plotno', $plotno,'houseno', $houseno,'status','active');

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


	  $roomidentifier=$booking[0]['id'];
						 
   
						   

						$checkstatus=$booking[0]["paymentstatus"];
								$creditpaid=$booking[0]["credit"];

?>

 
           
			

  <div class="grid-item">
  <?php
					
			$mystatus=$c->status ;
				if($mystatus=="vacant"){
			
			?>
			                <a class="btn btn-success" id="more" href="<?php echo base_url();?>admin/allocate?randomitemidentifier=<?php   {echo  $houseno;}  ?>&randomitemidentifier1=<?php   {echo  $plotno;}  ?>&roomidentifier=<?php   {echo  $houseid;}  ?>"><div style="padding:10px;font-size: 30px;">    <?php  echo$c->houseno ; ?> </div>Vacant </a>

			<?php
			}else{
				if($cleanrooms==true){
					
						?>
						 <a class="btn btn-danger managebtn" id="managebtncheckout"	data-plotno='<?php echo  $c->plotno;?>' data-houseno='<?php echo  $c->houseno;?>' 	 data-id='<?php echo  $c->id;?>'     data-toggle='modal' data-target='#myCheckout<?php  $c->id; ?>'>             <div style="padding:10px;font-size: 30px;">       <?php  echo$c->houseno ; ?> </div><?php  echo$mystatus ; ?>
						</a>
						<?php

				}else{
					
						?>
						 <a class="btn btn-danger managebtn" id="managebtncheckout"	data-plotno='<?php echo  $c->plotno;?>' data-houseno='<?php echo  $c->houseno;?>' 	 data-id='<?php echo  $c->id;?>'     data-toggle='modal' data-target='#myCheckout2<?php  $c->id; ?>'>             <div style="padding:10px;font-size: 30px;">       <?php  echo$c->houseno ; ?> </div><?php  echo$mystatus ; ?>
						</a>
						<?php
				}
			}
				?>
		
	 
			
		
			
			
			
			
  
</div>
			 
			
			  
			 
				<?php  $c->plotno ;

$allplotno=$c->plotno;				?>
				

             
			  
			  
			  
			  
			  
			  
			  
		

	

             <?php endforeach; ?>
</div>
              <?php }else{
				         echo '<div class="alert alert-warning text-center">There are no   availbale rooms for cleaning by now. Try again later</div>';

				  
				  
			  }?>
			 
			 

</div>
</div>





 <div id="myCheckout" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Clean Rooms</h4>
      </div>
      <div class="modal-body">
        <h3>Are you sure that you have cleaned this room to the satisfaction of the supervisor? </h3>
      </div>
      <div class="modal-footer">
	  	

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

		
                 echo form_open('admin/cleanhouse' , array('class' => 'form-horizontal ', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>  								  		

 <input type="hidden" id="table"name="table" class="table" placeholder="bookroom" value="bookroom">
 <input type="hidden" id="view2"name="view2" class="view2" placeholder="view2" value="">
 <input type="hidden" id="roomidentifier" name="roomidentifier" class="roomidentifier" placeholder="roomidentifier" value="">

 
 	<select class="form-control" name="status" required>
	<option  value=""  >--Select status-</option>


   <option value="vacant" selected >Vacant Ready</option>
				   <option value="Vacant Dirty" >Vacant Dirty</option>
  
<option value="Occupied Dirty" >Occupied Dirty </option>

   <option value="Blocked" >Blocked</option>
   <option value="Reserved" >Reserved</option>


	
</select>
 <input type="hidden" id="action"name="action" class="action" placeholder="update" value="update">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="admin/viewpallmyroomstoclean">
 <input type="hidden" id="itemid1"name="itemid" class="itemid" placeholder="itemid" value=""><br>
           <input type="hidden" id="houseno2"name="houseno" class="form-control" placeholder="houseno"  value="">
 <input type="hidden" id="method"name="method" class="method" placeholder="method" value="single"><br>

          <input type="hidden" id="plotno2"name="plotno" class="form-control" placeholder="plotno"  value="">
 		   		  	         <button type="submit" name="cleanhouse" value="clean" class="btn btn-success"> Yes  </button>

 <button type="button" class="btn btn-danger" data-dismiss="modal">No</button>


	<?php echo form_close();?>
      </div>
    </div>

  </div>

  </div>
		
		







  <div id="Checkout" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Bulk Status Change</h4>
      </div>
      <div class="modal-body">
        <h4>Are you sure you want to change the status in  bulk? </h4>
      </div>
      <div class="modal-footer">
	  	

     
		<?PHP
				$session_data = $this->session->userdata('adminlogged_in');
 echo $this->session->flashdata('msg'); 
    $closedatedate=date("Y-m-d 10:01:01");

		
                 echo form_open('admin/updatebulkstatuschange' , array('class' => 'form-horizontal ', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>  								  		

 <div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">Check-Out  Time</label>
    <div class="col-sm-7">
				<input type="text" name="checkoutdate" value="<?php echo set_value('checkoutdate',$closedatedate); ?>" id="idno" class="form-control" required placeholder="Enter End  Date">
        <span class="text-danger"><?php echo form_error('checkoutdate'); ?></span>
	</div>
  </div>
   <div class="form-group">
    <label for="inputfromstatus" class="col-sm-2 control-label">From Status</label>
    <div class="col-sm-7">
   	<select class="form-control" name="fromstatus" required>
	<option  value=""  >--Select status-</option>
<option value="occupied" selected >Occupied Ready </option>


   <option value="vacant"  >Vacant Ready</option>
				   <option value="Vacant Dirty" >Vacant Dirty</option>
  
<option value="Occupied Dirty" >Occupied Dirty </option>

   <option value="Blocked" >Blocked</option>
   <option value="Reserved" >Reserved</option>


	
</select>
  
  	</div>
  </div>
  
     <div class="form-group">
    <label for="inputtostatus" class="col-sm-2 control-label">To Status</label>
    <div class="col-sm-7">
   	<select class="form-control" name="tostatus" required>
	<option  value=""  >--Select status-</option>
<option value="Occupied Dirty" selected >Occupied Dirty </option>


				   <option value="Vacant Dirty" >Vacant Dirty</option>
  

   <option value="Blocked" >Blocked</option>
   <option value="Reserved" >Reserved</option>


	
</select>
  
  	</div>
  </div>
  
  
  
  
  
  
  
 <input type="hidden" id="table"name="table" class="table" placeholder="bookroom" value="house">

 
 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="admin/viewpallmyroomstoclean">

 		   		  	         <button type="submit" name="bulkstatuschange" value="status" class="btn btn-success"> Yes  </button>

 <button type="button" class="btn btn-danger" data-dismiss="modal">No</button>


	<?php echo form_close();?>
      </div>
    </div>

  </div>

  </div>






<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Delete</h4>
      </div>
      <div class="modal-body">
        <h3>Are you sure you want to delete this item? </h3>
      </div>
      <div class="modal-footer">
	  	

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

		
                 echo form_open('user/deletebyid' , array('class' => 'form-horizontal ', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
 <input type="hidden" id="table"name="table" class="table" placeholder="view" value="house">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="admin/viewpallmyplots">
 <input type="hidden" id="roomid"name="itemid" class="itemid" placeholder="itemid" value=""><br>
          <input type="hidden" id="plotno1"name="plotno" class="form-control" placeholder="plotno"  value="">
 <button type="button" class="btn btn-success" data-dismiss="modal">No</button>
 		  	         <button type="submit" name="btn_delete" value="deletebyid" class="btn btn-danger"> Delete  </button>

	<?php echo form_close();?>
      </div>
    </div>

  </div>

  </div>

</div>
		<!----CREATION FORM STARTS---->
	
</div>




			