<?php
include('../include/header.php');

?>

 <!-- Page wrapper  -->
        <div class="page-wrapper">
            <!-- Bread crumb -->
            <div class="row page-titles">
                <div class="col-md-5 align-self-center">
                    <h3 class="text-primary">Dashboard</h3> </div>
                <div class="col-md-7 align-self-center">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="javascript:void(0)">Home</a></li>
                        <li class="breadcrumb-item active">Dashboard</li>
                    </ol>
                </div>
            </div>
            <!-- End Bread crumb -->
            <!-- Container fluid  -->
            <div class="container-fluid">
                <!-- Start Page Content -->
                <div class="row">
                    <?php
					

?>
			
						   <form action="employee_display.php" method="post" enctype="multipart/form-data">
						  <div class="row">
                        <div class="col-md-12">
                            <div class="card">
                               <div class="card-body">
                                    
                                    
                                    <div class="tab-content br-n pn">
                                        <div id="navpills-1" class="tab-pane active">
                                            <div class="row">
                                                <div class="row">
                    <div class="col-lg-12">
                        <div class="card card-outline-primary">
						 <div class="card-header">
                                <h4 class="m-b-0 text-white"> Employee Details</h4>
                            </div>
                            <div class="card-body">
                               
                                    <div class="form-body">
                                        <h3 class="card-title m-t-15">Person Info</h3>
                                        <hr>
                                        <div class="row p-t-20">
                                            <div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Name</label>
                                                    <input type="text" id="emp_name" name="emp_name" required class="form-control required" >
                                                   
                                            </div>
                                           </div>
											 <div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Date of Birth</label>
                                                    <input type="date" id="dob" name="dob" class="form-control required" required placeholder="dd/mm/yyyy">
                                                </div>
                                            </div>
											 <div class="col-md-3">
                                                <div class="form-group has-success">
                                                    <label class="control-label">Gender</label>
                                                    <select name="gender" id="gender" class="form-control required custom-select" required>
                                                        <option value="male">Male</option>
                                                        <option value="female">Female</option>
                                                    </select>
                                                    <small class="form-control-feedback"> Select your gender </small> </div>
                                            </div>
											
											<div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Phone</label>
                                                    <input type="number" name="phone" id="phone" class="form-control required" required>
                                                </div>
                                            </div>
											
											
											
											
											<div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Aadhar No</label>
                                                    <input type="text" id="aadhar" name="aadhar" required class="form-control required" required >
                                                   
                                            </div>
                                           </div>
											 <div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Father Name</label>
                                                    <input type="text" id="f_name" name="f_name" class="form-control required" required>
                                                </div>
                                            </div>
											 <div class="col-md-3">
                                               <div class="form-group">
                                                    <label class="control-label">Mother Name</label>
                                                    <input type="text" id="m_name" name="m_name" class="form-control required" required>
                                                </div>
											
											
											
											
                                            <!--/span-->
                                        </div>
										
										
										<div class="col-md-3">
                                               <div class="form-group">
                                                    <label class="control-label">Marital Status</label>
                                                    <select  id="m_status" name="m_status" class="form-control required" required>
													<option value="">Select</option>
													<option value="married">Married</option>
													<option value="single">Single</option>
													<option value="divorced">Divorced</option>
													<option value="widowed ">Widowed </option>
													</select>
                                                </div>
											
									
                                        </div>
										
										
											<div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Permanent Address</label>
                                                    <textarea id="p_address" name="p_address" required class="form-control required" style="height:70px;" ></textarea>
                                                   
                                            </div>
                                           </div>
										   
										   
											<div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">Correspondence Address</label>
                                                     <textarea id="c_address" name="c_address" required class="form-control required" style="height:70px;"></textarea>
                                                   
                                            </div>
                                           </div>
										   
										   
											<div class="col-md-3">
                                                <div class="form-group">
                                                    <label class="control-label">date of joining</label>
                                                    <input type="date" id="doj" name="doj" required class="form-control required" >
                                                   
                                            </div>
                                           </div>
                                        <!--/row-->
                                       
                                      
                                       
                                            <!--/span-->
                                        </div>
                                    </div>
                                  
                               
                            </div>
                        </div>
                    </div>

                    
                </div>
                                            </div>
                                        </div>
                                        <div id="navpills-2" class="tab-pane">
                                            <div class="row">
                                                <div class="row">
                    <div class="col-lg-12" >
                        <div class="card card-outline-primary">
                            <div class="card-header">
                                <h4 class="m-b-0 text-white">Employee Detail</h4>
                            </div>
                            <div class="card-body">
                               <div class="form-body">
                                        <h3 class="card-title m-t-15">Qualification</h3>
                                        
                                        <div class="row p-t-20">
                                           <table id="dynamic" class="table " style="width:100%;" >								<thead>
								
								<th>Course</th>
								<th>University / Board</th>
								<th>Percent</th>
								<th>Year Of Passing</th>
								<th>Action</th>
								</thead>
							 <tbody>
							<tr><td><div class="form-group">
                                                    
                                                    <input type="text" id="course" name="course[]" required class="form-control required" >
                                                </div>
