

 
 <div class="row">
  
   	

   	<div class="col-md-12">

  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				 <span class="pull-right"> View viewemployees</span>
	  <a data-toggle='modal' data-target='#addModal' class="btn btn-primary">Add Employee </a>
				 
            	</div>
            </div>
			<div class="panel-body">

			
	<div class="widget-content nopadding table_holder table-responsive" >				
				<?PHP


				echo $this->session->flashdata('msg'); 
								?>	
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
	
									
				<table class="tablesorter table table-bordered  table-hover" id="sortable_table">			

             <thead>
         <tr>
     <th>ID Number</th>
     <th>First Name</th>
	  <th>Last Name</th>
	     <th>Email</th>
<th>Phone</th>	
 
		   <th>status</th> 
		

<th>Action</th>


                 </tr>
             </thead>
<?php
 if(!is_array($viewemployees)) {
				    echo '<div class="alert alert-danger text-center">There was no employee found in the system. Feel free to add.</div>';

			 }else{
 if(!is_array($viewemployees)) 

 {


   echo "<tr  style='margin-bottom:0px;margin-top:0px;' '>";
      echo "<td colspan='1'>";
    
       echo '<div class="alert alert-warning text-center">There no records found..</div>';
    echo "</td>";
   echo "</tr>";
    }else {
?>
    
             <?php 
  
  	foreach ($viewemployees as $c): 

		 

             ?>



             <tr>
                
            <?php 
$id=$c->id;


?>

              
  <td><?php echo $c->idno ; ?></td>
  <td><?php echo $c->firstname ; ?></td>
   <td><?php echo $c->lastname ; ?></td>
    <td><?php echo $c->email ; ?></td>
	  <td><?php echo $c->phone ; ?></td>

  <td><?php echo $c->status ; ?></td>
                          <td>
                     <a  id="more" target="blank" class="btn btn-primary" href="<?php echo base_url();?>user/editmember?randomitemidentifier=<?php   {echo  $id;}  ?>">Edit  </a>
                              <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>user/viewmygrouping?randomitemidentifier=<?php   {echo  $id;}  ?>">Group  </a>

		 </td>
     		  
             </tr>

	<?php endforeach;} ?>

              <?php }?>

        </table>
	</div>
		<div id="addModal" 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">Add new Employee</h4>
      </div>
      <div class="modal-body">
      
	  	

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



				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/addemployee' , 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="status" value="1"id="status" class="form-control" required placeholder="Enter status">
				  		<input type="hidden" name="category" value="employee"id="customer" class="form-control" required placeholder="Enter supplier">

	<div class="form-group">
    <label for="inputcompany" class="col-sm-2 control-label">	Company Name </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="company" value="<?php echo set_value('company'); ?>" class="form-control"  placeholder="Enter company name if any">
		 
				
		<span class="text-danger"> <?php echo form_error('company'); ?>
		
		</span>
	</div>
  </div>
	<div class="form-group">
    <label for="inputfirstname" class="col-sm-2 control-label">First	Name </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="firstname" value="<?php echo set_value('firstname'); ?>" class="form-control" required placeholder="Enter first name">
		 
				
		<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">Last	Name </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="lastname" value="<?php echo set_value('lastname'); ?>" class="form-control" required placeholder="Enter Last name">
		 
				
		<span class="text-danger"> <?php echo form_error('lastname'); ?>
		
		</span>
	</div>
  </div>
    	<div class="form-group">
    <label for="inputphonegender" class="col-sm-2 control-label">	Gender	 </label>
    <div class="col-sm-10">
	
	<select class="form-control" name="gender" >
	
	<option value=""  >---Select Gender---</option>
	<option value="female"  >female</option>
		<option value="male"  >male</option>
	</select>		 
				
		<span class="text-danger"> <?php echo form_error('gender'); ?>
		
		</span>
	</div>
  </div>
  	<div class="form-group">
    <label for="inputphone" class="col-sm-2 control-label">	Phone </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="phone" value="<?php echo set_value('phone'); ?>" class="form-control" required placeholder="Enter 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-10">
	
		  		<input type="email" name="email" value="<?php echo set_value('email'); ?>" class="form-control" required placeholder="Enter Your email">
		 
				
		<span class="text-danger"> <?php echo form_error('email'); ?>
		
		</span>
	</div>
  </div>
  	<div class="form-group">
    <label for="inputidno" class="col-sm-2 control-label">		ID Number	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="idno" value="<?php echo set_value('idno'); ?>" class="form-control"  placeholder="Enter idno if any or Campany Pin">
		 
				
		<span class="text-danger"> <?php echo form_error('idno'); ?>
		
		</span>
	</div>
  </div>
   	<div class="form-group">
    <label for="inputphoneaddress_1" class="col-sm-2 control-label">	Address 1	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="address_1" value="<?php echo set_value('address_1'); ?>" class="form-control"  placeholder="Enter Address 1">
		 
				
		<span class="text-danger"> <?php echo form_error('address_1'); ?>
		
		</span>
	</div>
  </div>
  
    
   	<div class="form-group">
    <label for="inputphoneaddress_2" class="col-sm-2 control-label">	Address 2	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="address_2" value="<?php echo set_value('address_2'); ?>" class="form-control"  placeholder="Enter Address 2">
		 
				
		<span class="text-danger"> <?php echo form_error('address_2'); ?>
		
		</span>
	</div>
  </div>
  	<div class="form-group">
    <label for="inputcity" class="col-sm-2 control-label">	City 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="city" value="<?php echo set_value('city'); ?>" class="form-control"  placeholder="Enter City or town">
		 
				
		<span class="text-danger"> <?php echo form_error('city'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  	<div class="form-group">
    <label for="inputzip" class="col-sm-2 control-label">	Zip Code 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="zip" value="<?php echo set_value('zip'); ?>" class="form-control"  placeholder="Enter Zip Code">
		 
				
		<span class="text-danger"> <?php echo form_error('zip'); ?>
		
		</span>
	</div>
  </div>
  
  
  
     <div class="form-group">
    <label for="inputcountry" class="col-sm-2 control-label">Country?</label>
    <div class="col-sm-10">
	<select class="form-control" name="country" required>
	
	<option value=""  >---Select country---</option>

	
	<?php 
					 
			$mycountry = $this->nationmodel->populatenation();
	


if(is_array($mycountry)) {

   foreach($mycountry as $mycountryrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $mycountryrow->id;   ?>"><?=  $mycountryrow->name; ?></option>



	<?php

}} else {
    echo 'No country available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('country'); ?>

	</div>
  </div>
  
  
  	
  
  	<div class="form-group">
    <label for="inputaccount" class="col-sm-2 control-label">		Account 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="account" value="<?php echo set_value('account'); ?>" class="form-control"  placeholder="Enter account if any">
		 
				
		<span class="text-danger"> <?php echo form_error('account'); ?>
		
		</span>
	</div>
  </div>
  
    	<div class="form-group">
    <label for="inputwebsite" class="col-sm-2 control-label">		Website/Link 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="website" value="<?php echo set_value('website'); ?>" class="form-control"  placeholder="Enter website if any">
		 
				
		<span class="text-danger"> <?php echo form_error('website'); ?>
		
		</span>
	</div>
  </div>
  
   	<div class="form-group">
    <label for="inputbalance" class="col-sm-2 control-label">	Balance 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="balance" value="<?php echo set_value('balance'); ?>" class="form-control"  placeholder="Enter balance if any">
		 
				
		<span class="text-danger"> <?php echo form_error('balance'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
	<div class="form-group">
    <label for="inputcomments" class="col-sm-2 control-label">	Comments</label>
    <div class="col-sm-10">

				<textarea name="comments" value="<?php echo set_value('comments'); ?>"  class="form-control"  placeholder="Enter comments"></textarea>
			
		<span class="text-danger"> <?php echo form_error('comments'); ?>
		
		</span>
	</div>
  </div>
		

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="employee" name="btn_addemployee" class="btn btn-primary"> Add Customer   </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>								
									
									
					</div>				
									
									
									
									
							</div>
						</div>
				

			
			</div>
		</div>
  
  </div>
			
			
			
		
		
  

 
</div>


















