<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//echo  base_url('index.php/Client/clientGetdata/');
?>  

<!--js
        <script type="text/javascript" src="bootstrap/js/jquery.min.js" ></script> 
  	<script type="text/javascript" src="../bootstrap/jquery.1.12.1.js.js" ></script>  
        <script src="<?php //echo base_url() ?>bootstrap/ui/jquery-ui.min.js"></script> -->  
       
   
        
	

<form id="Employee" method="POST" action="<?php echo base_url('index.php/Employee/Employeeedit/EditupdatePersonal/');?>"> 

 <?php foreach($fetch->result() as $row)
  { ?>
  <div><input type="hidden" value="<?php echo $row->employeeId?>" name="id"></div>
<div class="box box-solid box-info">
	<div class="box-header"></div>
    <div class="box-body">
        <div class="row">
        <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">
                    <label for="empcode">Employee Code </label> <span style="color:#F00" class="mandatory">*</span>
                    <input type="text" name="empcode" id="empcodeid" placeholder="Enter Employee code"
                             class="form-control input-sm" readonly="readonly"  value="<?php echo $row->employeeCode?>" maxlength="100"  required >
                    <font color="#FF0000"><?php echo form_error('fname'); ?></font><div id="msg" ></div>
                </div></div>
                
        <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">
      <label for="prefix">Select Prefix</label><span style="color:#F00" class="mandatory">*</span><select name="prefix" required>

<option value="Mrs" <?php if($row->employeeNamePrefix=='Mrs') echo 'selected="selected"';  ?>> Mrs.</option>
<option value="Ms" <?php if($row->employeeNamePrefix=='Ms') echo 'selected="selected"';  ?>> Ms.</option>
<option value="mr" <?php if($row->employeeNamePrefix=='mr') echo 'selected="selected"';  ?>>Mr.</option>

</select>
                </div></div>
                <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">
                    <label for="first name">First Name </label> <span style="color:#F00" class="mandatory">*</span>
                    <input type="text" name="fname" id="fnameid" placeholder="Enter first Name"
                             class="form-control input-sm"  value="<?php echo $row->firstName?>" maxlength="100" onkeyup="check_if_exists()"  required >
                    <font color="#FF0000"><?php echo form_error('fname'); ?></font><div id="msg" ></div>
                </div></div>
                           <div class="col-sm-2 col-md-2 col-lg-2">

                <div class="form-group"><label for="middlename">Middle Name</label><span class="mandatory"></span>
                    <input type="text" name="mname" id="mnameid" placeholder="  Enter your middle Name "
                             class="form-control input-sm" value="<?php echo $row->middleName?>" maxlength="100" onkeyup="check_if_exists1()"  >
                             <span style="color:#F03" id="msg"></span> 	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>	
              </div>
                	
            </div>
               <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                <label for="lastName">Last Name</label><span style="color:#F00" class="mandatory">*</span>
                    <input type="text" name="lname" id="lnameid" placeholder="Enter Last Name "
                             class="form-control input-sm" value="<?php echo $row->lastName?>" required>
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
                </div></div>
       <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                    <label for=""> Father's Name </label> <span style="color:#F00" class="mandatory">*</span>
                    <input type="text" id="fatherid" name="fathername" placeholder="Enter Father's Name  "
                             class="form-control input-sm" value="<?php echo $row->fathersName?>" required >
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
                </div></div>
            <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                    <label for="">Grand Father's Name </label> <span class="mandatory"></span>
                    <input type="text" id="dfid" name="gfname" placeholder="Enter Grand Father's Name "
                             class="form-control input-sm" value="<?php echo $row->grandFatherName?>"  >
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
                </div></div>
                   <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">
                    <label for="">Family Name</label> <span style="color:#F00" class="mandatory">*</span>		
                    <input type="text" name="familyname" id="familyid" placeholder="  Enter your family Name" 
                    		class="form-control input-sm" value="<?php echo $row->familyName?>" required/>
                   <font color="#FF0000"><?php echo form_error(''); ?></font>
                </div>
            </div>
                <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group" style="border: 1px solid #999; padding: 2px 5px; margin-top: 15px;">	
                   <label for="gender">Gender</label> <span style="color:#F00" class="mandatory">*</span>
                    <input type="radio" name="gender" id="genderid" placeholder="" class="customRadioBtn3"
                              required <?php if($row->gender == 'M'){echo 'checked';}?>  value="M"/> <label for="male">Male</label>
                             <input type="radio" name="gender" id="genderid" placeholder=""
                          class="customRadioBtn3" <?php if($row->gender == 'F'){echo 'checked';}?>    value="F" required/> <label for="cp1">Female</label>
                                <input type="radio" name="gender" id="genderid" placeholder=""
                             class="customRadioBtn3" <?php if($row->gender == 'O'){echo 'checked';}?>   value="O" srequired/> <label for="cp1">Others</label>
                </div>
          	</div>
         	    <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">			
                    <label for="dob">Date of Birth</label> <span style="color:#F00" class="mandatory">*</span>
                    <input type="date" name="dob" id="dobid" placeholder="yy/mm/dd" value="<?php echo $row->dateOfBirth?>"
                                 class="form-control input-sm"  required />
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
                </div>
            </div>
                <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                	<label for="doj">Nationality</label><span style="color:#F00" class="mandatory">*</span>
                 	<input type="text" name="natinality" id="nid" placeholder=""
                    		 class="form-control input-sm" value="" />	
                  	<span><font color="#FF0000"><?php echo form_error('cp1email'); ?></font></span>
                </div>
         	</div>
                <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                	<label for="doj">Religion</label><span class="mandatory"></span>
                 	<input type="text" name="re" id="rid" placeholder=""
                    		 class="form-control input-sm" value="<?php echo $row->religion?>" />	
                  	<span><font color="#FF0000"><?php echo form_error('cp1email'); ?></font></span>
                </div>
         	</div>
               <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                	<label for="">Birth Place</label><span class="mandatory"></span>
                    <input type="text" name="bplace" id="bpid" placeholder=""
                    		 class="form-control input-sm" value="<?php echo $row->birthPlace?>"  />	
                    <font color="#FF0000"><?php echo form_error('ph1'); ?></font>
               	</div>
          	</div>
               <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                	<!--<label for="skill">Skill</label><span class="mandatory"></span>
                    <input type="text" name="skill" id="skillid" placeholder="Enter passport Expiry Date"
                    		 class="form-control input-sm" value="" required   />-->
                              <label for="skill">Skill </label> <span style="color:red;" class="mandatory"></span>
                    <textarea name="skill" autocomplete=""  id="skillid"  required  class="form-control" ><?php echo $row->skill?></textarea>	
                    <font color="#FF0000"><?php echo form_error('ph2'); ?></font>
        		</div>
          	</div>
          	    <div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                	<!--<label for="">Languages Known</label><span class="mandatory">*</span>
                    <input type="text" name="lk" id="lkid" placeholder="  Enter iqama Number"
                    		 class="form-control input-sm" value="" required />-->
                             <label for="skill">Languages Known </label> <span style="color:red;" class="mandatory"></span>
                    <textarea name="lk" autocomplete="" id="lkid"  class="form-control" ><?php echo $row->languagesKnown?></textarea>	
                    <font color="#FF0000"><?php echo form_error('ph1'); ?></font>
               	</div>
          	</div>
      
                    <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">
      <label for="prefix">Blood Group</label><span class="mandatory"></span><select name="blg" id="blgid">
    
<option value="O +" <?php if($row->bloodGroup=='O +') echo 'selected="selected"';  ?>> O +</option>
<option value="O -" <?php if($row->bloodGroup=='O -') echo 'selected="selected"';  ?>> O -</option>
<option value="A +" <?php if($row->bloodGroup=='A +') echo 'selected="selected"';  ?>> A +</option>
<option value="A -" <?php if($row->bloodGroup=='A -') echo 'selected="selected"';  ?>> A -</option>
<option value="B +" <?php if($row->bloodGroup=='B +') echo 'selected="selected"';  ?> >B +</option>
<option value="B -" <?php if($row->bloodGroup=='B -') echo 'selected="selected"';  ?>  >B -</option>
<option value="AB +" <?php if($row->bloodGroup=='AB -') echo 'selected="selected"';  ?> >AB +</option>
<option value="AB -"  <?php if($row->bloodGroup=='AB -') echo 'selected="selected"';  ?> >AB -</option>
</select>
                </div>
          	</div>
    


 
 
      
            <div class="col-sm-2 col-md-2 col-lg-2">
                <div class="form-group">
<label for="Marital Status">Marital Status</label><span style="color:#F00" class="mandatory">*</span><select name="ms" id="msid">

<option value="Married" <?php if($row->maritalStatus=='Married') echo 'selected="selected"';  ?>> Married</option>
<option value="Living common law" <?php if($row->bloodGroup=='Living common law') echo 'selected="selected"';  ?>> Living common law</option>
<option value="Widowed" <?php if($row->maritalStatus=='Widowed') echo 'selected="selected"';  ?>> Widowed</option>
<option value="Divorced" <?php if($row->maritalStatus=='Divorced') echo 'selected="selected"';  ?>> Divorced</option>
<option value="Single" <?php if($row->maritalStatus=='Single') echo 'selected="selected"';  ?> >Single</option>
<option value="Separated" <?php if($row->maritalStatus=='Separated') echo 'selected="selected"';  ?>  >Separated</option>
</select>
                </div>
          	</div>


   
            <?php /*?><div class="col-sm-2 col-md-2 col-lg-2">
            	<div class="form-group">
                	<label for="Phone_Number2">Marital Status</label><span class="mandatory"></span>
                    <input type="text" name="ms" id="msid" placeholder="Enter Marital Satus"
                    		 class="form-control input-sm" required />	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div><?php */?>
              <div class="col-sm-2 col-md-2 col-lg-2">
            <div class="form-group">
                	<label for="Phone_Number2">Date Of Arrival</label><span style="color:#F00" class="mandatory"></span>
                    <input type="date" name="doa" id="doaid" placeholder="Enter Arrival Date"
                    		 class="form-control input-sm" required value="<?php echo $row->dateOfArrival?>"  />	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
             <div class="col-sm-2 col-md-2 col-lg-2">
            <div class="form-group">
                	<label for="Phone_Number2">Driving License Number</label><span class="mandatory"></span>
                    <input type="text" name="dlno" id="dlnoid" placeholder="Enter Driving Licence number"
                    		 class="form-control input-sm"  value="<?php echo $row->drivingLicenseNo?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
    <div class="col-sm-2 col-md-2 col-lg-2">
            <div class="form-group">
                	<label for="Phone_Number2">Driving License Expiry Date</label><span class="mandatory"></span>
                    <input type="date" name="dldate" id="dldateid" placeholder=""
                    		 class="form-control input-sm" value="<?php echo $row->drivingLicenseExpDate?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>

    <div class="col-sm-2 col-md-2 col-lg-2">            <div class="form-group">
                	<label for="Phone_Number2">Date Of Joining</label><span style="color:#F00" class="mandatory">*</span>
                    <input type="text" name="doj" id="dldateid" placeholder=""
                    		 class="form-control input-sm"  value="<?php echo $row->dateOfJoining?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
    <div class="col-sm-2 col-md-2 col-lg-2">            <div class="form-group">
                	<label for="Phone_Number2">Passport Number</label><span style="color:#F00" class="mandatory"></span>
                    <input type="doj" name="passno" id="passid" placeholder=""
                    		 class="form-control input-sm" required  value="<?php echo $row->passportNumber?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
           
    <div class="col-sm-2 col-md-2 col-lg-2">            <div class="form-group">
                	<label for="Phone_Number2">Passport Exipry Date</label><span class="mandatory"></span>
                    <input type="date" name="passexpr" id="pexprid" placeholder=""
                    		 class="form-control input-sm"   value="<?php echo $row->passportExpiryDate?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
            
             
                 <div class="col-sm-2 col-md-2 col-lg-2">
            <div class="form-group">
                	<label for="Phone_Number2">Iqama Number</label><span style="color:#F00"class="mandatory">*</span>
                    <input type="text" name="iqno" id="iqid" placeholder=""
                    		 class="form-control input-sm" required  value="<?php echo $row->iqamaNumber?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
                <div class="col-sm-2 col-md-2 col-lg-2">
            <div class="form-group">
                	<label for="Phone_Number2">Iqama Exipry Date</label><span class="mandatory"></span>
                    <input type="date" name="iqdate" id="iqdateid" placeholder=""
                    		 class="form-control input-sm" required  value="<?php echo $row->iqamaExpiryDate?>"/>	
                    <font color="#FF0000"><?php echo form_error(''); ?></font>
        		</div>
          	</div>
            <div class="col-sm-2 col-md-2 col-lg-2">
            	<div id="contact_submit" class="form-group" style="margin-top: 65px !important;">
					<button type="submit" class="btn btn-success" id="type"> 
                    	<i class="fa fa-plus"></i> UPDATE
                   	</button>
                    
<?php /*?>                   <a href="<?php echo site_url('index.php/Employee/Employeeedit/edit_Contact/'.$row->employeeId);?>">Edit CONTACT

                                        <i class="fa fa-edit"></i>

                        </a><br />
<a href="<?php echo site_url('index.php/Employee/Employeeedit/edit_EmergencyContact/'.$row->employeeId);?>">Edit EMERGENCY CONTACT

                                        <i class="fa fa-edit"></i>

                        </a><br />
                        <a href="<?php echo site_url('index.php/Employee/Employeeedit/EditjobDetails/'.$row->employeeId);?>">Edit Job Details

                                        <i class="fa fa-edit"></i>

                        </a><br /><?php */?>
                    <?php }?>
				</div>	
            </div>
        </div>
   	</div>
</div>     
</form>       


		