</td>
<td><div class="form-group">
                                                    
                                                    <input type="text" id="univ" name="univ[]" required class="form-control required" >
                                                </div>
</td>
<td><div class="form-group">
                                                   
                                                    <input type="number" id="pcnt" name="pcnt[]" required class="form-control required" >
                                                </div>
</td>
<td><div class="form-group">
                                                    
                                                    <input type="number" id="year" name="year[]" required class="form-control required" >
                                                </div>
</td>
<td><button type="button" name="add" class="btn btn-primary btn-sm" id="add_input">Add</button>          
</td>
								</tr>
								
								
								
								</tbody>
								
                               </table>
                                      <h3 class="card-title m-t-15">Work Experience</h3>
									  
									    <table id="dynamic2" class="table " style="width:100%;" >								<thead>
								
								<th>Company Name</th>
								<th>Department</th>
								<th>Designation</th>
								<th>Date of joining</th>
								<th>Date of Leaving</th>
								
								
								<th>Action</th>
								</thead>
							 <tbody>
							 <tr>
							<td><div class="form-group">
                                                    
                                                    <input type="text" id="company" name="company[]" class="form-control" >
                                                </div>
</td>
<td><div class="form-group">
                                                    
                                                    <input type="text" id="dept" name="dept[]" class="form-control" >
                                                </div>
</td>
<td><div class="form-group">
                                                   
                                                    <input type="text" id="designation" name="designation[]" class="form-control " >
                                                </div>
</td>
<td><div class="form-group">
                                                    
                                                    <input type="date" id="date_join" name="date_join[]" style="width:160px;" class="form-control " >
                                                </div>
</td>
<td><div class="form-group">
                                                    
                                                    <input type="date" id="date_leave" name="date_leave[]"  style="width:160px;" class="form-control " >
                                                </div>
</td>







<td><button type="button" name="addd" class="btn btn-primary btn-sm" id="add_input2">Add</button>          
</td>
								
								
								</tr>
								
								</tbody>
								
                               </table>
                                     </div> 
                                       
                                    </div>
                                    
                              
                            </div>
                        </div>
                    </div>

                    
                </div>
                                            </div>
                                        </div>
                                        <div id="navpills-3" class="tab-pane">
                                            <div class="row">
                                               <div class="col-lg-12">
                        <div class="card card-outline-primary">
                            <div class="card-header">
                                <h4 class="m-b-0 text-white">Employee Detail</h4>
                            </div>
                            <div class="card-body">
                               
                                    <div class="form-body">
                                       <h3 class="card-title m-t-15">Skills</h3>
									  
									    <table id="dynamic3" class="table " style="width:100%;" >								<thead>
								
								<th>Name</th>
								<th>Level</th>
								
								<th>Action</th>
								</thead>
							 <tbody>
							 <tr>
							<td><div class="form-group">
                                                    
                                                    <input type="text" id="skill" name="skill[]" class="form-control" >
                                                </div>
</td>
<td><div class="form-group">
                                                    
                                                    <select  id="s_level" name="s_level[]" class="form-control" >
													<option value="basic">Basic</option>
													<option value="intermediate">Intermediate</option>
													<option value="expert">Expert</option>
													</select>
                                                </div>
</td>

