		<!-- Add  -->
        <div id="add_promo_level" 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 $add_promolevel; ?></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 clas="cmxform" id="signupForm" method="post" action="hr_add_promo_level_modal_code.php" enctype="multipart/form-data" > 
								<div class="row">
								    
		<div class="form-group">
			<input type="hidden" name="add_user_id" id="add_user_id" readonly value="<?php echo $urow['user_id']; ?>">
           	<input type="hidden" name="user_id_top_manager" id="user_id_top_manager" readonly value="<?php echo $user_id_top_manager; ?>">
           	 <input type="hidden" name="company_id" id="company_id" readonly value="<?php echo $company_id; ?>">
           	  <input type="hidden" name="system_id" id="system_id" readonly value="<?php echo $main_system_id; ?>"> 

           <input type="hidden" name="link_lang" id="link_lang" readonly value="<?php echo $link_lang; ?>">  
        <input type="hidden" name="lang" id="lang" readonly value="<?php echo $lang; ?>"> 
		   	<input type="hidden" name="messag_add" id="messag_add" readonly value="<?php echo $messag_add; ?>"> 
		   	 </div>
				<?php 
				
				function GetSeriaotherr() {	
					$strings = '123456789';	
					$stringLength = strlen($strings);
					$newStrings = '';
					for ($i = 0; $i < 6; $i++) {
						$newStrings .= $strings[rand(0, $stringLength - 1)];
					}
					return $newStrings; 
				}
				
				?>			    
				 	<input type="text" name="promo_id" id="promo_id" readonly value="<?php echo GetSeriaotherr(); ?>"> 
			<div class="col-sm-12">			    
				<div class="form-group">
					<?php //echo $user_id_top_manager;?>
				<lable><?php echo $the_companyr; ?></lable>
				<select clas="select" name="company_id_sell" id="company_id_sell" class="form-select" required="">
                 <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="row" id="level" style="box-shadow:2px 2px 5px lightgray;" >
										<div class="col-md-6" id="dep">
										<div class="form-group">
											<label class="col-form-label"><?php echo $dept; ?> <span class="text-danger">*</span></label>
									 <select clas="select" name="dept_idd" id="dept_idd" data-id='0' class="form-select dept_idd"  required>
									     <option value=""> <?php echo $select.$space.$dept; ?></option>
									 
				                        </select>
										</div>
									</div>
									
										<div class="col-md-6" id="emp">
										  <div class="form-group">
											  <label class="col-form-label"><?php echo $the_employee; ?> <span class="text-danger">*</span></label>
										         <select style="font-size:14px; font-weight:bold;" name="employ_idd[]" id="employ_idd" class="form-select form-select-lg mb-3" aria-label=".form-select-lg example" required multiple>
                                                 </select>
										  </div>
									  </div>
									
										</div>
									
									<hr><br> 
									في حالة القبول
										<select id="accept_stat" name="accept_stat" class="form-select" required="">
										<option value="">...</option>
										   <option value="final_accept">قبول نهائي</option>
											<option value="moveToAnotherLevell">الانتقال الى مستوى اخر</option>
											
										</select>
										<br>
										<div class="row" id="level_accept" style="box-shadow:2px 2px 5px lightgray;" >
										      
										</div>
										<br>
										في حالة الرقض
										<select id="refuse_statt" name="refuse_statt" class="form-select" required="">
										<option value="">...</option>
										   <option value="final_refuse">رفض نهائي</option>
											<option value="moveToAnotherLevel">الانتقال الى مستوى اخر</option>
											
										</select>
										<div class="row" id="level_refusee" style="box-shadow:2px 2px 5px lightgray;" >
										      
										</div>
                                    <div class="row" id="levell" style="box-shadow:2px 2px 5px lightgray;" >
                                    </div>
									
									
								</div>
                                
								<div class="submit-section">
									<!--button class="btn btn-primary submit-btn">Submit</button-->
									 <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 Shift Modal -->
			 <script src="../../assets/js/jquery-3.6.0.min.js"></script>
			 <script>
            $("#dept_manager_approval").click(function(){
                if ($('#dept_manager_approval').prop('checked')) {
					$("#dep").hide();
					$("#emp").hide();
					$('#dept_id').prop('required', false);
					$('#employ_id').prop('required', false);
                }else{
                    
					$("#dep").show();
					$("#emp").show();
					$('#dept_id').prop('required', true);
					$('#employ_id').prop('required', true);
                }
            });
        </script>
			 
	<script>
    $("#company_id_sell").change(function(){
       
var company_id_sell = $("#company_id_sell").val(); 
var lang = $("#lang").val();
$("#employ_idd").html("");
//alert(company_id_sell);
$.ajax({
    type: "POST",
    url: "hr_dept_for_company_vv.php",
    data: {
      company_id_sell:company_id_sell,lang:lang				
    },
    success: function(data) {
       $("#dept_idd").html(data);
    },
    error:function(data){
        
       alert(data); //===Show Error Message====
    }
    }); 
	 

  });
    </script>
     <script>
