  <style>
  #myDiv 
{
  height:100px;
  width:100px;

}
#myDiv img
{
  max-width:100%; 
  max-height:100%;
  margin:auto;
  border-radius:15px;
  display:block;
}
  </style>
	 <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>
        $(function() {
<!--             $(".datepicker").datepicker(); -->
<!--             $(".uniform_on").uniform() -->;
            $(".chzn-select").chosen();
   <!--          $('.textarea').wysihtml5(); -->

        });
        </script>
                  
			      <script type="text/javascript">
  
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(this).data('id');
		  $("#itemid1").val(itemid); 
		  
		  
		   
        });
		 $(document).on("click", "#managebtncheckout", function()
        {
          var itemid2 = $(this).data('id');
		  $("#itemid2").val(itemid2); 
		  
		     var status = $(this).data('status');
		  $("#status").val(status); 
		     var certificateno = $(this).data('certificateno');
		  $("#certificateno").val(shares); 
		  		     var shares = $(this).data('shares');
		  $("#shares").val(shares); 
		   
        });
		
		
    </script>  

<ul class="nav nav-tabs bordered">
			<li class="active">
            	<a href="#add" data-toggle="tab"><i class="entypo-menu"></i> 
						Add Clients 
                    	</a></li>
			<li>
            	<a href="#list" data-toggle="tab"><i class="entypo-plus-circled"></i>
				All Clients
                    	</a></li>
						
							<li>
            	<a href="#upload" data-toggle="tab"><i class="entypo-plus-circled"></i>
					Upload Clients
                    	</a></li>
							<li>
            									 <a href="<?php echo base_url(); ?>admin/viewpallmyplots">Back Home </a>


							</li>
		</ul>
    	<!------CONTROL TABS END------>
        
		<div class="tab-content">
		<?php
					echo $this->session->flashdata('deletemsg'); 
					echo $this->session->flashdata('msg'); 

			?>
            <!----TABLE LISTING STARTS-->
				  <div class="tab-pane box " id="upload">
			
					
