<?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>Countries - 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");?>
	  
	  	  <?php include("../Function/hr_all_function_code.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">
           <!-- Datetimepicker CSS -->
		<link rel="stylesheet" href="../../assets/css/bootstrap-datetimepicker.min.css">
             
             <!-- Ck Editor -->
		<link rel="stylesheet" href="../../assets/css/ckeditor.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">
           <!-- Datetimepicker CSS -->
		<link rel="stylesheet" href="../../assets/css/bootstrap-datetimepicker.min.css">
             <!-- Ck Editor -->
		<link rel="stylesheet" href="../../assets/css/ckeditor.css">
        
           <!-- Datetimepicker JS -->
		<script src="../../assets/js/moment.min.js"></script>
		<script src="../../assets/js/bootstrap-datetimepicker.min.js"></script>

            <?php } ?>
		
		 
    </head>
    <body>
		<!-- Main Wrapper -->
        <div class="main-wrapper">
		
			<!-- Toper -->
            <?php include("../toper.php"); ?>
			<!-- /Toper -->
			
			<!-- header -->
            <?php include("../header.php");?>
			
			<!-- /header -->
			
		
		
			<?php
         if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($checking_forms==1)){
         }else{
       ?>
             <script>window.location="https://www.marsalogistics.com/new/hr_marsa_system/ar/main/error_permation.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id;?>"</script>;
          </script>
        <?php } ?> 
		
		
			
			<!-- 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 $Checking_forms ; ?></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"><a href="../quality_dept/hr_formslistt_24.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>"><?php echo $Forms; ?></a></li>

									<li class="breadcrumb-item active"> <?php echo $Checking_forms ; ?></li>
								</ul>
							</div>
							<div class="col-auto float-end ms-auto">
							<?php
                        include("dbConfig.php");
                        $sql_htt="SELECT * FROM hr_tasks_tbl";
                        if ($result_tt=mysqli_query($conn,$sql_htt))
  {
                        $rowcount=mysqli_num_rows($result_tt);
                        mysqli_free_result($result_tt);
  }

  ?>
  
							 <?php //include("../employ_dept/hr_add_hr_task_modal.php");?>
							 
						<!--a href="#" class="btn add-btn" data-bs-toggle="modal" data-bs-target="#add_tasks"><i class="fa fa-plus"></i> <?php echo $add_task; ?></a-->
							</div>
						</div>
					</div>
					<!-- /Page Header -->
					
					<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']; ?>
           </div>
            <?php endif; ?>
           <?php unset($_SESSION['message']); ?></div>
					    
			 
			 
			 <?php 
			  $attach_id = $_GET["attach_id"];
			  $att_type_id =$_GET["att_type_id"];
			  
			  $date_from = $_GET["date_from"]; 
			  $date_to = $_GET["date_to"]; 
			  $date_from_convert=date("Y-m-d", strtotime($date_from)); 
			  $date_to_convert=date("Y-m-d", strtotime($date_to));
			  //echo $date_from_convert.'<br>'; echo $date_to_convert.'<br>'; 
			  // $check_isset=$_GET["check_isset"]; 
			   if(isset($_POST["btn_ard"])){
				$check_isset='1'; 
				//echo $check_isset;
			     }
			     
			    $user_type=$urow['user_type'];
				//echo $user_type;
				?>	 
			 




			
						<!-- /Projects Tab -->
					
						<div clas="tab-pane fade" id="bank_statutory2334">

					<div class="row">
						<div class="col-sm-12">
							<div class="file-wrap">
							    
								<div class="file-sidebar" styl="background-color:red;">
									<div class="file-header justify-content-center">
										<span><?php echo $Audit_options; ?></span>
										<a href="javascript:void(0);" class="file-side-close"><i class="fa fa-times"></i></a>
									</div>
									<!--form class="file-search">
										<div class="input-group">
											<div class="input-group-prepend">
												<i class="fa fa-search"></i>
											</div>
											<input type="text" id="searchh" class="form-control rounded-pill" placeholder="Search">
										</div>
									</form-->
									<div class="file-pro-list">
										<div class="file-scroll">
											<ul class="file-menu" id="myTable4">
												<!--li class="li-link active">
												<a  class="att_type" id="all_att"><?php echo $all_attachments; ?>mmmm22222</a>
												</li-->
					<?php 
					$sql_cc="SELECT * FROM hr_forms_attachments_tbl where attach_id='$attach_id' and deleted='0'";
					$result_cc = $conn->query($sql_cc);
					 if ($result_cc->num_rows > 0) {
					  while($row_cc = $result_cc->fetch_assoc()) { 
						$combinedArray = array();
						//echo $row_cc["audit_options_id"]."</br>";
						//echo $row_cc["attach_link"]."</br>";

						$audit_options_ids = explode(',', $row_cc["audit_options_id"]);
						//print_r($audit_options_ids);
						$attach_links = explode(',', $row_cc["attach_link"]);
						//print_r($attach_links)."</br>";
						foreach ($audit_options_ids as $index => $option_id) {
							$combinedArray[trim($option_id)] = $attach_links[$index];
						}
					  }
					 //print_r($combinedArray);
					  //print_r($audit_options_ids);
					}
					?>
                     
					
					<?php
                        $sql_co="SELECT * FROM hr_audit_options_tbl where att_type_id='$att_type_id' and deleted='0'";
                          $result_co = $conn->query($sql_co);
                           if ($result_co->num_rows > 0) {
                            while($row_co = $result_co->fetch_assoc()) { 
                              if($lang=='ar'){$audit_det=$row_co['audit_details_ar'];}else{$audit_det=$row_co['audit_details_en'];}
                              
                              $add_user_id=$row_co['add_user_id'];
                            //  echo $audit_det;
                             ?>
							<li class="li-link">
                             <a style="font-size:14px;" class="att_type" id="<?php echo $row_attype["att_type_id"];?>"><?php //echo $audit_det; ?>
                             <small style="font-size:12px;"><?php //echo $att_type_name; ?></small>

						 <div class="btn-group btn-group-sm">
						    
						     
                         <!--button type="button" class="btn btn-success"><i class="fa fa-check text-success-o"> <?php echo $matching; ?></i></button>
                                   
                             <button type="button" class="btn btn-danger"><i class="fa fa-close text-danger-o">  <?php echo $Not_matching; ?></i>  </button-->
                             
                          <?php 
						  $sqlcheck="SELECT * FROM check_confirmation_tb where stat='1' and audit_type='".$row_co["audit_options_id"]."' and att_type_id='$att_type_id' and attach_id='$attach_id' and deleted='0'";
						  $result_check = $conn->query($sqlcheck);
						  if ($result_check->num_rows > 0) {
						?>
                            <input type="checkbox" name="check_audit[]" class="check_audit" value="<?php echo $row_co["audit_options_id"]?>" style="width:25px;height:25px;" checked>
						 <?php }else{ 
						
							?>
							<input type="checkbox" name="check_audit[]" class="check_audit" value="<?php echo $row_co["audit_options_id"]?>" style="width:25px;height:25px;" >
						 <?php } ?>
						 <?php if($row_co['audit_types']==1){ ?>
                            <b class="m-2 att_typee" style="font-size:14px;" id="<?php echo $att_type_id;?>" data-id="<?php echo $attach_id?>" option-id="<?php echo '../hr_files/'.trim($combinedArray[$row_co["audit_options_id"]]);?>"><?php echo $audit_det."    "; ?><i class="fa fa-file" aria-hidden="true" style="color:#dc3571;"></i></b>  
                        <?php }else{ ?>
							<b class="m-2" style="font-size:14px;" class="att_type" id="<?php echo $row_attype["att_type_id"];?>"><?php echo $audit_det; ?></b>  
						<?php } ?>
                            
                            </b>
                                </div>

						 </a>
						 
						
						 <?php }}  ?>
							</li>

							</ul>
							
							 <div class="col-md-12">	
							<div class="form-group" style="font-size:14px; font-weight:;">
                           <label style="float:;">
                        	    <?php
                                    $sql_att4="SELECT * FROM hr_forms_attachments_tbl where attach_id='$attach_id' and deleted='0' ";
                                    $result_att4 = $conn->query($sql_att4);
                                   if ($result_att4->num_rows > 0) {
                                    while($row_att4 = $result_att4->fetch_assoc()) { 
                                        //echo $row_att4["check_note"]; 
                                        ?>   

                        <?php echo $Notes; ?> </label>                                          
                        <textarea name="check_note" id="check_note" class="form-control" required=""><?php echo $row_att4["check_note"];?></textarea>
                     <input type="hidden" name="att_name" id="att_name" value="<?php echo $row_att4["att_name"];?>">
                       <input type="hidden" name="add_user_id_emp" id="add_user_id_emp" value="<?php echo $row_att4["add_user_id"];?>">
                       <?php }} ?>
                       
                        
                       
                        </div>
                         </div>
							 
							 
							
											<div class="show-more">
											     <button type="button" class="btn btn-success" id="confirm"><i class="fa fa-check text-success-o"> <?php echo $to_be_sure; ?></i></button>
												<!--a href="#">Show More</a-->
											</div>
										</div>
									</div>
						
							
								<!--div class="file-header justify-content-center">
										<span><?php echo $Processes_Audits; ?></span>
										<a href="javascript:void(0);" class="file-side-close"><i class="fa fa-times"></i></a>
									</div>
							
						<ul class="file-menu" id="myTable4">
										

					<?php
                        $sql_pr="SELECT * FROM process_systems_tbl where proccess_type='auddit' AND proccess_id='$attach_id' and deleted='0'";
                          $result_pr = $conn->query($sql_pr);
                           if ($result_pr->num_rows > 0) {
                            while($row_pr = $result_pr->fetch_assoc()) { 
                              //if($lang=='ar'){$proccess_details=$row_pr['proccess_details'];}else{$proccess_details=$row_pr['proccess_details_en'];}
                              $proccess_details=$row_pr['proccess_details'];
                               $process_systems_id=$row_pr['process_systems_id'];
                            //  echo $audit_det;
                             ?>
                             
							<li class="li-link">
                             <a style="font-size:14px;" class="att_type" id="<?php echo $row_attype["att_type_id"];?>"><?php echo $process_systems_id ; ?>
                             <small style="font-size:12px;"><?php //echo $att_type_name; ?></small>

						 <div class="btn-group btn-group-sm">
						
                           
                            <b class="m-2" style="font-size:14px;" class="att_type"><?php echo $proccess_details; ?></b>  

                                </div>
						 
						 
						 </a>
						 <?php }}  ?>
							</li>

							</ul-->
							
							
								</div>
								
								
								
								
								
								<div class="file-cont-wrap">
									<div class="file-cont-inner">
										<div class="file-cont-header">
											<div class="file-options">
											    <?php
                                     $sql_att2="SELECT * FROM hr_forms_attachments_tbl where attach_id='$attach_id' and deleted='0' ";
                                             $result_att2 = $conn->query($sql_att2);
                                             if ($result_att2->num_rows > 0) {
                                             while($row_att2 = $result_att2->fetch_assoc()) { 
                                                 $attach_idd=$row_att2['attach_id'];  
                                               $att_namee=$row_att2['att_name'];
                                                $s_nn=$row_att2['s_n'];
												$attach_link = $row_att2['attach_link'];
												$attach_links = explode(',', $attach_link); // Split the attach_link by commas
												//print_r($attach_links);
                                               ?>
												<a href="javascript:void(0)" id="file_sidebar_toggle" class="file-sidebar-toggle">
													<?php echo $attach_idd; ?>
												</a>
											</div>
											<span><?php echo $att_namee; ?></span> 
											<div class="file-options">
									 <!--span class="btn-file"><input type="file" class="upload"><?php echo $add_attachments; ?><i class="fa fa-upload"></i></span-->
										<?php echo $s_nn; ?>
										
					 <input type="hidden" name="s_n" id="s_n" readonly  value="<?php echo $s_nn; ?>">	 <br> 
			
										
											</div>
											
											
										</div>
										
										<div class="file-content">
											<!--form class="file-search">
												<div class="input-group">
													<div class="input-group-prepend">
														<i class="fa fa-search"></i>
													</div>
													<input type="text" id="searchh2" class="form-control rounded-pill" placeholder="Search">
												</div>
											</form-->
											
											<div class="file-body">
												<div class="file-scroll">
													<div class="file-content-inner">
													    

														<h4 id="File_Title"></h4>
														<div class="row row-sm" id="row-sm">
														   	 <div class="row">
														   	  	<div class="col-sm-12">	
																	<?php
																	 $iframeSrc = '../hr_files/';
																	 ?>
																	<?php 
                                                                    foreach ($attach_links as $link) {
  echo '<iframe class="serviceFrameSend" src="../hr_files/' . $link . '" width="700" height="1000" frameborder="0"></iframe>';
} ?>
																	
																	<?php }} ?>
														   	  	</div>   
														
												<!-- ===22table====================================================================== -->	
													
												<!-- ===22table====================================================================== -->	
													</div>		
															


														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					
                </div>	 </div>	
						


                    <br><hr><div class="row">
						<div class="col-md-12">
						    <div class="table-responsive">
							    <?php if($lang=="ar"){$processinsmak="العمليات في سماك";}else{$processinsmak="process in smak";}?>
								<div class="card-header">
									   <h4 class="card-title mb-0"><?php echo $processinsmak; ?></h4>
								   </div>   
								   
								   <table class="table table-striped custom-table mb-0 ">
									   <thead>
										   <tr>
										   <th>رقم القيد</th>
                                            <th>رقم تسلسلي</th>
                                            <th></th>
                                            <th>مدين</th>
                                            <th>دائن</th>
											<th>الشركة</th>
										   </tr>
									   </thead>