<td><button type="button" name="addd" class="btn btn-primary btn-sm" id="add_input3">Add</button>          
</td>
								
								
								</tr>
								
								</tbody>
								
                               </table>
							   
							   
							     <h3 class="card-title m-t-15">Document</h3>
									<table  class="table " style="width:100%;" >  
							 <tbody>
							 <?php
				 				 
				$sqlud = "select *from tbl_identity_master where del_status ='0' ";
				$resultud = $objhr->viewdata($sqlud);
				if($resultud->num_rows > 0){
				$i=0;
				while(	$rowsud = $resultud->fetch_assoc()){
				$i++;
				?>				
							 <tr>
							 <td><?php echo strtoupper($rowsud['identity_type']); ?><input type="hidden" id="idty_id" name="idty_id[]" value="<?php echo $rowsud['id']; ?>" class="form-control required" > <input type="hidden" id="doc_name" name="doc_name[]" class="form-control required" value="<?php echo strtoupper($rowsud['identity_type']); ?>" ></td>
							<td>
							<div class="form-group">
                                                    
                                                    <input type="file" id="files" name="files[]" class="form-control required" required>
                                                </div>
									</td>

								</tr>
								<?php }}?>
								</tbody>
								
                               </table>
                                        </div>
                                        <!--/row-->
                                       
                                      
                                       <button type="submit" class="btn btn-primary" onclick="fun()">Submit</button>
                                    </div>
                                    
                               
                            </div>
                        </div>
                    </div>
                                            </div>
                                        </div>
                                    </div>
									<ul class="nav nav-pills m-t-30 m-b-30">
                                        <li class=" nav-item"> <a href="#navpills-1" class="nav-link active" data-toggle="tab" aria-expanded="false">Persona Info</a> </li>
                                        <li class="nav-item"> <a href="#navpills-2" class="nav-link" data-toggle="tab" aria-expanded="false">Qualification / Work History</a> </li>
                                        <li class="nav-item"> <a href="#navpills-3" class="nav-link" data-toggle="tab" aria-expanded="true">Skill / Identity</a> </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        
                    </div>
						  
						</form>  
						  
						  
						  
						  
                    
                </div>
                <!-- End PAge Content -->
            </div>
            <!-- End Container fluid  -->
			
			
			

<?php
include('../include/footer.php');
?>
<script>
$(document).ready(function(){
 var i=1;
 $('#add_input').click(function(){
 i++;
 $('#dynamic').append('<tr id="row'+i+'"><td><div class="form-group"><input type="text" id="course" name="course[]" class="form-control required" ></div></td><td><div class="form-group"><input type="text" id="univ" name="univ[]" class="form-control required" ></div></td><td><div class="form-group"><input type="number" id="pcnt" name="pcnt[]" class="form-control required" ></div></td><td><div class="form-group"><input type="number" id="year" name="year[]" class="form-control required" ></div></td><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn-sm btn_remove">Remove</button></td></tr>');
 });
 $(document).on('click', '.btn_remove', function(){
 var button_id = $(this).attr("id");
 $('#row'+button_id+'').remove();
 });

 
});
</script>




<script>
$(document).ready(function(){
 var i=1;
 $('#add_input2').click(function(){
 i++;
 $('#dynamic2').append('<tr id="row'+i+'"><td><div class="form-group"><input type="text" id="company" name="company[]" class="form-control required" ></div></td><td><div class="form-group"><input type="text" id="dept" name="dept[]" class="form-control required" ></div></td><td><div class="form-group"><input type="text" id="designation" name="designation[]" class="form-control required" ></div></td><td><div class="form-group"><input type="date" id="date_join" name="date_join[]" class="form-control required" ></div></td><td><div class="form-group"><input type="date" id="date_leave" name="date_leave[]" class="form-control required" ></div></td><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn-sm btn_remove">Remove</button></td></tr>');
 });
 $(document).on('click', '.btn_remove', function(){
 var button_id = $(this).attr("id");
 $('#row'+button_id+'').remove();
 });

 
});
</script>



<script>
$(document).ready(function(){
 var i=1;
 $('#add_input3').click(function(){
 i++;
 $('#dynamic3').append('<tr id="row'+i+'"><td><div class="form-group"><input type="text" id="skill" name="skill[]" class="form-control required" ></div></td><td><div class="form-group"><select  id="s_level" name="s_level[]" class="form-control required" ><option value="basic">Basic</option><option value="intermediate">Intermediate</option><option value="expert">Expert</option></select></div></td><td><button type="button" name="remove" id="'+i+'" class="btn btn-danger btn-sm btn_remove">Remove</button></td></tr>');
 });
 $(document).on('click', '.btn_remove', function(){
 var button_id = $(this).attr("id");
 $('#row'+button_id+'').remove();
 });

 
});
</script>