<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>
				Bulk Upload of Members  only
            	</div>
            </div>
			<div class="panel-body">


				 <a href="<?php echo base_url();?>downloads/tenats.csv" class="btn btn-success">Download  Tenants  template </a>	 



				<?PHP
				
		
				
				$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'];	
				
                 echo form_open('admin/uploadtenants' , 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">
			  		<input type="hidden" name="plotno" value=""id="plotno" class="form-control" required placeholder="Enter plot no">

    <label for="inputfile" class="col-sm-2 control-label">Upload file</label>
    <div class="col-sm-7">
		  		<input type="file" name="file" value="<?php echo set_value('file'); ?>"id="file" class="form-control" required placeholder="Enter Country Name">
     <span class="text-danger"><?php echo form_error('file'); ?></span>
   </div>
  </div>
   			
  	
             <?php 
   

	
  	//echo $plotno;
  	//echo  $houseno;
		 

             ?>
    
  
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-7">
     
	       <button type="submit" name="btn_uploadmembers"value="members" class="btn btn-primary">Upload Members</button>

    </div>
  </div>
                    
                <?php echo form_close();?>
            </div>
        </div>
    </div>
</div>
			
			
			
			
			</div>
            <div  class="tab-pane box" id="list">
				
    
		<div class="panel panel-primary" data-collapsed="0">
 
<table id="example"  cellspacing="1" class="table table-bordered datatable" width="100%">
             <thead>
			 
         <tr>
		  <th># </th>

 <th>Houses </th>
 <th>Phone Number</th> 
    <th>Tenant Name </th>
	    <th>House No </th>
	<th>Location</th>
		   <th>IDNO Number</th>	
    <th>Phone Number</th>         
	<th>Country</th> 
	<th>Balance</th> 
<th>PIN</th> 
	<th>Update</th> 
<th>More</th>


                 </tr>
             </thead>
<?php
$imgid = rand(100, 990000).time();
 $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'];	
 if(!is_array($tenant)) 

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='12'>";
    
       echo '<div class="alert alert-warning text-center">There is no Tenant found by now from system..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($tenant as $c): 

		 

             ?>



             <tr>
               					 <td><?php echo $c->id ; ?></td> 
 
            <?php 
		$tenantid=$c->id;
 $id=$c->id;

?>
    			

     <td><?php 
					 
					 $occupiedhouse = $this->accomodationmodel->gettotalbookingtenantbyid($tenantid);
					 if($occupiedhouse==FALSE){
						 
						 echo "0";
					 }else{
						 
						
						?>
							   <a class="btn btn-success" id="more" href="<?php echo base_url();?>admin/viewmyhouses?randomitemidentifier=<?php   {echo  $tenantid;}  ?>"><?php   {echo  $occupiedhouse;}  ?> </a>

					 
					 <?php 
					 
					 }
					 ?></td> 
					 <td><?php echo $c->phone ; ?></td> 
				
					 
					 
             <td><?php echo $c->firstname." ".$c->lastname  ;



			 ?></td> 
			 
			 
			 
		                 <td><?php 

$gethousedetails = $this->accomodationmodel->bookingstenantbyid($tenantid);


if(is_array($gethousedetails)) {

   foreach($gethousedetails as $gethousedetailsrow){

 echo"Plot:". $gethousedetailsrow->plotno.", Hs:". $gethousedetailsrow->houseno;
}} else {
      
}
	
 ?></td>	 
			 
			 
			 
			 
			 
			 
				<td><?php echo $c->town ; ?></td> 
<td><?php echo $c->idno ; ?></td>
					<td><?php echo $c->phone ; ?></td> 

                               <td><?php 
$countryid=  $c->country ;
$country = $this->accomodationmodel->getcountrybyid($countryid);


if(is_array($country)) {

   foreach($country as $countryrow){

 echo $countryrow->name;
}} else {
      echo $countryid;
}
	
 ?></td>
		
                     <td><?php echo $c->balance; ?></td>   
                                  <td><?php echo $c->idnumber; ?></td>   

		 
		
					          <td>
                     <a  class="btn btn-primary" id="more" href="<?php echo base_url();?>admin/edittenant?randomitemidentifier=<?php   {echo  $id;}  ?>">Update
  </a>
         </td>
		 	 <td> 

 	

 
 
					<div class="btn-group">
                                    <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown">
                                        More <span class="caret"></span>
                                    </button>
									
                                    <ul class="dropdown-menu dropdown-primary pull-right" role="menu">
                                        
										
										
										
																<li> 
										                              <a target="_blank" id="more" class="btn btn-primary" href="<?php echo base_url();?>user/viewmydocuments?randomitemidentifier=<?php   {echo  $c->id;}  ?>&image_id=<?php   {echo  $c->image_id;}  ?>">Documents  </a>

                                                        </li>
												
                                        <!-- teacher EDITING LINK -->
                                      <?php
										if($usertype=="admin"){
											
											?>
										<!--
											  <li> 
										 <a class="btn btn-danger managebtn" id="managebtndelete"		 data-id='<?php echo  $c->id;?>'     data-toggle='modal' data-target='#myModal<?php  $c->id; ?>'>	 


                                                <i class="glyphicon glyphicon-pencil"></i>
																Delete
                                                </a>
                                                        </li>
														-->
										<?php
										}
										?>
									
                                        <li class="divider"></li>
 <li>
 	
			 <a class="btn btn-info managebtn" id="managebtncheckout"	 data-id='<?php echo  $c->id;?>' data-shares='<?php echo  $c->shares;?>'      data-certificateno='<?php echo  $c->certificateno;?>'   data-status='<?php echo  $c->status;?>'  data-toggle='modal' data-target='#Checkout<?php  $c->id; ?>'>	 

						
                                                <i>Post Shares</i>
						</a>
						</li>
						
						   <li class="divider"></li>
						<li>
 	
							   <a class="btn btn-success" id="more" href="<?php echo base_url();?>admin/viewmyadvancepayment?randomitemidentifier=<?php   {echo  $c->id;}  ?>">

						
                                                <i>View Shares</i>
						</a>
						</li>
						
						
							
						   <li class="divider"></li>
						<li>
 	
							   <a class="btn btn-info" id="more" target="_blank" href="<?php echo base_url();?>admin/rentinvoicedetailsbyuser?transactioncode=<?php   {echo  $c->id;}  ?>">

						
                                                <i>View Utities Invoices </i>
						</a>
						</li>
						
										
						   <li class="divider"></li>
						<li>
 	
							   <a class="btn btn-success" id="more" target="_blank" href="<?php echo base_url();?>admin/allrentinvoice?randomitemidentifier=<?php   {echo  $c->id;}  ?>">

						
                                                <i> View All Invoices</i>
						</a>
						</li>
						
						
						
                                    </ul>
										
                                </div>
</td>
	
             </tr>

             <?php endforeach; ?>

              <?php }?>

        </table>