<tbody>
										<?php 
										$maden = 0;
										$daen = 0;
										$rased = 0;

										$sql_daily_rest = "SELECT dr.*, mc.company_name_ar, mc.company_name_en 
        FROM connect_forms_to_account_tb cfa
        JOIN daily_restriction_tbl dr ON dr.doc_number = cfa.constraint_num 
                                      AND dr.series_number = cfa.proccess 
                                      AND dr.company_id = cfa.company_id
        LEFT JOIN main_company_tbl mc ON mc.company_id = dr.company_id
        WHERE cfa.attach_id = '" . $_GET["attach_id"] . "' and cfa.deleted='0'";
										  $result_daily_rest = $conn->query($sql_daily_rest);
                                               if ($result_daily_rest->num_rows > 0) {
                                               while($row_daily_rest = $result_daily_rest->fetch_assoc()) {
												$maden+=$row_daily_rest["maden"];
												$daen+=$row_daily_rest["daen"];
										?>
										   <tr>
											   <td><?php echo $row_daily_rest['doc_number']; ?></td>
											   <td><?php echo $row_daily_rest['series_number']; ?></td>
											   <td>
                                            <?php echo $row_daily_rest['account_name']."</br>";
                                            echo $row_daily_rest['reference_number']."</br>";
                                            echo $row_daily_rest['definition']."</br>";
                                            ?>
                                            </td>
											   <td><?php echo $row_daily_rest['maden']; ?></td>
                                            <td><?php echo $row_daily_rest['daen']; ?></td>
											<td><?php echo $row_daily_rest['company_name_' . $lang]; ?></td>
										   </tr>
										  
										   <?php } ?>
										   <tr>
										   <td></td>
												<td></td>
												<td>الاجمالي : </td>
												<td><?php echo $maden - $daen;?></td>
												<td></td>
												<td></td>
										   </tr>  
										   <?php }else{ ?>
											<tr>
												<td></td>
												<td></td>
												<td>لا يوجد</td>
												<td></td>
												<td></td>
												<td></td>
										   </tr>
										   <?php } ?>
								   
									   </tbody>
								   </table>
							   </div>
							   </br>
							<div class="table-responsive">
							    
							 <div class="card-header">
									<h4 class="card-title mb-0"><?php echo $Processes_Audits; ?></h4>
								</div>   
							    
								<table class="table table-striped custom-table mb-0 ">
									<thead>
										<tr>
											<th>#</th>
											<th><?php echo $Employee_data; ?></th>
											<th><?php echo $details; ?>/ <?php echo $t_request_date_time; ?></th>
											<th><?php echo $Audit_options; ?></th>
											<th><?php echo $Match_ratio; ?></th>
											<th><?php echo $Notes; ?></th>
										</tr>
									</thead>
									<tbody>
									    
									    <?php
									    $no=0;
                        $sql_pr="SELECT * FROM hr_audits_process_tbl where audits_process_type='auddit' AND proccess_id='$attach_id' and deleted='0'  ";
                          $result_pr = $conn->query($sql_pr);
                           if ($result_pr->num_rows > 0) {
                            while($row_pr = $result_pr->fetch_assoc()) { 
                              if($lang=='ar'){$proccess_details=$row_pr['proccess_details_ar'];}else{$proccess_details=$row_pr['proccess_details_en'];}
                             // $proccess_details=$row_pr['proccess_details']; 
                               $process_systems_id=$row_pr['process_systems_id'];
                               $employ_id_data=$row_pr['proccess_user_id'];
                               //echo $row_pr['proccess_user_id'];
                            //  echo $audit_det;
                            $no++;
                             ?>
										<tr>
											<td><?php echo $no; ?></td>
											<td><small>
											 <?php echo employ_date($employ_id_data,$lang); ?> 
											 </small></td>
											 
											<td><?php echo $proccess_details; ?>
											<br><small dir="ltr" style="font-size:12px;"><?php echo $row_pr['process_datetime']; ?></small>
											</td>
											<td><small dir="ltr"><?php 
                                           
                                             $values =   $row_pr['check_audits'];
                                             $array = explode(',', $values);
                                             //print_r($array);
                                             foreach($array as $key => $value){
                                                $sql_ha="SELECT * FROM hr_audit_options_tbl where audit_options_id='$value'";
                                                $result_ha = $conn->query($sql_ha);
                                                    if ($result_ha->num_rows > 0) {
                                                        while($row_ha = $result_ha->fetch_assoc()) { 
                                                            if($lang=="ar"){$auditname=$row_ha["audit_details_ar"];}else{$auditname=$row_ha["audit_details_en"];}
                                                           echo $auditname.'-'."</br>";
                                                        }}
                                             }
                                             ?></small></td>
											
											<td>
												<div class="dropdown action-label">
													<a href="#" class="btn btn-white btn-sm btn-rounded">%<?php echo $row_pr['check_nesba']?></a>
													
												</div>
											</td>
										
											<td>
								 <div style="width: 250px;overflow: scroll; font-size:12px;"><?php echo $row_pr['proccess_note']; ?></div>	
											<!--small dir="ltr"><?php echo $row_pr['proccess_note']; ?></small-->
											</td>
											
											
										</tr>
										<?php }} ?>
								
									</tbody>
								</table>
							</div>
						</div>
					</div>



				
                </div>
				<!-- /Page Content -->
	
			

		
				
				
				
				
            </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>

   <!-- Select2 JS -->
		<script src="../../assets/js/select2.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>
	    <script src="../../assets/js/greedynav.js"></script>
		
		  <!-- Datetimepicker JS -->
		<script src="../../assets/js/moment.min.js"></script>
		<script src="../../assets/js/bootstrap-datetimepicker.min.js"></script>
		
		<!-- Ck Editor JS -->
		<script src="../../assets/js/ckeditor.js"></script>
		<!-- Task JS -->
		<script src="../../assets/js/task.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>
