	<!-- Add Custom Policy Modal -->
	<div id="add_custom_policy" class="modal custom-modal fade" role="dialog">
					<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title"><?php echo $shifts_connect_employ; ?></h5>
								<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
									<span aria-hidden="true">&times;</span>
								</button>
							</div>
							<div class="modal-body">
								<form action="connect_shift_modal_code.php" method="POST">
								  
					<div class="col-sm-12">			    
				<div class="form-group">
				<lable><?php echo $the_companyr; ?></lable>
				<input type="hidden" name="add_user_id" id="add_user_id" value="<?php echo $urow["user_id"];?>">
				<input type="hidden" name="lang" id="lang" value="<?php echo $lang; ?>">
				<input type="hidden" name="company_id" id="company_id" value="<?php echo $company_id; ?>">
				<input type="hidden" name="messag_add" id="messag_add" readonly value="<?php echo $messag_add; ?>"> 
				<select clas="select" name="company_id_sel" id="company_id_sel" class="form-select"required="">
                 <!--option value=""><?php echo $select.$space.$the_companyr; ?> </option-->
               <option value=""><?php echo $select.$space.$the_companyr; ?> </option>
                    <?php
                         if($urow['user_type']=="System_Manager"){
                       $sql_com="SELECT * FROM waseet_company_user_tbl GROUP BY company_id ";
                         }else{
                     if($company_id=='all_company'){   
                        $sql_com="SELECT * FROM waseet_company_user_tbl where deleted='0'AND company_id IN ('$ids')GROUP BY company_id ";
                     }else{
                      $sql_com="SELECT * FROM waseet_company_user_tbl where deleted='0'AND company_id='$company_id' GROUP BY company_id ";
                     } 
                         }
                        $result_com = $conn->query($sql_com);
                        if ($result_com->num_rows > 0) {
                        while($row_com = $result_com->fetch_assoc()) {
                            
                        $sql_com1="SELECT * FROM main_company_tbl where deleted='0'AND  company_id='".$row_com['company_id']."' ";
                        $result_com1 = $conn->query($sql_com1);
                        if ($result_com1->num_rows > 0) {
                        while($row_com1 = $result_com1->fetch_assoc()) {
                          //  echo $row_com1['company_name_ar'];
                            if($lang=='ar'){$name_ar2=$row_com1['company_name_ar'];}else{$name_ar2=$row_com1['company_name_en'];}        
                            //  echo $name_ar2;
                          ?>
                   <option value="<?php echo $row_com1['company_id']; ?>"><?php echo $name_ar2; ?> </option>
					<?php  }} }}  ?>	
					</select>
					</div>  
					</div>  
					
					
				<div class="col-sm-12">			    
				<div class="form-group">
				<lable><?php echo $shifts; ?></lable>
				<select clas="select" name="shift_id" id="shift_id" class="form-select"required="">
				
					</select>
					</div>  
					</div> 
									
									<div class="form-group leave-duallist">
										<label>إضافة موظف</label>
										<div class="row">
											<div class="col-lg-5 col-sm-5">
												<select name="customleave_from[]" id="customleave_select" class="form-control form-select" size="5" multiple="multiple">
												
												</select>
											</div>
											<div class="multiselect-controls col-lg-2 col-sm-2 d-grid gap-2">
												<button type="button" id="customleave_select_rightAll" class="btn w-100 btn-white"><i class="fa fa-forward"></i></button>
												<button type="button" id="customleave_select_rightSelected" class="btn w-100 btn-white"><i class="fa fa-chevron-right"></i></button>
												<button type="button" id="customleave_select_leftSelected" class="btn w-100 btn-white"><i class="fa fa-chevron-left"></i></button>
												<button type="button" id="customleave_select_leftAll" class="btn w-100 btn-white"><i class="fa fa-backward"></i></button>
											</div>
											<div class="col-lg-5 col-sm-5">
												<select name="customleave_to[]" id="customleave_select_to" class="form-control form-select" size="8" multiple="multiple"></select>
											</div>
										</div>
									</div>
									
									
				<div class="col-sm-12">			    
				<div class="form-group">
				<lable><?php echo $Shift_start_date; ?></lable>
			<input class="form-control" type="date" name="shift_start_date" id="shift_start_date">
				
					</select>
					</div>  
					</div> 
					
					
					<div class="col-sm-12">			    
				<div class="form-group">
				<lable><?php echo $Shift_end_date; ?></lable>
			<input class="form-control" type="date" name="shift_end_date" id="shift_end_date">
				
					</select>
					</div>  
					</div> 
									
									
									
									

									<div class="submit-section">
							 <input type="submit" name="sav_btn" id="sav_btn" style="display:non;" class="btn btn-primary submit-btn" value="<?php echo $save; ?>">
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
				<!-- /Add Custom Policy Modal -->
				<script src="../../assets/js/jquery-3.6.0.min.js"></script>
				<script>
$("#company_id_sel").change(function(){
	var company_id = $('#company_id_sel').find(":selected").val();
	var lang = '<?php echo $lang; ?>';

 $.ajax({
    type: "POST",
    url: "Show_Company_Shift.php",
    data: {
		company_id:company_id,
		lang:lang				
    },
    success: function(data) {
      $("#shift_id").html(data);
      
    },
    error:function(data){
       alert(data); //===Show Error Message====
    }
    });
});
				</script>
				<script>
$("#shift_id").change(function(){
	var company_id = $('#company_id_sel').find(":selected").val();
	var shift_id = $('#shift_id').find(":selected").val();
	var lang = '<?php echo $lang; ?>';	
	
 $.ajax({
    type: "POST",
    url: "Show_Company_Employ_NotInShift.php",
    data: {
		company_id:company_id,
		lang:lang,
		shift_id:shift_id				
    },
    success: function(data) {
      $("#customleave_select").html(data);
      
    },
    error:function(data){
       alert(data); //===Show Error Message====
    }
    });
});
				</script>
				<script>
$("#shift_id").change(function(){
	var company_id = $('#company_id_sel').find(":selected").val();
	var shift_id = $('#shift_id').find(":selected").val();
	var lang = '<?php echo $lang; ?>';	
	
 $.ajax({
    type: "POST",
    url: "Show_Company_Employ_Shift.php",
    data: {
		company_id:company_id,
		lang:lang,
		shift_id:shift_id				
    },
    success: function(data) {
      $("#customleave_select_to").html(data);
      
    },
    error:function(data){
       alert(data); //===Show Error Message====
    }
    });
});
				</script>
				
				
				
				
				