<?php include("../secure.php"); ?>
<!DOCTYPE html>
<html lang="en" data-layout="vertical" data-topbar="light" data-sidebar="dark" data-sidebar-size="lg" data-sidebar-image="none">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
        <meta name="description" content="Smarthr - Bootstrap Admin Template">
		<meta name="keywords" content="admin, estimates, bootstrap, business, corporate, creative, management, minimal, modern, accounts, invoice, html5, responsive, CRM, Projects">
        <meta name="author" content="Dreamguys - Bootstrap Admin Template">
        <meta name="robots" content="noindex, nofollow">
        <title>issues - HR Marsa System </title>
                <style>
@font-face {
    font-family: 'DroidSansArabic';
    src: url('../../font/DroidSansArabic.ttf');
}
body * {
    font-family: "DroidSansArabic", sans-serif ;
}
    </style>
		<?php 
	$lang=$_GET['lang'];  
    $link_lang='lang='.$lang;
    $company_id=$_GET['company_id']; 
    $main_system_id='2222';
	?> 
	
	 <?php include("../languege_filee_hr.php");?>
	 
	 <?php include("../hr_permission.php");?>
	
		<!-- Favicon -->
        <link rel="shortcut icon" type="image/x-icon" href="../../assets/img/favicon.png">
        
        <link rel="stylesheet" href="../../assets/plugins/alertify/alertify.min.css">
        
		<?php
	if($lang=='ar'){
	?>


         <link rel="stylesheet" href="../../assets/css/bootstrap.rtl.min.css">
   
		<!-- Fontawesome CSS -->
        <link rel="stylesheet" href="../../assets/plugins/fontawesome/css/fontawesome.min.css">
    	<link rel="stylesheet" href="../../assets/plugins/fontawesome/css/all.min.css">

		<!-- Lineawesome CSS -->
        <link rel="stylesheet" href="../../assets/css/line-awesome.min.css">
		<link rel="stylesheet" href="../../assets/css/material.css">
		
		<!-- Fontawesome CSS -->
        <link rel="stylesheet" href="../../assets/css/font-awesome.min.css">
		
		<!-- Datatable CSS -->
		<link rel="stylesheet" href="../../assets/css/dataTables.bootstrap4.min.css">
		
		<!-- Main CSS -->
        <link rel="stylesheet" href="../../assets/css/style.css">
             
             
             
             
        <?php }else{ ?>
            <link rel="stylesheet" href="../../assets_en/css/bootstrap.min.css">
   
		<!-- Fontawesome CSS -->
        <link rel="stylesheet" href="../../assets_en/plugins/fontawesome/css/fontawesome.min.css">
    	<link rel="stylesheet" href="../../assets_en/plugins/fontawesome/css/all.min.css">

		<!-- Lineawesome CSS -->
        <link rel="stylesheet" href="../../assets_en/css/line-awesome.min.css">
		<link rel="stylesheet" href="../../assets_en/css/material.css">
		
		<!-- Fontawesome CSS -->
        <link rel="stylesheet" href="../../assets_en/css/font-awesome.min.css">
		
		<!-- Datatable CSS -->
		<link rel="stylesheet" href="../../assets_en/css/dataTables.bootstrap4.min.css">
		
		<!-- Main CSS -->
        <link rel="stylesheet" href="../../assets_en/css/style.css">
        

            <?php } ?>
		
		 
    </head>
    <body>
		<!-- Main Wrapper -->
        <div class="main-wrapper">
		
			<!-- Toper -->
            <?php include("../toper.php"); ?>
			<!-- /Toper -->
			
			<!-- header -->
            <?php include("../header.php");?>
			
			<!-- /header -->
			
			
				<!-- permission View -->
	<?php //if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($hr_add_dept==1)){ ?>			
					<!-- /permission View -->
		
		
			
			<!-- Page Wrapper -->
            <div class="page-wrapper">
			
				<!-- Page Content -->
                <div class="content container-fluid">
				
					<!-- Page Header -->
					<div class="page-header">
						<div class="row align-items-center">
							<div class="col">
								<h3 class="page-title"><?php echo $issues ; ?></h3>
								<ul class="breadcrumb">
									<li class="breadcrumb-item"><a href="../main/index.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>"><?php echo $Dashboard; ?></a></li>
									<li class="breadcrumb-item active"><?php echo $issues; ?></li>
								</ul>
							</div>
							<div class="col-auto float-end ms-auto">
							 <?php include("hr_add_business_trip_modal.php");?>
							 
							 <?php 
							echo $view_hr_issues_list;
							// if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($hr_add_dept==1)){ ?>
								<!--a href="#" class="btn add-btn" data-bs-toggle="modal" data-bs-target="#add_department"><i class="fa fa-plus"></i><?php  echo $request_permission; ?></a-->
							<?php //}else{ ?>
							<!--a href="#" class="btn add-btn up_add" ><i class="fa fa-plus"></i><?php  echo $request_permission; ?></a-->
							<?php //}  ?>
							</div>
						</div>
					</div>
					<!-- /Page Header -->
					
					
                       	<div class="card">
						<div class="card-body">
							<!-- <h4 class="card-title">Solid justified</h4> -->
							<ul class="nav nav-tabs nav-tabs-solid nav-justified">
												   <?php
  
    /*
    if($company_id=='all_company'){
    $sql_c4="SELECT * FROM hr_employ_tbl where company_id IN ('$ids') AND stop='0' AND deleted='0' ";
    }else{
     $sql_c4="SELECT * FROM hr_employ_tbl where company_id='$company_id' AND stop='0' AND deleted='0' ";   
    }
    
    */
    $count_pending=0;						   
    $count_done=0;
    if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($View_permission_requests==1)){ 
   if($company_id=='all_company'){
     $sql_c4="SELECT * FROM hr_question_tbl where  company_id IN ('$ids') AND deleted='0' ";
  }else{
   $sql_c4="SELECT * FROM hr_question_tbl where  company_id='$company_id' AND company_id!='' AND deleted='0' ";
     }
    }else{
     $sql_c4="SELECT * FROM hr_question_tbl where  employ_id='". $_SESSION['user_id']."' AND company_id!='' AND deleted='0'   ";
    }
    
    $result_c4 = $conn->query($sql_c4);
    if ($result_c4->num_rows > 0) {
     while($row_c4 = $result_c4->fetch_assoc()) {
         
     if($row_c4['hr_question_stat']=='waiting_employee_response' or $row_c4['hr_question_stat']=='Answered_by_the_employee'){$count_pending++;
     }elseif($row_c4['hr_question_stat']=='Absence_was_approved' or $row_c4['hr_question_stat']=='Absence_was_rejected'){ 
       $count_done++;  
      }else{}
     }}  ?> 	    
				<li class="nav-item"><a class="nav-link a active" href="hr_issues_list.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>" id="active_employ"><?php echo $pending; ?>  : <?php echo $count_pending; ?>  <span class="spinner-border spinner-border-sm me-2" role="status" id="loaderr" style="display: none;"></span></a></li>

				<li class="nav-item"><a class="nav-link a" href="hr_issues_list_done.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>" id="inactive_employ"><?php echo $Processing_Done; ?>  : <?php echo $count_done; ?>  </a></li>
								
							</ul>
						</div>
					</div>
	
			
					
	
			
			
					
					<div class="row">
					    
		<div class="alert1" id="messages" style="font-family:'Tajawal',sans-serif;">
		    
         	   <?php if(isset($_SESSION['message'])): ?>
            <div class="alert3 alert3-success">
            <?php echo $_SESSION['message']; ?>
            <script>
    setTimeout(function() {
        let alert = document.querySelector(".alert3");
            alert.remove();
    }, 3000);
    </script>
           </div>
            <?php endif; ?>
           <?php unset($_SESSION['message']); ?></div>
			
			
			<?php
			   $modal_table_name='hr_request_permission_tbl';
              
                $id_name='request_per_id';
                  $proccess_details_ar='الموافقه على طلب إذن رقم'.$modal_id;
                  $proccess_details_en='Approval of permission request No'.$modal_id;
                   
                   
                 $proccess_details_ar_reject='رفض  طلب إذن رقم'.$modal_id;
                  $proccess_details_en_reject='Reject of permission request No'.$modal_id;
                   
                   
                   $title=$absence_question;
                 
			?>		    
			<input type="hidden" name="modal_table_name" id="modal_table_name" readonly value="<?php echo $modal_table_name; ?>"> 
            <input type="hidden" name="id_name" id="id_name" readonly value="<?php echo $id_name; ?>"> 
           
           <input type="hidden" name="proccess_details_ar" id="proccess_details_ar" readonly value="<?php echo $proccess_details_ar; ?>"> 
           <input type="hidden" name="proccess_details_en" id="proccess_details_en" readonly value="<?php echo $proccess_details_en; ?>">
           
            
           <input type="hidden" name="proccess_details_ar_reject" id="proccess_details_ar_reject" readonly value="<?php echo $proccess_details_ar_reject; ?>"> 
           <input type="hidden" name="proccess_details_en_reject" id="proccess_details_en_reject" readonly value="<?php echo $proccess_details_en_reject; ?>">
          
          
					    
						<div class="col-md-12">
							<div>
							    <div class="table-responsive">
							    <table class="table  datanew table-striped mb-0">
								<!--table class="table table-striped custom-table mb-0 datatable" -->
                                <thead>
										<tr>
										
											<th style="font-size:12px;"><?php echo $id; ?></th>
											<th style="font-size:12px;"><?php echo $the_companyr; ?>-<?php echo $employee_name; ?></th>
											<th style="font-size:12px;"><?php echo $type; ?></th>
										    
										    <th style="font-size:12px;"><?php echo $the_date; ?></th>
										      <th style="font-size:12px;"><?php echo $Employee_Justification; ?></th>
									     	<th style="font-size:12px;"><?php echo $attachments; ?></th>
									     		<th style="font-size:12px;"><?php echo $request_status; ?></th>
											<!--th><?php echo $status; ?></th-->
									     	<th style="font-size:12px;">Action</th>
										
										</tr>
									</thead>
									<tbody>
                                    <?php
                    include("dbConfig.php");
             if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($view_hr_issues_list==1)){ 
                  if($company_id=='all_company'){
                    $sql_cu="SELECT * FROM hr_question_tbl where (hr_question_stat='waiting_employee_response' or hr_question_stat='Answered_by_the_employee')AND company_id IN ('$ids') AND deleted='0' ORDER BY `hr_question_tbl`.`createdDate_timee` DESC";
                  }else{
                    $sql_cu="SELECT * FROM hr_question_tbl where  (hr_question_stat='waiting_employee_response' or hr_question_stat='Answered_by_the_employee')AND company_id='$company_id' AND company_id!='' AND deleted='0' ORDER BY `hr_question_tbl`.`createdDate_timee` DESC";
                       }
                       
                       
                    }else{
                 $sql_cu="SELECT * FROM hr_question_tbl where (hr_question_stat='waiting_employee_response' or hr_question_stat='Answered_by_the_employee')AND employ_id='". $_SESSION['user_id']."' AND company_id!='' AND deleted='0'ORDER BY `hr_question_tbl`.`createdDate_timee` DESC ";
                    }
                        $result_cu = $conn->query($sql_cu);
                        if ($result_cu->num_rows > 0) {
                          while($row_cu = $result_cu->fetch_assoc()) {
                         $modal_id=$row_cu['hr_question_id'];  
                           $hr_question_date=$row_cu['hr_question_date'];
                           $employ_id=$row_cu['employ_id'];
                          ?> 
							    
                                        <tr class="D<?php echo $row_cu['hr_question_id']; ?>">
										
											<td>
											  <?php echo $row_cu['hr_question_id']; ?><br><b style="color:red;"><?php //echo $user_id_top_manager; ?></b>
											 <input type="hidden" name="modal_id" class="modal_id" id="modal_id<?php echo $modal_id; ?>" readonly value="<?php echo $modal_id; ?>"> 	  
											</td>
											
										
										
											<td>
							<h2 class="table-avatar">
							
							<a class="avatar" clas="avatar avatar-xs" href="profile.html">
							<?php
							$attach_link=0;
                          $sql_ico="SELECT * FROM hr_employ_attachments_tbl where employ_id='".$row_cu['employ_id']."' AND att_name='employ_photo' AND  stop='0' AND deleted='0' ";
                          $result_ico = $conn->query($sql_ico);
                           if ($result_ico->num_rows > 0) {
                            while($row_ico = $result_ico->fetch_assoc()) {
                              $attach_link=$row_ico['attach_link'];  
                            }}
                             ?>  
                               <?php if($attach_link==''){ ?>  
								<img alt="" src="../../assets/img/profiles/avatar-09.jpg">
								<?php }elseif($attach_link!=''){ ?>
								<img alt="" src="../../../Shipping_Clearance_System/jquery/pages/system_maintenance/user_img/<?php echo $attach_link; ?>">
							<?php }else{ ?>
							<img alt="" src="../../assets/img/profiles/avatar-09.jpg">
							<?php } ?>
								
								</a>
							    </h2>
										      <?php
										      $employ_id=0;
										      $dept_id=0;
										      $job_id=0;
                                             $sql_e="SELECT * FROM hr_employ_tbl where employ_id='".$row_cu['employ_id']."' ";
                                             $result_e = $conn->query($sql_e);
                                             if ($result_e->num_rows > 0) {
                                             while($row_e = $result_e->fetch_assoc()) {
                                            $employ_id=$row_e['employ_id'];
                                            $dept_id=$row_e['dept_id'];
                                            $job_id=$row_e['job_id'];
                                            $employee_number_fingerprint=$row_e['employee_number_fingerprint'];
                                            
                                                if($lang=='ar'){$employ_name=$row_e['employ_name_ar'];}else{$employ_name=$row_e['employ_name_en'];} 
                                            echo $employ_name;     
                                             }}
                                             
                                      
                                             
                                               ?> 
                                         <br>
                                           <small class="text-muted">
                                               	 <?php
                                             $sql_c="SELECT * FROM main_company_tbl where company_id='".$row_cu['company_id']."' ";
                                             $result_c = $conn->query($sql_c);
                                             if ($result_c->num_rows > 0) {
                                             while($row_c = $result_c->fetch_assoc()) {
                                            
                                                if($lang=='ar'){$city_name2=$row_c['company_name_ar'];}else{$city_name2=$row_c['company_name_en'];} 
                                            echo $city_name2;     
                                          
                                             }}
                                               ?> 
                                           
                                               
                                           </small>
                                           
                                           <br>	
                                            <small class="text-muted" style="font-size:12px;">
								   <?php 
					             $sql_c="SELECT * FROM dept_tb where dept_id='$dept_id' AND dept_id!='0' ";
                                  $result_c = $conn->query($sql_c);
                                  if ($result_c->num_rows > 0) {
                                   while($row_c = $result_c->fetch_assoc()) {
                                  if($lang=='ar'){$dept_name=$row_c['dept_name'];}else{$city_name2=$row_c['dept_name_en'];} 
                                        echo $dept_name;     
                                    }}
					            ?>-
					         	<?php if($row_cw['user_type']=='Top_Manager' or $row_cw['user_type']=='System_Manager'){ echo $row_cw['user_type'];
					         	}else{ ?>
									      <?php 
									     $sql_jo="SELECT * FROM job_tb where job_id='$job_id' AND job_id!='0' ";
                                         $result_jo = $conn->query($sql_jo);
                                         if ($result_jo->num_rows > 0) {
                                         while($row_jo = $result_jo->fetch_assoc()) {
                                          if($lang=='ar'){$job_name=$row_jo['job_name'];}else{$job_name=$row_jo['jop_name_en'];} 
                                          echo $job_name;
                                         //echo $row_jo['job_id'];
                                         
                                         }}else{ echo $no_jop;}
									     ?><?php } ?>
									</small><br>
									<small class="m3"><?php echo $row_emp['id_num']; ?></small>
                                           
											    </td>
										
											<td>
										   <?php if($row_cu['hr_question_type']=='ghyab'){echo $absence_question;}elseif($row_cu['hr_question_type']=='hodor'){echo $emergency;}  else{} ?>
                                        	<br><small class="small doj text-muted">
                                        <?php if($row_cu['request_type']=='Late'){echo $Being_late_for_work;}elseif($row_cu['request_type']=='leave_before'){echo $Dismissa_before_the_working_hours;}  else{} ?>	    
                                        	    
                                        	</small>
                                        	<!--br>
                                        	<small>
                                        	    <?php if($lang=='ar'){ $hr_question_details=$row_cu['hr_question_details_ar'];}else{$hr_question_details=$row_cu['hr_question_details_en'];} ?>
                                        	    <?php echo $hr_question_details; ?>
                                        	</small-->
											  </td>
											  
											 
											  
											  	<td>
										  <small style="font-size:12px;">  <?php echo $row_cu['hr_question_date']; ?> </small>
											  </td>
											  
											  <!--td>
										  <small style="font-size:12px;">  <?php echo $row_cu['request_per_time_from']; ?></small>
											  </td-->
											  
										     <td>
										         <?php if($row_cu['hr_question_stat']!='waiting_employee_response'){ ?>
										        <small style="width:50px;" clas="small doj text-muted"> 
										  <textarea readonly name="notes" id="notes" class="form-control" style="width: 200px;overflow: scroll; font-size:12px;">
										      <?php echo $row_cu['employee_reply']; ?></textarea>	
										  </small>
											  <?php }elseif($row_cu['hr_question_stat']=='waiting_employee_response'){ ?>  
										      <?php include("../modals/hr_add_issues_modal.php");?>   
										<a href="#" data-bs-toggle="modal" data-bs-target="#add_issues<?php echo $modal_id; ?>" class="btn btn-sm btn-primary"><?php echo $Justification; ?></a>
											 <?php } ?>
											  </td>
						
									
										<td clas="text-end">
							<?php
                          $sql_ico="SELECT * FROM hr_employ_attachments_tbl where employ_id='".$row_cu['employ_id']."' AND attach_type='219231' AND connect_id='".$row_cu['hr_question_id']."' AND  stop='0' AND deleted='0' ";
                          $result_ico = $conn->query($sql_ico);
                           if ($result_ico->num_rows > 0) {
                            while($row_ico = $result_ico->fetch_assoc()) {
                              $attach_link=$row_ico['attach_link']; 
                              $attach_id=$row_ico['attach_id']; 
                              $att_name=$row_ico['att_name'];
                              //echo  $attach_id.'<br>';
                             ?>

                             <ul class="team-members">
									<li styl="width:50px;">
									<?php if($row_ico['file_type']=='image/png' or $row_fil['file_type']=='image/jpeg'){ ?><a href="../hr_files/<?php echo $row_ico['attach_link']; ?>" target="_new" data-bs-toggle="tooltip" title="" data-bs-original-title="<?php echo $att_name; ?>" aria-label="John Doe"><img alt="" src="../hr_files/<?php echo $row_ico['attach_link']; ?>">
									 <?php echo $att_name; ?>
									</a>
									<?php }else{ ?>
									<a href="../hr_files/<?php echo $row_ico['attach_link']; ?>" target="_new" data-bs-toggle="tooltip" title="" data-bs-original-title="<?php echo $att_name; ?>" aria-label="John Doe"><img alt="" src="../../assets/img/profiles/avatar-02.jpg">
									 <?php echo $att_name; ?>
									</a>
									<?php } ?>
								</li>	

										</ul>	<?php }}  ?>
                             
						
							</td> 			
									
											  
											  
										<td> 
										<div class="action-label">
					                 <?php if($row_cu['hr_question_stat']=='waiting_employee_response'){ ?>
					<span>	<a style="font-size:12px;" class="btn btn-white bt/n-sm btn-rounded" href="javascript:void(0);">
					<i class="fa fa-dot-circle-o text-secondary"></i> <?php echo $waiting_employee_response; ?>
					</a></span><?php }elseif($row_cu['hr_question_stat']=='Answered_by_the_employee'){ ?>
					<span>	<a style="font-size:12px;" class="btn btn-white bt/n-sm btn-rounded" href="javascript:void(0);">
					<i class="fa fa-dot-circle-o text-info"></i> <?php echo $Answered_by_the_employee; ?>
					</a></span>
				<?php }elseif($row_cu['hr_question_stat']=='Absence_was_approved'){ ?>
					<span>	<a style="font-size:12px;" class="btn btn-white bt/n-sm btn-rounded" href="javascript:void(0);">
					<i class="fa fa-dot-circle-o text-success"></i> <?php echo $Has_been_approved; ?>
					</a></span>
					
						<?php }elseif($row_cu['hr_question_stat']=='Absence_was_rejected'){ ?>
					<span>	<a style="font-size:12px;" class="btn btn-white bt/n-sm btn-rounded" href="javascript:void(0);">
					<i class="fa fa-dot-circle-o text-danger"></i> <?php echo $access_denied; ?>
					</a></span>
					<br>
					<small clas="text-muted" class="text-danger" style="color:red;font-size:12px;"><?php echo $row_cu['the_reason']; ?></small>
					
					<?php }else{} ?>
					 </div>
				                       	
				                  </td>
						 
								
											
											<td class="text-end">
											 
											 
											    
											 <?php include("../modals/hr_approval_ghyab_modal.php");?>   
											 <?php include("../modals/hr_reject_ghyab_modal.php");?>
											 
									<?php if($row_cu['hr_question_stat']=='Answered_by_the_employee'){ ?>
										
										<?php //if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($Approval_jection_questions==1)){ ?>
										
										
										<?php if($urow['user_type']=='Top_Manager'){ ?>  

										<div class="dropdown dropdown-action">
										<a href="#" class="action-icon dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="material-icons">more_vert</i></a>
										<div class="dropdown-menu dropdown-menu-right" style="">
											<?php //if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($hr_edit_dept==1)){ ?>  
										<a class="dropdown-item btn btn-outline-success btn-sm" href="#" data-bs-toggle="modal" data-bs-target="#approval_ghyab_modal<?php echo $modal_id; ?>"><i class="fa fa-check text-success"></i>  <?php echo $approved; ?></a>
										<?php //}else{ ?>
										<!--a class="dropdown-item btn btn-outline-success btn-sm up_add" href="javascript:void(0);" ><i class="fa fa-check text-success"></i><?php echo $approved; ?></a-->
									    <?php //} ?>
									    
									    <?php //if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($hr_delete_dept==1)){ ?>  
										<a class="dropdown-item btn btn-outline-danger btn-sm" href="#" data-bs-toggle="modal" data-bs-target="#reject_per_modal<?php echo $modal_id; ?>"><i class="fa fa-close text-danger"></i><?php echo $reject; ?></a>
											<?php //}else{ ?>
										<!--a class="dropdown-item btn btn-outline-danger btn-sm up_add" href="javascript:void(0);" ><i class="fa fa-close text-danger"></i> <?php echo $reject; ?></a-->
									    <?php //} ?>
									    
									     <?php } ?>
									     
									       <?php } ?>
									 
									    
													</div>
												</div>	
											</td>
											
											
											<?php }}  ?>
										</tr>
								

									</tbody>
								</table>
							</div>
						</div>
					</div>
                </div>
                	</div>
				<!-- /Page Content -->
				
			
				
				
				
				
				<!-- Edit Department Modal -->
				<div id="edit_department" class="modal custom-modal fade" role="dialog">
					<div class="modal-dialog modal-dialog-centered" role="document">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title">Edit Department</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>
									<div class="form-group">
										<label>Department Name <span class="text-danger">*</span></label>
										<input class="form-control" value="IT Management" type="text">
									</div>
									<div class="submit-section">
										<button class="btn btn-primary submit-btn">Save</button>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
				<!-- /Edit Department Modal -->

				<!-- Delete Department Modal -->
				<!--div class="modal custom-modal fade" id="delete_department" role="dialog">
					<div class="modal-dialog modal-dialog-centered">
						<div class="modal-content">
							<div class="modal-body">
								<div class="form-header">
									<h3>Delete Department</h3>
									<p>Are you sure want to delete?</p>
								</div>
								<div class="modal-btn delete-action">
									<div class="row">
										<div class="col-6">
											<a href="javascript:void(0);" class="btn btn-primary continue-btn">Delete</a>
										</div>
										<div class="col-6">
											<a href="javascript:void(0);" data-bs-dismiss="modal" class="btn btn-primary cancel-btn">Cancel</a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div-->
				<!-- /Delete Department Modal -->
				
				
				
				
            </div>
			<!-- /Page Wrapper -->

        </div>
		<!-- /Main Wrapper -->
		
	 
		<!-- sitting -->
		<?php include("../setting.php"); ?>
	    <!-- /sitting -->

	<!-- Footer -->
		<?php include("../footer.php"); ?>
		<!-- /Footer -->

	 <!-- jQuery -->
        <script src="../../assets/js/jquery-3.6.0.min.js"></script>

        <!-- Feather Icon JS -->
        <script src="../../assets/js/feather.min.js"></script>

        <!-- Slimscroll JS -->
        <script src="../../assets/js/jquery.slimscroll.min.js"></script>

        <!-- Datatable JS -->
        <script src="../../assets/js/jquery.dataTables.min.js"></script>
        <script src="../../assets/js/dataTables.bootstrap4.min.js"></script>
        
        <!-- Bootstrap Core JS -->
        <script src="../../assets/js/bootstrap.bundle.min.js"></script>

        <!-- Custom JS -->
        <script src="../../assets/js/script.js"></script>
      

		 <!-- Theme Settings JS -->
		<script src="../../assets/js/layout.js"></script>
		<script src="../../assets/js/theme-settings.js"></script>

		<!-- Custom JS -->
		<!--script src="../../assets/js/app.js"></script-->
		
		<script src="../script_lang.js"></script> 
		
		  <!-- Alertify JS -->
		<script src="../../assets/plugins/alertify/alertify.min.js"></script>
		<!--script src="../../assets/plugins/alertify/custom-alertify.min.js"></script-->
        <!-- /Alertify JS -->
		
		
		
	    <script>
  $(document).ready(function(e) {
   $(".up_add").click(function(){
   alertify.error(message_per);
      });
      });
       </script>	
    
    
    <script>
  $(document).ready(function(e) {
   $(".up_addh").click(function(){
   alertify.error(message_per);
      });
      });
       </script>
       
       
       
       <script>
  $(document).ready(function(e) {
   var ss = '';
   var i=0;
   $('#DataTables_Table_0').on('click','#add'+ss,function () {
      // alert();
	//$('#add'+ss).click(function(){
    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>');
  });
 $(document).on('click', '#btn_remove'+ss, function(){
    var button_id = $(this).attr("data-id"); 
    //alert(button_id);
		$('#row'+button_id+'').remove();
	});
  
});
  </script>
       
       
       
       	<!--script>
       	 var modal_table_name=$('#modal_table_name').val();
       	 var id_name=$('#id_name').val();
       	 var proccess_details_delete_disable=$('#proccess_details_delete_disable').val();
       	 var proccess_details_en_delete_disable=$('#proccess_details_en_delete_disable').val();
       	 
       	 var proccess_details_enable=$('#proccess_details_enable').val();
       	 var proccess_details_en_enable=$('#proccess_details_en_enable').val();
       	  
    $(".checktoggle").click(function(e){
        var id = $(this).attr('data-id');
        //alert(id);
        
           var id_check=$('#id_check').val(); 
        if(id_check==''){
      alertify.error(message_per);
        }else{
        
        if($('#user'+id).is(':checked') ){
      if(confirm(message_disabled)){
         //alert("Checkbox Is checked");
    $('#user'+id).prop('checked', true);
    
   //======================
      var add_user_id=$('#add_user_id').val();
      var company_id=$('#company_id').val();
      var g = $(this).attr('data-id');
      var date_did = $("#date_did"+g).val();
   //alert(g);
          $.post('../modals/hr_disabeld_code.php', {'g':g,'add_user_id':add_user_id,'company_id':company_id,'modal_table_name':modal_table_name,'id_name':id_name,'proccess_details_delete_disable':proccess_details_delete_disable,'proccess_details_en_delete_disable':proccess_details_en_delete_disable}, function(r) {
              //alert(r);
        if (r == 1) {
     //  alert("تمت العمليه بنجاح");
      alertify.error(message_success);
         // window.location.reload();
         $(".D"+i).css("background-color", "#ccc");
         $(".D"+i).fadeOut("slow");
       

               }
             });
             
      }else{
        return false;
      }
   
   //======================
}
else{
   // alert("Checkbox Is not checked");
    $('#user'+id).prop('checked', false);
     if(confirm(message_enabled)){
    
      //======================
      var add_user_id=$('#add_user_id').val();  
      var company_id=$('#company_id').val();
      var g = $(this).attr('data-id');
      var date_did = $("#date_did"+g).val();
  // alert(g);
          $.post('../modals/hr_enable_code.php', {'g':g,'add_user_id':add_user_id,'company_id':company_id,'modal_table_name':modal_table_name,'id_name':id_name,'proccess_details_enable':proccess_details_enable,'proccess_details_en_enable':proccess_details_en_enable}, function(r) {
             // alert(r);
        if (r == 1) {
     //  alert("تمت العمليه بنجاح");
   alertify.success(message_success);
         $(".D"+i).css("background-color", "#ccc");
         $(".D"+i).fadeOut("slow");
          window.location.reload();

               }
             });
             
      }else{
        return false;
      }
   
 }  //====================== 
    
}
    });
</script-->
       
       
		
		
   <style>
.alert {
  text-align: center;
  padding: 10px;
  background: rgb(168, 240, 177);
  color: green;
  margin-bottom: 10px;
  display: none;
}
.alert3 {
  text-align: center;
  padding: 10px;
  background: rgb(168, 240, 177);
  color: green;
  margin-bottom: 10px;
  
}
.alert4 {
  text-align: center;
  padding: 10px;
  margin-bottom: 10px;
  border-color: #ebad30;
  font-size:18px;
}

</style>	
		
    </body>
</html>