// takeed al kashef
$("#confirm").click(function(){
    
      if(confirm("هل انت متاكد انك تريد التاكيد ؟")){
          var lang = '<?php echo $lang;?>';
        var id = [];
         var att_type_id = '<?php echo $_GET["att_type_id"];?>';
		 var attach_id = '<?php echo $_GET["attach_id"];?>';
        var add_user_id='<?php echo $urow["user_id"];?>';
        var check_note=$('#check_note').val();
        var s_n=$('#s_n').val();
        var att_name=$('#att_name').val();
        var add_user_id_emp=$('#add_user_id_emp').val();
		//alert(att_type_id);   
		//alert(attach_id);
		//alert(att_name);
		var uncheckedValues = [];

    $('input[type="checkbox"]:not(:checked)').each(function() {
       uncheckedValues.push($(this).val());
    });
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
             
               
          /*company_id1=$('#company_id'+id[i]).val();
          company_id.push(company_id1);*/
          
          

        });


      $.post('add_auddit_code.php', {'id':id,'lang':lang,'uncheckedValues':uncheckedValues,'att_type_id':att_type_id,'attach_id':attach_id,'add_user_id':add_user_id,'check_note':check_note,'s_n':s_n,'att_name':att_name,'add_user_id_emp':add_user_id_emp}, function(r) {
             
               if(r==1){
            alert("تمت عملية التاكيد بنجاح");
			window.location.reload();
               }
             
              }); 
       

      }else{
        return false;

      }

    });

     </script> 	
		

    
    <script>
  $(document).ready(function(e) {
   $(".att_typee").click(function(){
	var att_type = $(this).attr('id');
	var att_id = $(this).attr('data-id');
	var option_id = $(this).attr('option-id');
	alert(option_id);
	if(option_id=="../hr_files/"){

	}else{
$("#serviceFrameSend").attr('src', option_id);
	}
      });
      });
       </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>




