<?php 
include("dbConfig.php");
$company_id = $_POST["company_id"];
$lang = $_POST["lang"];
if($lang=='ar'){
$message = "لا يوجد";
}elseif($lang=='en'){
      $message = "Not Found";
}else{
      $message = "Not Found";
}

if($lang=='ar'){
      $message1 = "اختار  ...";
      }elseif($lang=='en'){
            $message1 = "choose ...";
      }else{
            $message1 = "";
      }

$sql_sw="SELECT * FROM hr_shift_waseet_tbl where company_id='$company_id' and deleted='0' and stop='0' ";
$result_sw = $conn->query($sql_sw);
if ($result_sw->num_rows > 0) { ?>
<option value=""><?php echo $message1; ?> </option>
<?php while($row_sw = $result_sw->fetch_assoc()) { ?>
                        <?php 
                        $sql_sh="SELECT * FROM hr_shift_tbl where shift_id='".$row_sw["shift_id"]."' and deleted='0' ";
                        $result_sh = $conn->query($sql_sh);
                        if ($result_sh->num_rows > 0) {
                        while($row_sh = $result_sh->fetch_assoc()) {
                        if($lang=='ar'){$name_ar2=$row_sh['shift_name_ar'];}else{$name_ar2=$row_sh['shift_name_en'];}  
				?>
                       
                        <option value="<?php echo $row_sh['shift_id']; ?>"><?php echo $name_ar2; ?> </option>
             		<?php  }}else{ ?>
                              <option value=""><?php echo $message; ?> </option>
                        <?php } ?>
<?php }}else{ ?>
      <option value=""><?php echo $message; ?> </option>
<?php } ?>


				 