
	 <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>

				   	 <script type="text/javascript">
        
        
            $(document).ready(function() { 

                
                $("#plotno").change(function(){
                 	var plotnoid = $("#plotno").val();
                     /*dropdown post *///
                      $.ajax({
			 		url:"<?php echo base_url();?>admin/populatehouseid",
			 		
					 data: {plotno: $(this).val()},

                    type: "POST",
                    success:function(data){
                        
                        $("#houseid").html(data);
                    }
                
                    });

               
                });

            });
               $(function () {
        $("#plotno").change(function () {
            if ($(this).val() == "") {
                $("#house").hide();
            } 
            else {
                $("#house").show();
            }
        });
    });
          
        </script>
	
        <script>
        $(function() {
<!--             $(".datepicker").datepicker(); -->
<!--             $(".uniform_on").uniform() -->;
            $(".chzn-select").chosen();
   <!--          $('.textarea').wysihtml5(); -->

        });
        </script>
                  
			 

<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#add" data-toggle="tab"><i class="entypo-menu"></i> 
						Search Houses
                    	</a></li>
						
							<li>
 <a data-toggle='modal' data-target='#Checkout' class="btn btn-warning">Bulk check out</a>

           
                    	</a></li>
							<li>
				 <a href="<?php echo base_url(); ?>admin/viewpallmyplots">Go Back</a>
								</li>
						
		</ul>
    	<!------CONTROL TABS END------>
        
		<div class="tab-content">
            <!----TABLE LISTING STARTS-->
			<?php
					echo $this->session->flashdata('deletemsg'); 

			?>
            <div  class="tab-pane box active" id="list">
				
    
		<div class="panel panel-primary" data-collapsed="0">



		

		
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" >
            		<i class="entypo-plus-circled"></i>
				Search for all vacant or Occupied House per Plot
            	</div>
            </div>
			<div class="panel-body">





				<?PHP

 $transactionid = 'rand' .rand(100, 9900) . 'trc' . time();
				$date= Date('Y-m-d');
				echo $this->session->flashdata('msg'); 
		
                 echo form_open('admin/searchallhouse' , array('class' => 'form-horizontal form-groups-bordered validate', '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="field-2" class="col-md-2 control-label">House Name</label>
		                    <div class="col-md-7">
		                        <select name="plotno" class="chzn-select"  width="100%"  required>
		                            <option selected value="">--Select House--</option>
									   <?php
									$plot = $this->accomodationmodel->populateallplots();


if(is_array($plot)) {

   foreach($plot as $plotrow){

    ?>
	    <option  value="<?php echo set_value('plotno',$plotrow->id); ?> "><?=$plotrow->name;?></option>

   
    <?php

}} else {
    echo 'There is no plot in the system.... Please add plot first.';
}

?>
			                        
			                    </select>
								     <span class="text-danger"><?php echo form_error('plotno'); ?></span>
			                </div>
	</div>
	
  
 
	
<input type="hidden" name="houseno" value="<?php echo set_value('houseno','none'); ?>" id="idno" class="form-control" required placeholder="none">


	  <div class="form-group">
						<label for="field-2" class="col-md-2 control-label">Rooms Status</label>
		                    <div class="col-md-7">
		                        <select name="status"  class="form-control" id="section_selector_holder">
		                            <option value="none" selected>--Both vacant and Occupied--</option>
			                         <option value="vacant">Vacant</option>
									   <option value="occupied">Occupied</option>
			                    </select>
							 <span class="text-danger"><?php echo form_error('gender'); ?></span>

			                </div>
	</div>

    
  
  
  <div class="form-group">
    <div class="col-md-offset-2 col-md-7">
     
	       <button type="submit" name="btn_tenant"value="tenant" class="btn btn-primary">View all House</button>

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

		
<div class="row">
	<div class="col-md-12">
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" >
            		<i class="entypo-plus-circled"></i>
			Advance Search for specific room per house
            	</div>
            </div>
			<div class="panel-body">





				<?PHP

 $transactionid = 'rand' .rand(100, 9900) . 'trc' . time();
				$date= Date('Y-m-d');
		
                 echo form_open('admin/searchallhouse' , array('class' => 'form-horizontal form-groups-bordered validate', '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="field-2" class="col-md-1 control-label">House Name</label>
		                    <div class="col-md-2">
		                        <select name="plotno" class="chzn-select" id="plotno"  required>
		                            <option selected value="">--Select House--</option>
									   <?php
									$plot = $this->accomodationmodel->populateallplots();


if(is_array($plot)) {

   foreach($plot as $plotrow){

    ?>
	    <option  value="<?php echo set_value('plotno',$plotrow->id); ?> "><?=$plotrow->name;?></option>

   
    <?php

}} else {
    echo 'There is no plot in the system.... Please add plot first.';
}

?>
			                        
			                    </select>
								     <span class="text-danger"><?php echo form_error('plotno'); ?></span>
			                </div>

	
		
	   <div>
						<label for="field-2" class="col-md-2 control-label">Room number</label>
		                    <div class="col-md-2" id="house" style="display: none" >
		                        <select name="houseno" class="form-control"  id="houseid"   >
		                            <option selected value="none">--All rooms--</option>
									  
			                        
			                    </select>
								
								     <span class="text-danger"><?php echo form_error('houseno'); ?></span>
			                </div>
	</div>
	

	

    
  
  


     
	       <button type="submit" name="btn_tenant"value="tenant" class="btn btn-primary">Search Room</button>
    <?php echo form_close();?>
 
  </div>
  	</div>                  
            
            </div>
        </div>
    </div>
	
	
	
</div>




            <!----TABLE LISTING ENDS--->
            
            
			<!----CREATION FORM STARTS---->
				

			
		

			
			
			

	   <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">Check Out</h4>
      </div>
      <div class="modal-body">
        <h4>Are you sure you want to Check out all customers whoes check out time is below this date and time? </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/updatebulkchekout' , 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-md-2 control-label">Check-Out  Time</label>
    <div class="col-md-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>
 <input type="hidden" id="table"name="table" class="table" placeholder="bookroom" value="bookroom">

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

 		   		  	         <button type="submit" name="bulkcheckout" value="checkout" 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></div>
			
			
			
			
			
			
			
			