</div></div>
            <!----TABLE LISTING ENDS--->
            
			
			
			
			
			
			
			
			
			         <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">Post Shares</h4>
      </div>
      <div class="modal-body">
        <h4>Are you sure you want to post Shares to this member Account? </h4>
    
    
	  	

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

		 
                 echo form_open('admin/updatadvancepayment' , 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"  value="advancepayment">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="admin/viewalltenant">
 <input type="hidden" id="itemid2"name="itemid"  value=""><br>

   <div class="form-group">
    <label for="inputshares" class="col-sm-2 control-label">Total shares</label>
    <div class="col-sm-10">
				<input type="text" name="shares"  readonly value="<?php echo set_value('shares'); ?>" id="shares" class="form-control"  placeholder="Enter total shares">
        <span class="text-danger"><?php echo form_error('shares'); ?></span>
	</div>
  </div>
  
  <div class="form-group">
    <label for="inputcertificateno" class="col-sm-2 control-label">Certificate</label>
    <div class="col-sm-10">
				<input type="text" name="certificateno" readonly value="<?php echo set_value('certificateno'); ?>" id="certificateno" class="form-control" required placeholder="Enter certificateno">
        <span class="text-danger"><?php echo form_error('certificateno'); ?></span>
	</div>
  </div>
     <div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">Date Posted</label>
    <div class="col-sm-10">
				<input type="text" name="amount" value="<?php echo set_value('amount',$closedatedate); ?>" id="idno" class="form-control" required placeholder="Enter amount">
        <span class="text-danger"><?php echo form_error('amount'); ?></span>
	</div>
  </div>
  <div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">No of Shares</label>
    <div class="col-sm-10">
				<input type="text" name="amount" value="<?php echo set_value('amount'); ?>" id="idno" class="form-control" required placeholder="Enter No of shares">
        <span class="text-danger"><?php echo form_error('amount'); ?></span>
	</div>
  </div>
  

 
 
 
 <div class="form-group">
    <label for="inputdescription" class="col-sm-2 control-label">	Remarks </label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  class="form-control"  placeholder="Enter remarks"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>
  
  	  <div class="form-group">
						<label for="field-2" class="col-sm-2 control-label">Status</label>
		                    <div class="col-sm-10">
		                        <select name="status" id="status" class="form-control" >

			                         <option value="active">active</option>
									   	 <option value="inactive">inactive</option>

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

			                </div>
	</div>	
		
   </div>
   <div class="modal-footer">
 
 		   		  	         <button type="submit" name="updateadvance" value="advance" class="btn btn-success"> Yes(Post payment)  </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="people">

 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="admin/viewalltenant">
 <input type="hidden" id="itemid1"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>
			<!----CREATION FORM STARTS---->
			<div  class="tab-pane box active" id="add" style="padding: 5px">
							
	 <script type="text/javascript">
        
        
            $(document).ready(function() { 

                
                $("#plotno").change(function(){
                 	var plotnoid = $("#plotno").val();
                     /*dropdown post *///
                      $.ajax({
			 		url:"<?php echo base_url();?>admin/populatehousebyid",
			 		
					 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>
			
	
			
		

			
			
			



		
<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>
				Add new Tenant
            	</div>
            </div>
			<div class="panel-body">





				<?PHP
$session_data = $this->session->userdata('logged_in');

   //
 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];
		 
		  $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
 $transactionid = 'rand' .rand(100, 9900) . 'trc' . time();
				$date= Date('Y-m-d');
				 
		
                 echo form_open('addtenant' , 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;?>

					 <input type="hidden" name="address_1"    value=""  class="form-control">



  <div class="form-group" >
						<label for="field-2" class="col-sm-2 control-label">Member Category</label>
		                    <div class="col-sm-7">
		                        <select name="category" class="chzn-select" id="plotno"  >
		                            <option selected value="">--Select Plot--</option>
									   <?php
									$plot = $this->accomodationmodel->populateallplots();

					$category= $this->usermodel->populateall('category', 'companyid',$companyid);

if(is_array($category)) {

   foreach($category as $categoryrow){

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

   
    <?php

}} else {
    echo 'There is no category.';
}

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






					
  <div class="form-group">

    <label for="inputfirstname" class="col-sm-2 control-label">First Name</label>
    <div class="col-sm-7">
	
	
	
					 <input type="hidden" name="type"    value="tenant"  class="form-control">
					 <input type="hidden" name="view"    value="admin/viewalltenant"  class="form-control">

	
				 <input type="hidden" name="img_id"    value="<?php echo set_value('img_id', $imgid); ?>"  class="form-control">

	<input type="hidden" name="action" value="<?php echo set_value('action','insert'); ?>"id="action" class="form-control" required placeholder="Enter action">
	<input type="hidden" name="transactionid" value="<?php echo set_value('transactionid',$transactionid); ?>"id="transactionid" class="form-control" required placeholder="Enter transactionid">

		  		<input type="text" name="firstname" value="<?php echo set_value('firstname'); ?>"id="firstname" class="form-control" required placeholder="Enter first two names">
     <span class="text-danger"><?php echo form_error('firstname'); ?></span>
   </div>
  </div>
    <div class="form-group">
    <label for="inputlastname" class="col-sm-2 control-label">Surname</label>
    <div class="col-sm-7">
		<input type="text" name="lastname" value="<?php echo set_value('lastname') ;?>" id="lastname" class="form-control"  placeholder="Enter surname">
       <span class="text-danger"><?php echo form_error('lastname'); ?></span>
   </div>
  </div>
   <div class="form-group">
    <label for="inputcompany" class="col-sm-2 control-label">Company</label>
    <div class="col-sm-7">
				<input type="text" name="company" value="<?php echo set_value('company') ;?>" id="company" class="form-control"  placeholder="Enter Your company">
    <span class="text-danger"><?php echo form_error('company'); ?></span>
	</div>
  </div>
    <div class="form-group">
    <label for="inputlocation" class="col-sm-2 control-label">Location</label>
    <div class="col-sm-7">
				<input type="text" name="location" value="<?php echo set_value('location') ;?>" id="exampleInputlocation" class="form-control"  placeholder="Enter Your location">
    <span class="text-danger"><?php echo form_error('location'); ?></span>
	</div>
  </div>
  <div class="form-group">
    <label for="inputphone" class="col-sm-2 control-label">Phone Number</label>
    <div class="col-sm-7">
				<input type="text" name="phone" value="<?php echo set_value('phone'); ?>" id="phone" class="form-control"  placeholder="Enter Your phone">
        <span class="text-danger"><?php echo form_error('phone'); ?></span>
	</div>
  </div>
   <div class="form-group">
    <label for="inputEmail" class="col-sm-2 control-label">Email</label>
    <div class="col-sm-7">
				<input type="email" name="email" value="<?php echo set_value('email') ;?>" id="exampleInputEmail" class="form-control"  placeholder="Enter Your email">
    <span class="text-danger"><?php echo form_error('email'); ?></span>
	</div>
  </div>

   <div class="form-group">
    <label for="inputphone3" class="col-sm-2 control-label">Id Number </label>
    <div class="col-sm-7">
				<input type="phone" name="idno" value="<?php echo set_value('idno'); ?>" id="idno" class="form-control"  placeholder="Enter ID NO">
    <span class="text-danger"><?php echo form_error('idno'); ?></span>
   </div>
  </div>
<div class="form-group">
						<label for="field-2" class="col-sm-2 control-label">Country</label>
		                    <div class="col-sm-7">
		                        <select name="country" class="form-control" id="section_selector_holder">
		                            <option value="">--Select Country--</option>
									   <?php
									$country = $this->accomodationmodel->populateallcountries();


if(is_array($country)) {

   foreach($country as $countryrow){

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

   
    <?php

}} else {
    echo 'There is no other  country for this house.... Please add country first.';
}

?>
			                        
			                    </select>
								     <span class="text-danger"><?php echo form_error('country'); ?></span>
			                </div>
	</div>
	
	
	 <div class="form-group">
						<label for="field-2" class="col-sm-2 control-label">County</label>
		                    <div class="col-sm-7">
		                        <select name="county" class="form-control" id="section_selector_holder">
		                            <option selected="select" value="">--Select County--</option>
									   <?php
									$county = $this->accomodationmodel->populateallallacounties();


if(is_array($county)) {

   foreach($county as $countyrow){

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

   
    <?php

}} else {
    echo 'There is no other  county for this house.... Please add county first.';
}

?>
			                        
			                    </select>
								     <span class="text-danger"><?php echo form_error('county'); ?></span>
			                </div>
	</div>
	
	
		
			
	
	
	
	
	
		  <div class="form-group">
						<label for="field-2" class="col-sm-2 control-label">Gender</label>
		                    <div class="col-sm-7">
		                        <select name="gender" required class="form-control" id="section_selector_holder">
		                            <option value="" selected>--Select Gender--</option>
			                         <option value="Male">Male</option>
									   <option value="Female">Female</option>
			                    </select>
							 <span class="text-danger"><?php echo form_error('gender'); ?></span>

			                </div>
	</div>			
  
   <div class="form-group" >
						<label for="field-2" class="col-sm-2 control-label">Plot Number</label>
		                    <div class="col-sm-7">
		                        <select name="plotno" class="chzn-select" id="plotno"  >
		                            <option selected value="">--Select Plot--</option>
										 <option selected value="na">-N/A-</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>
	
	   <div class="form-group" id="house" style="display: none" >
						<label for="field-2" class="col-sm-2 control-label">House number</label>
		                    <div class="col-sm-7">
		                        <select name="houseno" class="form-control"  id="houseid"   >
		                            <option selected value="">--Select House Number--</option>
									  
			                        
			                    </select>
								
								     <span class="text-danger"><?php echo form_error('houseno'); ?></span>
			                </div>
	</div>
	

		
		
		
		
		
		
		
		
		
		
		
		
	   <div class="form-group">
    <label for="inputphone3" class="col-sm-2 control-label">Entry Date </label>
    <div class="col-sm-7">
				<input type="phone" name="entrydate" value="<?php echo set_value('entrydate',$date); ?>" id="idno" class="form-control"  placeholder="Enter Entry date">
    <span class="text-danger"><?php echo form_error('entrydate'); ?></span>
   </div>
  </div>
  	  <div class="form-group">
						<label for="field-2" class="col-sm-2 control-label">House Status</label>
		                    <div class="col-sm-7">
		                        <select name="status" required class="form-control" id="section_selector_holder">
		                            <option value="" >--Select Status--</option>
			                         <option selected="selected"value="active">active</option>
									   <option value="inactive">inactive</option>
			                    </select>
							 <span class="text-danger"><?php echo form_error('gender'); ?></span>

			                </div>
	</div>
	
	 <div class="form-group">
						<label for="field-2" class="col-sm-2 control-label"> photo</label>
		                    <div class="col-sm-7">
		                      		<input type="file" name="photo" width="400"  value="<?php echo set_value('photo') ;?>" placeholder="Select Image"  class="form-control"  >

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

			                </div>
	</div>
	
	
	
   <div class="form-group">
    <label for="inputaccountname" class="col-sm-2 control-label">Account Name</label>
    <div class="col-sm-7">
				<input type="accountname" name="accountname" value="<?php echo set_value('accountname'); ?>" id="idno" class="form-control"  placeholder="Enter account name">
    <span class="text-danger"><?php echo form_error('accountname'); ?></span>
   </div>
  </div>
  
  
    
   <div class="form-group">
    <label for="inputaccountno" class="col-sm-2 control-label">Account Number</label>
    <div class="col-sm-7">
				<input type="accountno" name="accountno" value="<?php echo set_value('accountno'); ?>" id="idno" class="form-control"  placeholder="Enter  account number">
    <span class="text-danger"><?php echo form_error('accountno'); ?></span>
   </div>
  </div>
     <div class="form-group">
    <label for="inputcertificateno" class="col-sm-2 control-label">Certificate No</label>
    <div class="col-sm-7">
				<input type="certificateno" name="certificateno" value="<?php echo set_value('certificateno'); ?>" id="idno" class="form-control"  placeholder="Enter  certificate number">
    <span class="text-danger"><?php echo form_error('certificateno'); ?></span>
   </div>
  </div>
  
  
    <div class="form-group">
    <label for="inputshares" class="col-sm-2 control-label">Shares</label>
    <div class="col-sm-7">
				<input type="shares" name="shares" value="<?php echo set_value('shares'); ?>" id="idno" class="form-control"  placeholder="Enter  shares">
    <span class="text-danger"><?php echo form_error('shares'); ?></span>
   </div>
  </div>
  
  
   
    <div class="form-group">
    <label for="inputbalance" class="col-sm-2 control-label">Balance</label>
    <div class="col-sm-7">
				<input type="balance" name="balance" value="<?php echo set_value('balance'); ?>" id="idno" class="form-control"  placeholder="Enter  balance">
    <span class="text-danger"><?php echo form_error('balance'); ?></span>
   </div>
  </div>
  
  
  
   <div class="form-group">
    <label for="inputphone3" class="col-sm-2 control-label">Description </label>
    <div class="col-sm-7">
	<textarea name="description" id="ttt" rows="5" placeholder="add message" class="form-control"></textarea>
    <span class="text-danger"><?php echo form_error('description'); ?></span>
   </div>
  </div>
    
  
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-7">
     
	       <button type="submit" name="btn_tenant"value="tenant" class="btn btn-primary">Add Tenant</button>

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






			
			
			
			
			</div></div>
			
			
			
			
			
			
			
			





