<?php 
include("dbConfig.php");
$company_id = $_POST["company_id"];
$shift_id = $_POST["shift_id"];
$lang = $_POST["lang"];
if($lang=='ar'){
$message = "لا يوجد";
}elseif($lang=='en'){
      $message = "Not Found";
}else{
      $message = "Not Found";
}
?>
<?php
				$shif_array=array();
                $sql_em="SELECT * FROM hr_waseet_employ_shift_tbl where system_id='2222' AND company_id='$company_id' and shift_id='$shift_id' and waseet_stat='0' and deleted='0' and stop='0'";
                $result_em = $conn->query($sql_em);
                if ($result_em->num_rows > 0) {
               while($row_em = $result_em->fetch_assoc()) {

                array_push($shif_array,$row_em["employ_id"]);
                  // echo $_SESSION['user_id'].'<br>';
                  }} 
                  ?>
				<?php //echo  $company_id;
				//echo $urow['user_type'];
			    $ids = join("','",$shif_array); 
						?> 
<?php
              if($lang=='ar'){
                $sql_hr_employ="SELECT * FROM hr_employ_tbl where employ_id in ('$ids') and system_id='2222' and company_id='$company_id' and deleted='0' and stop='0' and employ_stat='active_employ' order by employ_name_ar ";
              }else{
                $sql_hr_employ="SELECT * FROM hr_employ_tbl where employ_id in ('$ids') and system_id='2222' and company_id='$company_id' and deleted='0' and stop='0' and employ_stat='active_employ' order by employ_name_en ";
              }
                        $sql_hr_employ="SELECT * FROM hr_employ_tbl where employ_id in ('$ids') and company_id='$company_id' and deleted='0' and stop='0' ";
                        $result_hr_employ = $conn->query($sql_hr_employ);
                        if ($result_hr_employ->num_rows > 0) {
                            
                        while($row_hr_employ = $result_hr_employ->fetch_assoc()) {
                        if($lang=='ar'){$name_ar2=$row_hr_employ['employ_name_ar'];}else{$name_ar2=$row_hr_employ['employ_name_en'];}  
				?>
                        <option value="<?php echo $row_hr_employ['employ_id']; ?>"><?php echo $name_ar2; ?> </option>
             		<?php  }}else{ ?>
                             
                        <?php } ?>



				 