<?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");?>
	
		<!-- 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 -->
			
		
			
			<!-- 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 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"];  echo $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">
									<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_co="SELECT * FROM hr_audit_options_tbl where att_type_id='$att_type_id'  ";
                          $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'];}
                        
                             ?>
                             
							<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">
						 <?php 
						  $sqlcheck="SELECT * FROM check_confirmation_tb where audit_type='".$row_co["audit_options_id"]."' and att_type_id='$att_type_id' and attach_id='$attach_id'";
						  $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 } ?>
                            
                           
                            <b class="m-2" style="font-size:14px;" class="att_type" id="<?php echo $row_attype["att_type_id"];?>"><?php echo $audit_det; ?></b>  

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

							</ul>
							
											<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>
								
								<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' ";
                                             $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'];
                                            
                                               ?>
												<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; ?>
											</div>
											
											
										</div>
										
										<div class="file-content">
										
											<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">	
														   	  	<iframe id="serviceFrameSend" src="../hr_files/<?php echo $row_att2['attach_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>
				<!-- /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 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"];?>';
		alert(att_type_id);
		alert(attach_id);
		alert(add_user_id);
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
             
               
          /*company_id1=$('#company_id'+id[i]).val();
          company_id.push(company_id1);*/
          
          

        });
alert(id);
        if(id.length == 0){
          alert(" اختر على الاقل نوع واحد من الخيارات!");

        }else{

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

      }else{
        return false;

      }

    });

     </script> 	
    
    
    <script>
  $(document).ready(function(e) {
   $(".up_add").click(function(){
   alertify.error(message_per);
      });
      });
       </script>
       <script>
  $(document).ready(function(e) {
   $(".update_btn").click(function(){
  var id = $(this).attr("id");
  alert(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>




