	<!-- Add Department Modal -->
    <div id="add_med_att<?php echo $employ_id; ?>" class="modal custom-modal fade" role="dialog">
					<!--div class="modal-dialog modal-dialog-centered" role="document"-->
					    	<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_attachments; ?></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="../modals/hr_add_form_att_modal_codee.php" enctype="multipart/form-data" > 
			<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_all; ?>"> 
			
		 <input type="hidden" readonly name="actual_link" id="actual_link" readonly value="<?php echo $actual_link; ?>">
		 
								    

                 <div class="form-group"style="font-size:14px; font-weight:;">
                 <label style="float:;">
              <?php //echo $id; ?>
                </label>
             <input type="hidden"readonly value="<?php echo $row_fil['attach_id']; ?>" name="attach_id" id="attach_id" class="form-control"style="font-size:14px; font-weight:bold;" required="" >
            
             <input type="hidden"readonly value="<?php echo $row_fil['attach_type']; ?>" name="attach_type" id="attach_type" class="form-control"style="font-size:14px; font-weight:bold;"  >
          
          <input type="hidden"readonly value="<?php echo $row_fil['attach_link']; ?>" name="file_att2" id="file_att2" class="form-control"style="font-size:14px; font-weight:bold;"  >
          <input type="hidden"readonly value="<?php echo $row_fil['attach_size']; ?>" name="attach_size2" id="attach_size2" class="form-control"style="font-size:14px; font-weight:bold;"  >
          <input type="hidden"readonly value="<?php echo $row_fil['file_type']; ?>" name="file_type2" id="file_type2" class="form-control"style="font-size:14px; font-weight:bold;"  >

          <input type="hidden"readonly value="<?php echo $employ_id ?>" name="employ_id" id="employ_id" class="form-control"style="font-size:14px; font-weight:bold;"  >
                       </div>
  
    <!-- ============multy==file=========================================================== -->
    <div class="row" sty="background-color:hsla(250,100%,75%,0.1); border:1px solid #CCC;box-shadow:2px 2px 7px #F5F5F5;margin-bottom:40px;">                
                        	<div class="card-header"  style="background-color:hsla(250,100%,75%,0.1);">
									<h7 class="card-title"><?php echo $attachments; ?></h7>
								</div> 
                                    
                                    <table style="border-bottom:1px solid; width:%;margin-bottom:40px;">
                                    <thead>
                                <tr class="tr_style">
                                  <td> <button type="button" name="add" id="add" class="add" data-id='' clas="btn btn-success">+</button></td>
                                  <td></td>
                                  <td></td>
                                </tr>
                               
                            </thead>
                             <tbody id="dynamic_fieldfff" class="dynamic_fieldfff" style="border-bottom:1px solid;" >
                                 
                                    <tr id="row"style="border-bottom:1px solid;">
                            <td colspan="0">
                                
                           <div class="row" style="font-size:12px;">  
                          
                                
                      <div class="col-md-3"style="font-siz:12px;">
                          <div class="form-group"> 
						<label><?php echo $the_companyr; ?></label>
					    <select style="font-size:12px;" clas="select" name="company_id_sel0" id="company_id_sel0" data-id='0' class="form-select company_id_selll" 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()) {
                    
                            if($lang=='ar'){$name_ar2=$row_com1['company_name_ar'];}else{$name_ar2=$row_com1['company_name_en'];}        
                         
                          ?>
                   <option value="<?php echo $row_com1['company_id']; ?>"><?php echo $name_ar2; ?> </option>
					<?php  }} }}  ?>	
				          	</select>
								
								</div>
								</div>
								
						<div class="col-md-3">
						<div class="form-group"> 
						<label><?php echo $id; ?></label>
						 <select style="font-size:12px;" name="dept_id0" id="dept_id0" data-id='0' class="form-select dept_idd" required="">
				          <option value=""> <?php echo $select_the_company_for_the_departments_appear; ?></option>
				        </select>
						</div> 
						</div>
						
						
                       <div class="col-md-3">
                         <div class="form-group"> 
			<label><?php echo $attachments_types; ?></label>
				 <input type="hidden" name="hidden[]" value="0">
				<select style="font-size:12px;" styl="font-size:9px;width:100%;" name="att_type_id0" id="att_type_id0" data-id='0' class="form-select att_type_idd" required="">
				<option value=""> <?php echo $select.$space.$attachments_types; ?></option>
              
				                    </select>
								</div>
									</div>
                  <div class="col-md-3">
						<div class="form-group"> 
              <?php 
									$sn=0;
									  $sql_n="SELECT * FROM hr_forms_attachments_tbl where deleted='0'";
									  $result_n = $conn->query($sql_n);
									  if ($result_n->num_rows > 0) {
									  while($row_n = $result_n->fetch_assoc()) {
										$sn++;

									  }}
                                     	$snn = $sn+1;
									?>
						<label><?php echo $Serial_Number; ?></label>
					   <input  type="text"readonly value="<?php echo "000".$snn;?>" name="serial_number0" id="serial_number0" data-id='0' class="form-control form-control-sm" style="font-size:12px;" value=""  >
						</div> 
						</div> 
                          
                            	</div> </td>
                            </tr>   
                                 
                                 
                            <tr id="row"style="border-bottom:1px solid;">
                            <td>

                        	<div class="row">    
                           	<div class="col-md-6">
                           	     <div class="form-group"> 
                               <label>
                                <?php echo $file_name; ?>
                                </label>
                           
                            <input type="text" name="att_name0" id="att_name0" class="form-control form-control-sm" placeholder="Enter File Name" required="">
                            </div>
                            </div>
                                    
                                    <div class="col-md-6">
                                        <div class="form-group"> 
                                        <label>
                                         <?php echo $file; ?>
                                        </label>
                                        <input id="imageFile0" name="imageFile0" type="file"class="form-control form-control-sm" required="" />
                                         </div>
                                         </div>
                                         
                                         
                                           </div></td>
                                         
                                          <td> </td>
                                               <td> </td>
                                     
                            </tr>                                    
                            </tbody>
                        </table>
                         </div>


   <!-- ============/multy==file=========================================================== -->
               
								
					<div class="modal-footer ">
					    <input type="submit" name="sav_btn" id="sav_btn" style="display:non;" class="btn btn-primary me-2" value="<?php echo $save; ?>">
						<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo $cancel; ?></button>
					</div>			
								
								
								</form>
							</div>
						</div>
					</div>
				</div>
				<!-- /Add Department Modal -->
		
   <!--script>
  $(document).ready(function(e) {
   var ss = '';
   var i=0;
	$('#add_att'+ss).click(function(){
	    alert();
    i++;
	 var button_add = $(this).attr('data-id');   
      var date_did = $("#date_did"+i).val();
     
     // $('#dynamic_fieldfff'+button_add).append('<tr style="border-bottom:1px solid;" id="row'+i+'"><td><div class="col-lg-12" style="max-width: 100%;"><label>File Name</label><input type="hidden" name="hidden[]" value="'+i+'"><input type="text" style="color:; height:35px;"  placeholder="Enter File Name" name="att_name'+i+'" id="att_name'+i+'" class="form-control" required=""></div></div></td><td><div class="col-lg-12" style="max-width: 100%;"><label>File</label><input id="imageFile'+i+'" name="imageFile'+i+'"style="color:; height:35px;"  type="file" class="form-control" required=""/></div></div></td><td><div class="col-lg-12" style="max-width: 100%;"><button type="button" name="remove" id="btn_remove'+ss+'" data-id="'+i+'" class="btn btn-danger btn_remove">X</button></div></td></tr>');

   
    $('#dynamic_fieldfffatt'+button_add).append('<tr id="row_att'+i+'"style="border-bottom:1px solid;"><td colspan="3"><div class="col-lg-12"><label clas="col-lg-3 col-form-label"><?php echo $attachments_types; ?></label><select styl="font-size:9px;width:100%;" name="att_type_id'+i+'" id="att_type_id'+i+'" class="form-select" required=""><option value=""> <?php echo $select.$space.$attachments_types; ?></option><option value="basic_attachments"> <?php echo $basic_attachments;?> </option> <option value="other_attachments">  <?php echo $other_file;?> </option><?php	$sql_empp2="SELECT * FROM hr_employ_tbl where employ_id='$employ_id' "; $result_empp2 = $conn->query($sql_empp2); if ($result_empp2->num_rows > 0) { while($row_empp2 = $result_empp2->fetch_assoc()) {  $sql_ta2="SELECT * FROM hr_attachments_type_tbl where (dept_id='".$row_empp2['dept_id']."' or dept_id='all_dept') AND  stop='0' AND deleted='0' ";  $result_ta2 = $conn->query($sql_ta2);  if ($result_ta2->num_rows > 0) {  while($row_ta2 = $result_ta2->fetch_assoc()) { if($lang=='ar'){$att_type_name=$row_ta2['att_type_name_ar'];}else{$att_type_name=$row_ta2['att_type_name_en'];}?><option value="<?php echo $row_ta2["att_type_id"];?>"> <?php echo $row_ta2['att_type_name_ar'];?></option><?php }} }} ?></select></div></td>  </tr> <tr style="border-bottom:1px solid;" id="row_att'+i+'"><td><div class="col-lg-12" style="max-width: 100%;"><label>File Name</label><input type="hidden" name="hidden[]" value="'+i+'"><input type="text" style="color:; height:35px;"  placeholder="Enter File Name" name="att_name'+i+'" id="att_name'+i+'" class="form-control" required=""></div></div></td><td><div class="col-lg-12" style="max-width: 100%;"><label>File</label><input id="imageFile'+i+'" name="imageFile'+i+'"style="color:; height:35px;"  type="file" class="form-control" required=""/></div></div></td><td><div class="col-lg-12" style="max-width: 100%;"><button type="button" name="remove" id="btn_remove'+ss+'" data-id="'+i+'" class="btn btn-danger btn_remove">X</button></div></td></tr>');


  });
 $(document).on('click', '#btn_remove'+ss, function(){
    var button_id = $(this).attr("data-id"); 
    //alert(button_id);
		$('#row_att'+button_id+'').remove();
	});
  
});
  </script-->		
				
				
				
					
				