$(document).on('change', '.dept_idd', function() {
 
 var dept_idd = $("#dept_idd").val(); 
var lang = $("#lang").val();
 $.ajax({
    type: "POST",
    url: "hr_employ_for_dept_vv.php",
    data: {
      dept_idd:dept_idd,lang:lang				
    },
    success: function(data) {
       $("#employ_idd").html(data);
    },
    error:function(data){
        
       alert(data); //===Show Error Message====
    }
    }); 

    });
    </script>
     <script>
$(document).on('change', '#refuse_statt', function() {
	
	$("#level_refusee").html('');
	var company_id_sel = $("#company_id_sell").val(); 
	var id = $('#refuse_statt').find(":selected").val();
var lang = $("#lang").val();
alert(company_id_sel);
if(id=="moveToAnotherLevel"){
	$.ajax({
    type: "POST",
    url: "hr_level_for_company_vRefusee.php",
    data: {
      company_id_sel:company_id_sel,lang:lang				
    },
    success: function(data) {
		alert(data);
		$("#level_refusee").append('<div class="col-sm-12" id="levelR"><div class="form-group"></br><lable>حدد المستوى</lable><select clas="select" name="level_refuse" id="level_refuse" class="form-select" >'+data+'</select></div></div><div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار الرفض عربي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_refusedetailsar" id="level_refusedetailsar" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div><div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار الرفض انجليزي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_refusedetailsen" id="level_refusedetailsen" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div>');
       //$("#levelR").html(data);
    },
    error:function(data){
        
       alert(data); //===Show Error Message====
    }
    });
}else if(id=="final_refuse"){
	$("#level_refusee").append('<div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار الرفض عربي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_refusedetailsar" id="level_refusedetailsar" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div><div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار الرفض انجليزي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_refusedetailsen" id="level_refusedetailsen" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div>');
}else{

}
 

    });
    </script>   
    <script>
$(document).on('change', '#accept_stat', function() {
	
	$("#level_accept").html('');
	var company_id_sel = $("#company_id_sell").val(); 
	var id = $('#accept_stat').find(":selected").val();
var lang = $("#lang").val();
alert(id);
if(id=="moveToAnotherLevell"){
	$.ajax({
    type: "POST",
    url: "hr_level_for_company_vRefusee.php",
    data: {
      company_id_sel:company_id_sel,lang:lang				
    },
    success: function(data) {
		alert(data);
		$("#level_accept").append('<div class="col-sm-12" id="levelR"><div class="form-group"></br><lable>حدد المستوى</lable><select clas="select" name="level_accept" id="level_accept" class="form-select" >'+data+'</select></div></div><div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار القبول عربي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_acceptdetailsar" id="level_acceptdetailsar" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div><div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار القبول انجليزي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_acceptdetailsen" id="level_acceptdetailsen" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div>');
       //$("#levelR").html(data);
    },
    error:function(data){
        
       alert(data); //===Show Error Message====
    }
    });
}else if(id=="final_accept"){
	$("#level_accept").append('<div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار الرفض عربي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_acceptdetailsar" id="level_acceptdetailsar" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div><div class="col-sm-6"><div class="form-group"><label class="col-form-label"><?php echo "تفاصيل حالة مسار القبول انجليزي"; ?> <span class="text-danger">*</span></label><div class="input-group time"><input class="form-control" name="level_acceptdetailsen" id="level_acceptdetailsen" required=""><span class="input-group-text"><i class="fa fa-plane" aria-hidden="true"></i></span></div></div></div>');
}else{

}
 

    });
    </script>      
			
			
			
			