	<?php
require("../connection.php");
include("../user.php");
$user_id=$_SESSION['user'];
$username=$_SESSION['user_name'];
$type=$_REQUEST['share'];
$emp_query=mysqli_query($con,"select * from  `employee_master`");
$emp_query1=mysqli_query($con,"select * from  `employee_master`");
if($type=="Non Sharing")
{
?>	<div class="col-12 col-md-6" >
	<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Employee Name</label>
<select name="emp_name" id="emp_name"  class="form-control" onchange="get_emp_code(this.value)" >
<option selected disabled>Select Employee Name</option>
<?php while($emp_name=mysqli_fetch_array($emp_query))
{ ?>
<option value="<?php echo $emp_name['emp_no']; ?>"><?php echo $emp_name['employee_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Employee Code</label>
<input type="text" name="emp_code" id="emp_code" class="form-control" autocomplete="off" readonly />
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Employee Department</label>
<input type="text" name="emp_dept" id="emp_dept" class="form-control" autocomplete="off" readonly />
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Location</label>
<select name="location" id="location"  class="form-control" onchange="" >
<option selected disabled>Select Location</option>
<?php 
$loc=mysqli_query($con,"select * from location_master where status=0");
while($location=mysqli_fetch_array($loc))
{ ?>
<option value="<?php echo $location['id']; ?>"><?php echo $location['location']; ?></option>
<?php } ?>
</select>
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Type</label>
<select name="type" id="type"  class="form-control" onchange="type_permanent(this.value)" >
<option selected disabled>Select Type</option>
<option value="Permanent">Permanent</option>
<option value="Temporary">Temporary</option>
</select>
</div>
</div>
<div class="col-12 col-md-6" >
<div class="col col-md-12" id="expire">
</div>
</div>

<?php } else {
	?>
	<div class="col-12 col-md-6" >
		<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Employee Name</label>
<select name="emp_name" id="emp_name"  class="form-control" onchange="get_emp_code(this.value)" >
<option selected disabled>Select Employee Name</option>
<?php while($emp_name=mysqli_fetch_array($emp_query))
{ ?>
<option value="<?php echo $emp_name['emp_no']; ?>"><?php echo $emp_name['employee_name']; ?></option>
<?php } ?>
</select>
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Employee Code</label>
<input type="text" name="emp_code" id="emp_code" class="form-control" autocomplete="off" readonly />
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Employee Department</label>
<input type="text" name="emp_dept" id="emp_dept" class="form-control" autocomplete="off" readonly />
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Location</label>
<select name="location" id="location"  class="form-control" onchange="" >
<option selected disabled>Select Location</option>
<?php 
$loc=mysqli_query($con,"select * from location_master where status=0");
while($location=mysqli_fetch_array($loc))
{ ?>
<option value="<?php echo $location['id']; ?>"><?php echo $location['location']; ?></option>
<?php } ?>
</select>
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Type</label>
<select name="type" id="type"  class="form-control" onchange="type_permanent(this.value)" >
<option selected disabled>Select Type</option>
<option value="Permanent">Permanent</option>
<option value="Temporary">Temporary</option>
</select>
</div>
</div>
<div class="col-12 col-md-6" >
	<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Secondary Employee Name</label>
<select name="s_emp_name" id="s_emp_name"  class="form-control" onchange="get_semp_code(this.value)" >
<option selected disabled>Select Employee Name</option>
<?php while($emp_name1=mysqli_fetch_array($emp_query1))
{ ?>
<option value="<?php echo $emp_name1['emp_no']; ?>"><?php echo $emp_name1['employee_name']; ?></option>
<?php } ?>
</select>
</div>

<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Secondary Employee Code</label>
<input type="text" name="s_emp_code" id="s_emp_code" class="form-control" autocomplete="off" readonly />
</div>
<div class="col col-md-12">
<label for="text-input" class=" form-control-label">Secondary Employee Department</label>
<input type="text" name="s_emp_dept" id="s_emp_dept" class="form-control" autocomplete="off"  readonly />
</div>

<div class="col col-md-12" id="expire">
</div>

</div>
	<?php
} ?>
			