<?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>Attendance and departure report - 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">
		
		 <!-- Select2 CSS -->
         <link rel="stylesheet" href="../../assets/css/select2.min.css">
         
         <!-- Datetimepicker CSS -->
         <link rel="stylesheet" href="../../assets/css/bootstrap-datetimepicker.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 $Discount_report_on_attendance_and_departure; ?> </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 $view.$space.$Attendance_and_departure_report; ?> </li>
								</ul>
							</div>
						
							
							<div class="col-auto float-end ms-auto">
							</div>	
							
							
						</div>
					</div>
					<!-- /Page Header -->
					
			
					
					
					
		<?php 
			if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($per_view_attendance_and_departure_report==1)){
		     echo'Yes Permation';
			}else{
          // echo 'No Permation'; 
             //header("Refresh:0; url=../main/error_permation.php?$link_lang&company_id=$company_id"); 
			}
			?>
			
			<?php
         //if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($per_view_attendance_and_departure_report==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 //} ?> 
			
			
			
					
					<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_waseet_employ_shift_tbl';
              
                $id_name='waseet_id';
                  $proccess_details_delete='حذف شفت الموظف رقم  '.$modal_id;
                   $proccess_details_en_delete='Delete Shift Employee Number'.$modal_id;
                  $proccess_details_delete_disable='الغاء تنشيط فت الموظف رقم '.$modal_id;
                $proccess_details_en_delete_disable='Disable Shift Employee Number'.$modal_id;
               
                $proccess_details_enable=' تنشيط شفت الموظف رقم '.$modal_id;
                 $proccess_details_en_enable='Enable Shift Employee Number'.$modal_id;        
			
			?>		    
			<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_delete" id="proccess_details_delete" readonly value="<?php echo $proccess_details_delete; ?>"> 
           <input type="hidden" name="proccess_details_en_delete" id="proccess_details_en_delete" readonly value="<?php echo $proccess_details_en_delete; ?>">
           
           
              <input type="hidden" name="$proccess_details_delete_disable" id="proccess_details_delete_disable" readonly value="<?php echo $proccess_details_delete_disable; ?>"> 
           <input type="hidden" name="proccess_details_en_delete_disable" id="proccess_details_en_delete_disable" readonly value="<?php echo $proccess_details_en_delete_disable; ?>">
           
           
           <input type="hidden" name="proccess_details_enable" id="proccess_details_enable" readonly value="<?php echo $proccess_details_enable; ?>"> 
           <input type="hidden" name="proccess_details_en_enable" id="proccess_details_en_enable" readonly value="<?php echo $proccess_details_en_enable; ?>">
           

           
            <?php  $info_type=$_GET['info_type'];  
                //echo $info_type;
                if($info_type=='takeed' or($info_type=='')){$classb='nav-link b active';}else{$classb='nav-link b ';}
                if($info_type=='pr'){$classc='nav-link b active';}else{$classc='nav-link b ';}
                if($info_type=='gh'){$classd='nav-link b active';}else{$classd='nav-link b ';}
                
                ?>
           		
				<div class="card">
				<div class="card-body">
				<ul class="nav nav-tabs nav-tabs-solid nav-justified">
		    	<li class="nav-item" style="border: 1px solid gray;"><a class="nav-link a<?php //echo $classc; ?>"href="hr_attendance_and_departure_reporttt.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>&info_type=<?php echo 'gh'; ?>" id="inactive_employ">  <?php echo $Attendance_and_departure_report; ?></a></li>
				    
				<li class="nav-item"style="border: 1px solid gray;"><a class="nav-link b<?php //echo $classc; ?>"href="hr_attendance_and_departure_report4.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>&info_type=<?php echo 'pr'; ?>" id="inactive_employ"><?php echo $Attendance_and_departure_report; ?> / <?php echo $Detailed; ?> </a></li>
				<li class="nav-item"style="border: 1px solid gray;"><a class="nav-link b active<?php //echo $classd; ?>"href="hr_attendance_and_departure_report4_summary2.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id; ?>&info_type=<?php echo 'gh'; ?>" id="inactive_employ">  <?php echo $Attendance_and_departure_report; ?> / <?php echo $Summary; ?> </a></li>

				</ul> 
						</div>
					</div> 
           	</div>
           
           
           		 <form  action="" method="post" >
           		     
           		   <?php 
           		   if(ISSET($_POST['sav_btn'])){
           		    $date_from=$_POST['date_from']; // echo $date_from; 
	                $date_to=$_POST['date_to'];     //echo $date_to;
           		   }else{
           		    $date_from=0; 
           		    $date_to=0;
           		   }
           		   ?>  
           		     
				<!--div class="row filter-row" -->
				    
				    <div class="row">
						<div class="col-lg-4 col-sm-6 col-12" clas="col-sm-6 col-md-3"> 
					<div class="form-group form-focus select-focus focused">
						<input type="date" value="<?php echo $date_from; ?>" name="date_from" id="date_from" required="" class="form-control" style="font-size:14px; font-weight:bold;">
					<label class="focus-label"><?php echo $select.$space.$the_date; ?></label>
				   	</div>
				</div>
						
						<div class="col-lg-4 col-sm-6 col-12" clas="col-sm-6 col-md-3"> 
						<div class="form-group form-focus select-focus focused">
						<label class="focus-label"><?php echo $date_too; ?></label>
							<input type="date" value="<?php echo $date_to; ?>" name="date_to" id="date_to" required="" class="form-control" style="font-size:14px; font-weight:bold;" >
							</div>
						</div>
						
						
						
						
						
						
	<?php 
	$ar = array();
    $add = array();
     $holiday_dates = array();
	
	 
	 function getBetweenDates($startDate, $endDate) {
    $rangArray = [];
 
    $startDate = strtotime($startDate);
    $endDate = strtotime($endDate);
 
    for ($currentDate = $startDate; $currentDate <= $endDate; $currentDate += (86400)) {
        $date = date('Y-m-d', $currentDate);
        $rangArray[] = $date;
    }
 
    return $rangArray;
 } 
 
  
 $dates = getBetweenDates($date_from, $date_to);

//print_r($dates);
	 
	if(ISSET($_POST['sav_btn'])){
	    
     date_default_timezone_set("Asia/Riyadh");
     $dd1=strtotime($date_from);
     $dd2=strtotime($date_to);
   $datediff = $dd2 - $dd1;
   $add_ayam=round($datediff / (60 * 60 * 24)+1);
   //echo $add_ayam ;
   


$from_date = new DateTime($date_from);
$to_date = new DateTime($date_to);
$i = 0;
for ($date = $from_date; $date <= $to_date; $date->modify('+1 day')) {
    $d = $date->format('l');
  if($d=="Friday"){
      $i++;
  }
}

 
 // صافي عدد الأيام
 
   $safy_ayam=$add_ayam-$i; 
     
	}     
     
	?>					
						
					<div class="col-lg-4 col-sm-6 col-12"> 
					<div class="form-group form-focus select-focus focused">
													
	  <!-- customer_id ================================================================================ -->
   
	 <label class="focus-label" class="col-form-label"><?php echo $the_employee; ?></label>
      <link href="search_select/fSelect3.css" rel="stylesheet">
   
    <script src="search_select/jquery.minn.js"></script>
    
      <script src="search_select/fSelect.js"></script>
      <script>
       (function($) {
      $(function() {
        window.fs_test = $('.test').fSelect();
      });
     })(jQuery);
     </script>

				<select style="font-size:18px;" name="employ_id_select" id="test" required="" clas="form-select test" class="test"  aria-label="Default select example">
				<option value=""><?php echo $select.$space.$the_employee; ?></option>
				
				<option value="all_employ"><?php echo $all_employees; ?></option>
				
				<?php
				if(($urow['user_type']=='Top_Manager' or $urow['user_type']=='System_Manager')or($per_view_attendance_and_departure_report==1)){
				 if($company_id=='all_company'){
                     $sql_wemp="SELECT * FROM hr_employ_tbl  where  (employ_stat='active_employ' or employ_stat='employ_action') AND company_id IN ('$ids')  AND deleted='0' ";
                      }else{
                    $sql_wemp="SELECT * FROM hr_employ_tbl  where  (employ_stat='active_employ' or employ_stat='employ_action') AND company_id='$company_id'  AND deleted='0' ";
                      }
				    }else{
				 $sql_wemp="SELECT * FROM hr_employ_tbl  where  (employ_stat='active_employ' or employ_stat='employ_action') AND employ_id='". $_SESSION['user_id']."'  AND deleted='0' ";
				    }
                        $result_wemp = $conn->query($sql_wemp);
                        if ($result_wemp->num_rows > 0) {
                          while($row_wemp = $result_wemp->fetch_assoc()) {
                              
                      
                             if($lang=='ar'){$employ_name=$row_wemp['employ_name_ar'];}else{$employ_name=$row_wemp['employ_name_en'];}     
                              
                              ?>
                            <option  value="<?php echo $row_wemp['employ_id']; ?>"><?php echo $employ_name; ?>/ <?php echo $row_wemp['id_num']; ?> </option>
												<?php }}  ?>	
											</select>

	  <!-- ============ /customer_id ================================================================================ -->
				   	</div>
				</div>


                    </div><br>
                    

      		 
      		 <br>
      		 <div class="row">
					
						
      		 	<div class="col-lg-4 col-sm-6 col-12">  
							<div class="d-grid">
								<input type="submit" name="sav_btn" id="sav_btn" class="btn btn-success" value="<?php echo $search; ?>"> 
							</div></form>
						</div>     
                  
                    </div>
      		 
      		 	<hr>
      		           <!-- =============================rrrr4=========================================== -->          

      		 
					<!-- =====================$requests_permission_s=====$issues========================================================================= -->
		
       
       
          <!-- ==============================/r========================================== -->                        
                    

						<div class="col-md-12">
							<div>
							    <div class="table-responsive">
												<div class="row">
						<div class="col-md-12 d-flex">
							<div class="card card-table flex-fill">
								<div class="card-header">
								<!--table  class="table table-nowrap custom-table mb-0">
											<thead>
												<tr class="card-header">
													<th><h6 style="font-size:16px; font-weight:bold;" class="card-title mb-0"><?php echo $The_Remaining_Employees; ?></h6></th>
													<th>
									      	<select style="font-size:14px; font-weight:bold;width:90%;" name="aded_days" id="aded_days" class="form-select form-select-lg mb-3" aria-label=".form-select-lg example">
                                               <option value="10">10 <?php echo $day; ?></option>
                                               <option value="20">20 <?php echo $day; ?></option>
                                                <option value="30">30 <?php echo $day; ?></option>
                                                 <option value="40">40 <?php echo $day; ?></option>
                                                  <option value="50">50 <?php echo $day; ?></option>
                                                   <option value="60">60 <?php echo $day; ?></option>
                                            </select>   
													 </th>

													<th><h6 style="font-size:16px; font-weight:bold;" class="card-title mb-0"><?php echo $Iqama_Expire; ?></h6></th>
												</tr>
											</thead>
												</table-->

								</div>
								<div class="card-body">
									<div class="table-responsive">
										<!--table class="datatable table table-stripped mb-0 dataTable no-footer" clas="table table-nowrap custom-table mb-0"-->
										    
										    <table class="table  datanew table-stripped mb-0 dataTable no-footer">
											<thead>
												<tr class="table-danger" style="font-size:12px; font-weight:bold;">
												<th>NO</th>
													<th><?php echo $Employee_data; ?></th>
													<th><?php echo $Shift_Details; ?></th>
													<th><?php echo $Total_discount_hours; ?> / الحضور   </th>
													<th><?php echo $Total_discount_hours; ?>  / الإنصراف  </th>
											
											   	<th><?php //echo $Total_discount_hours; ?> إجمالي ساعات الغياب</th>

											
													<th><?php echo $Total_discount_hours; ?></th>
													
													<th><?php //echo $Total_discount_hours; ?> إجمالي مبلغ الخصم</th>
										         	<th><?php echo $details; ?>  </th>	
												</tr>
											</thead>
											<tbody>
				    <?php 
				      $nommm=0;
				    date_default_timezone_set("Asia/Riyadh");
				    $days=+10;
				    $takherr = 0;
				   $inseraf_beforr=0;
                 
                         if(isset($_POST['sav_btn'])){
                            $sql_c4_hd="SELECT employ_name_ar,employ_name_en,employ_id,dept_id,job_id,employee_number_fingerprint,basic_salary,housing_allowance,transportation_allowance,other_allowances,other_allowances_tow FROM hr_employ_tbl where (employ_stat='active_employ' or employ_stat='employ_action') ";
                          }
                            $result_c4_hd = $conn->query($sql_c4_hd);
                           if ($result_c4_hd->num_rows > 0) {
                           while($row_c4_hd = $result_c4_hd->fetch_assoc()) {
                                $takherr = 0;
                                 $inseraf_beforr=0;
                                 $takheer_h=0;
                                 $inseraf_beforr_h=0;
                                 
                            if($lang=='ar'){$employ_name_hd=$row_c4_hd['employ_name_ar'];}else{$employ_name_hd=$row_c4_hd['employ_name_en'];} 	
                            
                            $employ_id_hd=$row_c4_hd['employ_id'];
                            $employee_number_fingerprint=$row_c4_hd['employee_number_fingerprint'];
                            
                            $sum_salary_employ=$row_c4_hd['basic_salary']+$row_c4_hd['housing_allowance']+$row_c4_hd['transportation_allowance']+$row_c4_hd['other_allowances']+$row_c4_hd['other_allowances_tow'];
                           
                           
                           	   $sql_ws="SELECT * FROM hr_waseet_employ_shift_tbl where employ_id='$employ_id_hd' AND deleted='0' and waseet_stat='0'  ";
                          $result_ws = $conn->query($sql_ws);
                           if ($result_ws->num_rows > 0) {
                            while($row_ws = $result_ws->fetch_assoc()) { 
                             $modal_id=$row_ws['waseet_id'];
                             
                              $sql_sh="SELECT * FROM hr_shift_tbl where shift_id='".$row_ws['shift_id']."' AND hodoor_ghyab='0'  AND stop='0' AND deleted='0'   ";
                                 $result_sh = $conn->query($sql_sh);
                                 if ($result_sh->num_rows > 0) {
                                while($row_sh = $result_sh->fetch_assoc()) {
                               
                          $nommm++;

						   ?>  
						   

						<tr>

						    <td><b><?php echo $nommm; ?></b></td>
						
							<td>
							<h2 class="table-avatar">
							
							<a class="avatar" clas="avatar avatar-xs" href="profile.html">
							<?php
							
						
                           
							$attach_link_hd=0;
                          $sql_ico_hd="SELECT * FROM hr_employ_attachments_tbl where employ_id='$employ_id_hd' AND att_name='employ_photo' AND  stop='0' AND deleted='0' ";
                          $result_icohd = $conn->query($sql_ico_hd);
                           if ($result_icohd->num_rows > 0) {
                            while($row_icohd = $result_icohd->fetch_assoc()) {
                              $attach_link_hd=$row_icohd['attach_link'];
                            }}
                            
                          
                             ?>  
                               <?php if($attach_link_hd==''){ ?>  
								<img alt="" src="../../assets/img/profiles/avatar-09.jpg">
								<?php }elseif($attach_link_hd!=''){ ?>
								<img alt="" src="../../../Shipping_Clearance_System/jquery/pages/system_maintenance/user_img/<?php echo $attach_link_hd; ?>">
							<?php }else{ ?>
							<img alt="" src="../../assets/img/profiles/avatar-09.jpg">
							<?php } ?>
								
								</a>
							
						  <?php echo $employ_name_hd; ?>
							  </h2>
							</td>
							
							
							 <td>
							 <?php 
						

                              if($lang=='ar'){$shift_name=$row_sh['shift_name_ar'];}else{$shift_name=$row_sh['shift_name_en'];}
                              $min_start_time=$row_sh['min_start_time'];
                               $min_end_time=$row_sh['min_end_time'];
                                $end_time=$row_sh['end_time'];
                                  
                                  
                                  $max_start_time1=$row_sh['max_start_time'];
                                 $allowed_minutes=$row_sh['allowed_minutes'];
                                $ddate = strtotime("+$allowed_minutes minutes", strtotime($max_start_time1));
                                  $max_start_time = date('h:i', $ddate);
                                  $number_hours = $row_sh['number_hours_calculated'];
                                 //echo $max_start_time;
                                 //$num_hour_init = ($number_hours * 60);
                                 
                             
							 
							 ?>
							 <small style="font-size:12px;">اقصى وقت للحضور / <?php echo $max_start_time;  ?></small><br>
							 
						 <small style="font-size:12px;"><?php echo $shift_name;  ?></small><br>
						<small style="font-size:12px;"><?php echo $min_start_time; ?>-<?php echo $start_time; ?>-<?php echo $max_start_time; ?></small><br>
						<small style="font-size:12px;"><?php echo $min_end_time; ?>-<?php echo $end_time; ?>-<?php echo $max_end_time; ?></small>

							 </td>  
							 

							 	<td>
							 	    
						 <?php 
                          //-------------------------------------------------------------------------------
            
            // تعريف المصفوفة لتخزين التواريخ
$request_dates = [];

// استعلام لجلب التواريخ من جدول hr_request_permission_tbl
$sql_cu = "SELECT * FROM hr_request_permission_tbl 
           WHERE (request_per_stat='approval_req_per') 
           AND request_per_date BETWEEN '$date_from' AND '$date_to' 
           AND employ_id='". $row_c4_hd['employ_id']."' 
           AND company_id!='' 
           AND deleted='0' 
           ORDER BY `hr_request_permission_tbl`.`createdDate_Timee` DESC";

$result_cu = $conn->query($sql_cu);
if ($result_cu->num_rows > 0) {
    while($row_cu = $result_cu->fetch_assoc()) {
        $request_per_date = $row_cu['request_per_date'];
        
        // إضافة التاريخ إلى المصفوفة
        $request_dates[] = $request_per_date;
    }
}

// الآن المصفوفة $request_dates تحتوي على جميع التواريخ

foreach ($request_dates as $date_per) {
  //  echo $date_per . '<hr>';
}

            
    //---------------------------------------------------------------------------
                          
                            
                            
							  $sql_hd="SELECT * FROM hr_add_hodor_ensraf_tbl where hodor_ensraf_date!='$date_per' AND hodor_ensraf_stat!='approval_req_per' AND hodor_ensraf_stat!='Absence_was_approved' AND hodor_time!=ensraf_time AND exception_egaza='0' AND employee_number_fingerprint='".$row_c4_hd['employee_number_fingerprint']."' AND hodor_ensraf_date BETWEEN '$date_from' AND'$date_to' AND user_id_top_manager='$user_id_top_manager' ";
                               $result_hd = $conn->query($sql_hd);
                               if ($result_hd->num_rows > 0) {
                               while($row_hd = $result_hd->fetch_assoc()) {  
						 

							 ?>  



				         <?php 
                        // echo $row_hd['employee_number_fingerprint'];
                                                    
                                                     $add_hours_dowam = (strtotime($row_hd["ensraf_time"]) - strtotime($row_hd["hodor_time"])) / 60/60;
                                                      $add_hours_dowam_m = (strtotime($row_hd["ensraf_time"]) - strtotime($row_hd["hodor_time"])) / 60 ;
                                                    
                                                      ?>  
                                                      
                                                      <b style="color:red;"><?php //echo $add_hours_dowam; ?></b>
                                                      
                                          
                                          <?php 
                                          
                                          $check_date =$row_hd["hodor_ensraf_date"]; // على سبيل المثال

                                           // التحقق من وجود التاريخ داخل المصفوفة
                                      if (in_array($check_date, $request_dates)) {
                                          
                                      }else{
                              
                                          ?>            
                                                      

                                   <?php if($row_hd["hodor_time"]>$max_start_time){  ?>

                                <?php //if($date_per!=$row_hd["hodor_ensraf_date"]){  ?>
                                       <?php
                                              // حساب التأخير بالدقائق
                                             $takher = (strtotime($row_hd["hodor_time"]) - strtotime($max_start_time)) / 60;

                                               // إضافة التأخير إلى المتغير التراكمي
                                                $takherr += $takher;
                                                
                                                $takheer_h=$takherr/60;

												          ?>
												          
												 	<!--small style="color:darkblue;"><?php if($takher>0){ echo $row_hd["hodor_ensraf_date"].'/'.$takher.'<hr>';  }   ?> </small-->
     
												          
												          <?php } ?> 
												          
												          
                                                  <?php  //if($row_hd["ensraf_time"]<$min_end_time && $row_hd["hodor_time"]<=$max_start_time){
                                                  
                                                  if($row_hd["ensraf_time"]<$min_end_time){
                                                  ?>
												         <?php  
                                                         //----------------------------------------------------------
                                                         
                                                         $inseraf_befor = (strtotime($min_end_time) - strtotime($row_hd["ensraf_time"])) / 60;
                                                      
                                                       // echo $row_hd["hodor_ensraf_date"].'/'.$inseraf_befor.'<br>';  
                                                        
                                                        $inseraf_befor_details=$row_hd["hodor_ensraf_date"].'/'.$inseraf_befor;  

                                                         // مجموع الدقائق
                                                         $inseraf_beforr += $inseraf_befor;
                                                         
                                                         $inseraf_beforr_h=$inseraf_beforr/60;

                                                         //---------------------------------------------------------------
                                                           
												          ?>
												          <?php } ?> 
												          
												          
										
												          
												          
												          
												           <?php } ?> 
												          
												          
                                                    <?php }} ?>
													 
										        
										        	
												    <small class="badge bg-inverse-danger" dir="ltr" style="color:white;font-size:16px;">
												        <?php echo round($takheer_h,2)."</br>"; ?>
												          </small>
												          
											 <br>	
											<b styl="color:red;">
											 <?php 
											 
											 $hours = floor($takherr / 60);
                                             $minutes = $takherr % 60;

											 echo ": $hours ساعات و $minutes دقائق"; ?> 
											</b>
												          
													</td>

										<td>
										    
										<small class="badge bg-inverse-danger" dir="ltr" style="color:white;font-size:16px;">
									 <?php  echo round($inseraf_beforr_h,2); ?>
										</small>

                                        <br>
                                        
                                       <b styl="color:red;">
                                       <?php 
                                            $total_minutes = $inseraf_beforr;
                                            $hours2 = floor($total_minutes / 60);
                                             $minutes2 = $total_minutes % 60;
                                             echo ": $hours2 ساعات و $minutes2 دقائق";
                                        ?>	</b>
                                        
                                        <br>
                                        
                                        <?php //echo $inseraf_befor_details; ?>
										
								    	</td>				
								
								
								
								  <td>
						        
						        <?php 
							 $count_ghyab=0;
                              $sql_gh = "SELECT * FROM hr_add_hodor_ensraf_tbl WHERE (hodor_ensraf_stat='waiting_employee_response' or hodor_ensraf_stat='Absence_was_rejected') AND employee_number_fingerprint='".$row_c4_hd['employee_number_fingerprint']."' AND hodor_ensraf_date BETWEEN '$date_from' AND '$date_to'   ";
                              $result_gh = $conn->query($sql_gh);
                              if ($result_gh->num_rows > 0) {
                              while($row_hd = $result_gh->fetch_assoc()) {  
								$count_ghyab++;  
								
							//	echo $row_hd['hodor_ensraf_date'];
								//echo $sql_gh;
								
								}}
								 ?>

						     <b styl="color:red;"> عدد أيام الغياب <?php echo $count_ghyab; ?> <b>
						         
						    <?php 
						    $hours_hesab_ghyab=7.45;
						     $count_hours_ghyab=$count_ghyab*$hours_hesab_ghyab;
						    ?>    
						    
						    <br> <b styl="color:red;"> عدد ساعات الغياب <?php echo $count_hours_ghyab; ?> <b>
						         
						     </td>					
													
													
							   <td>
							  <?php 
							  $sum_all_khasm_h=$takheer_h+$inseraf_beforr_h+$count_hours_ghyab;
							  
							  $sum_all_khasm=$takherr+$inseraf_beforr; ?>
						
						 <span style="font-size:16px;" class="badge bg-inverse-danger"><?php echo round($sum_all_khasm_h,2); ?></span>
						 
						  <br><b style="color:darkred;">
						 	    <?php 
							 //   $sum_h=$hours+$hours2;
							 //   $sum_m=$minutes+$minutes2;
							 //   echo ": $sum_h ساعات و $sum_m دقائق";
							    ?> 
							   
							    
							  <?php
// عدد الساعات والدقائق للتأخير
// $takherr = 130; // على سبيل المثال
// $hours = floor($takherr / 60);
// $minutes = $takherr % 60;

//echo "$hours ساعات و $minutes دقائق<br>";

// إجمالي عدد الدقائق قبل الانصراف
// $inseraf_beforr = 240; // على سبيل المثال
// $total_minutes = $inseraf_beforr;
// $hours2 = floor($total_minutes / 60);
// $minutes2 = $total_minutes % 60;

//echo "$hours2 ساعات و $minutes2 دقائق<br>";

// حساب إجمالي عدد الساعات للتأخير بناءً على عدد الأيام
$hours_hesab_ghyab = 7.45; // متوسط عدد الساعات لكل يوم
//$count_ghyab = 3; // عدد الأيام، على سبيل المثال

// تحويل الساعات العشرية إلى دقائق
$total_hours_ghyab_in_minutes = $hours_hesab_ghyab * 60 * $count_ghyab;

// تحويل الدقائق إلى ساعات ودقائق
$total_hours_ghyab = floor($total_hours_ghyab_in_minutes / 60);


$total_hours_ghyab2=$total_hours_ghyab+$hours+$hours2;

$total_minutes_ghyab = $total_hours_ghyab_in_minutes % 60;


$total_minutes_ghyab2=$total_minutes_ghyab+$minutes+$minutes2;

//echo "$total_hours_ghyab2 ساعات و $total_minutes_ghyab2 دقائق";
 
 
 
 if ($total_minutes_ghyab2 >= 60) {
    $additional_hours = floor($total_minutes_ghyab2 / 60);
    $total_minutes_ghyab2 = $total_minutes_ghyab2 % 60;
    $total_hours_ghyab2 += $additional_hours;
}

echo "$total_hours_ghyab2 ساعات و $total_minutes_ghyab2 دقائق";
 
 ?>
  
							    
		 </b>					    
						   </td>
						   
						   
						  
						   
					 	   
						    
						   
						    <td>
						   <?php 
						  $sum_sal_kh=$sum_salary_employ/30/7.45;  
						   $sum_all_khasm_sal=($sum_all_khasm/60)+$count_hours_ghyab;
						   
						   $end_kh=$sum_sal_kh*$sum_all_khasm_sal;
						   
						  // echo $end_kh;
						   
						   ?>
						   
		  <span style="font-size:16px;" class="badge bg-inverse-danger"><?php echo round($end_kh,2); ?></span>
						   
						     </td>
						     
						  <td>
						 <a href="hr_att_report_employ_details.php?<?php echo $link_lang; ?>&company_id=<?php echo $company_id;  ?>&employ_id=<?php echo $employ_id_hd; ?>&employee_number_fingerprint=<?php echo $employee_number_fingerprint; ?>&date_from=<?php echo $date_from; ?>&date_to=<?php echo $date_to; ?>" target="_new" class="btn btn-warning btn-sm" id="btn_takeed">  <?php echo $details; ?>
		  	             <i class="fa fa-external-link-square" aria-hidden="true"></i>
		  	            </a>     
		  	            
						  </td>
						   
						   
												</tr>
												<?php }}  }} }}  ?>
											
											</tbody>
										</table>
									</div>
								</div>
								<div class="card-footer">
									<a href="javascript:void(0);"><?php echo $Number_of_Employees; ?> / <?php echo $aded_emp; ?></a>
								</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>
    
    <!-- Datetimepicker JS -->
    <script src="../../assets/js/moment.min.js"></script>
    <script src="../../assets/js/bootstrap-datetimepicker.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>
      
<!-- Multiselect JS -->
		<script src="../../assets/js/multiselect.min.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>
		
	 <script src="../../assets/js/app_tow.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>
$('.all_ch_att').click(function(event) { 
   var id = [];
            if(this.checked) { 
                $('.ch_att').each(function(i) { 
                  if(i<30){
                    this.checked = true;
                    id[i] = $(this).val(); 
                  }    
                });
            }else{
                $('.ch_att').each(function() {
                    this.checked = false; 
                });        
            }
        });
        </script>
        
        
        
         <script>
//تسجيل غياب
$("#absence").click(function(){
      if(confirm("هل انت متاكد انك تريد تسجيل غياب ؟")){
        var id = [];
         var employ_id = [];
          var hodor_ensraf_date = [];
          var mosala_type = [];
            var add_user_id=$('#add_user_id').val();
            var employee_number_fingerprint = [];
             var company_id_sel = [];
             
             
       //alert(add_user_id);
          //var att_abs_date = $("#att_abs_date").val();

         // var att_or_abs_or_late = $('#att_or_abs_or_late').find(":selected").val();
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
             
               
          employ_id1=$('#employ_id'+id[i]).val();
          employ_id.push(employ_id1);
         
          hodor_ensraf_date1=$('#hodor_ensraf_date'+id[i]).val();
          hodor_ensraf_date.push(hodor_ensraf_date1);
          
          mosala_type1=$('#mosala_type'+id[i]).val();
          mosala_type.push(mosala_type1);

          company_id_sel1=$('#company_id_sel'+id[i]).val();
          company_id_sel.push(company_id_sel1);
          
          
          employee_number_fingerprint1=$('#employee_number_fingerprint'+id[i]).val();
          employee_number_fingerprint.push(employee_number_fingerprint1);

        });
//alert(employ_id);
//alert(hodor_ensraf_date);
//alert(mosala_type);
        if(id.length == 0){
          alert("اختر على الاقل احد الموظفين لإرسال المسائله !");

        }else{

      $.post('hr_ghyab_Codeee.php', {'id':id,'employ_id':employ_id,'hodor_ensraf_date':hodor_ensraf_date,'mosala_type':mosala_type,'employee_number_fingerprint':employee_number_fingerprint,'add_user_id':add_user_id,'company_id_sel':company_id_sel}, function(r) {
              // alert("تمت عملية التسجيل بنجاح");
              alertify.success(message_success);
               if(r==1){
                for( var i=0; i<id.length; i++){
         $(".D"+id[i]+'').css("background-color", "#ccc");
         $(".D"+id[i]+'').fadeOut("slow");

         }
               }
               window.location.reload();
              }); 
              
        }

      }else{
        return false;

      }

    });

     </script>
     
     
     
             
         <script>
//تسجيل إستثناء
$("#btn_exception").click(function(){
      if(confirm("هل انت متاكد انك تريد إستثناء الموظف من الغياب ؟")){
        var id = [];
         var employ_id = [];
          var hodor_ensraf_date = [];
          var mosala_type = [];
            var add_user_id=$('#add_user_id').val();
            var employee_number_fingerprint = [];
       //alert(add_user_id);
          //var att_abs_date = $("#att_abs_date").val();

         // var att_or_abs_or_late = $('#att_or_abs_or_late').find(":selected").val();
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
             
               
          employ_id1=$('#employ_id'+id[i]).val();
          employ_id.push(employ_id1);
         
          hodor_ensraf_date1=$('#hodor_ensraf_date'+id[i]).val();
          hodor_ensraf_date.push(hodor_ensraf_date1);
          
          mosala_type1=$('#mosala_type'+id[i]).val();
          mosala_type.push(mosala_type1);

          employee_number_fingerprint1=$('#employee_number_fingerprint'+id[i]).val();
          employee_number_fingerprint.push(employee_number_fingerprint1);

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

        }else{

      $.post('hr_exception_ghyab_Codeee.php', {'id':id,'employ_id':employ_id,'hodor_ensraf_date':hodor_ensraf_date,'mosala_type':mosala_type,'employee_number_fingerprint':employee_number_fingerprint,'add_user_id':add_user_id}, function(r) {
              // alert("تمت عملية التسجيل بنجاح");
              alertify.success(message_success);
               if(r==1){
                for( var i=0; i<id.length; i++){
         $(".D"+id[i]+'').css("background-color", "#ccc");
         $(".D"+id[i]+'').fadeOut("slow");

         }
               }
               window.location.reload();
              }); 
              
        }

      }else{
        return false;

      }

    });

     </script>
     
     
     
                  
         <script>
//تسجيل المسائله
$("#btn_mosala").click(function(){
      if(confirm("هل انت متاكد انك تريد إرسال المسائله ؟")){
        var id = [];
         var employ_id = [];
          var hodor_ensraf_date = [];
          var mosala_type = [];
            var add_user_id=$('#add_user_id').val();
            var employee_number_fingerprint = [];
       //alert(add_user_id);
          //var att_abs_date = $("#att_abs_date").val();

         // var att_or_abs_or_late = $('#att_or_abs_or_late').find(":selected").val();
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
             
               
          employ_id1=$('#employ_id'+id[i]).val();
          employ_id.push(employ_id1);
         
          hodor_ensraf_date1=$('#hodor_ensraf_date'+id[i]).val();
          hodor_ensraf_date.push(hodor_ensraf_date1);
          
          mosala_type1=$('#mosala_type'+id[i]).val();
          mosala_type.push(mosala_type1);

          employee_number_fingerprint1=$('#employee_number_fingerprint'+id[i]).val();
          employee_number_fingerprint.push(employee_number_fingerprint1);

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

        }else{

    $.post('hr_mosala_ghyab_Codeee.php', {'id':id,'employ_id':employ_id,'hodor_ensraf_date':hodor_ensraf_date,'mosala_type':mosala_type,'employee_number_fingerprint':employee_number_fingerprint,'add_user_id':add_user_id}, function(r) {
              // alert("تمت عملية التسجيل بنجاح");
              alertify.success(message_success);
              //alert(r);
               if(r==1){
                for( var i=0; i<id.length; i++){
         $(".D"+id[i]+'').css("background-color", "#ccc");
         $(".D"+id[i]+'').fadeOut("slow");

         }
               }
               window.location.reload();
              }); 
              
        }

      }else{
        return false;

      }

    });

     </script>
     
     
        
        
 <!--script>
//إرسال مسائله لعدد من الموظفين
$("#btn_mosala").click(function(){
      if(confirm("هل انت متاكد انك تريد إرسال المسائله ؟")){
        var id = [];
         var employ_id = [];
          var hodor_ensraf_date = [];
          var mosala_type = [];
            var add_user_id=$('#add_user_id').val();
      // alert(add_user_id);
          //var att_abs_date = $("#att_abs_date").val();

         // var att_or_abs_or_late = $('#att_or_abs_or_late').find(":selected").val();
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
             
               
          employ_id1=$('#employ_id'+id[i]).val();
          employ_id.push(employ_id1);
         
          hodor_ensraf_date1=$('#hodor_ensraf_date'+id[i]).val();
          hodor_ensraf_date.push(hodor_ensraf_date1);
          
          mosala_type1=$('#mosala_type'+id[i]).val();
          mosala_type.push(mosala_type1);

        });

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

        }else{

      $.post('hr_mosala_ghyab_Codeee.php', {'id':id,'employ_id':employ_id,'hodor_ensraf_date':hodor_ensraf_date,'mosala_type':mosala_type,'add_user_id':add_user_id}, function(r) {
              // alert("تمت عملية التسجيل بنجاح");
              alertify.error(message_success);
               if(r==1){
                for( var i=0; i<id.length; i++){
         $(".D"+id[i]+'').css("background-color", "#ccc");
         $(".D"+id[i]+'').fadeOut("slow");

         }
               }
               window.location.reload();
              }); 
              
        }

      }else{
        return false;

      }

    });

     </script-->
     
     
     
     
     
     <!--script>
//تعديل الحضور والإنصراف

$("#btn_takeed").click(function(){
      if(confirm("هل انت متاكد انك تريد إرسال التعديل ؟")){
        var id = [];
         var employ_id = [];
          var hodor_ensraf_date = [];
          var mosala_type = [];
             var hodor_time = [];
              var ensraf_time = [];
      var j = 0;
      
          //var att_abs_date = $("#att_abs_date").val();

         // var att_or_abs_or_late = $('#att_or_abs_or_late').find(":selected").val();
        $(":checkbox:checked").each(function(i){
          id[i] = $(this).val();
            // alert(id);
              
          employ_id1=$('#employ_id'+id[i]).val();
          employ_id.push(employ_id1);
         
          hodor_ensraf_date1=$('#hodor_ensraf_date'+id[i]).val();
          hodor_ensraf_date.push(hodor_ensraf_date1);
          
          mosala_type1=$('#mosala_type'+id[i]).val();
          mosala_type.push(mosala_type1);
         
           
          hodor_time1=$('#hodor_time'+id[i]).val();
          hodor_time.push(hodor_time1);
          
           
            ensraf_time1=$('#ensraf_time'+id[i]).val();
          ensraf_time.push(ensraf_time1);
          
           //alert(hodor_time1);
           //alert(ensraf_time1);
           if((hodor_time1==ensraf_time1) || (hodor_time1>ensraf_time1)){
               j++;
           }else{}

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

        }else{
if(j>0){
   alert("لا يمكن ان يكون وقت الحضور اكبر او يساوي وقت الانصراف"); 
}else{
    
      $.post('hr_takeed_edit_att_Code.php', {'id':id,'employ_id':employ_id,'hodor_ensraf_date':hodor_ensraf_date,'mosala_type':mosala_type,'hodor_time':hodor_time,'ensraf_time':ensraf_time}, function(r) {
          //     alert("تمت عملية التسجيل بنجاح");
              alertify.success(message_success);
               if(r==1){
                for( var i=0; i<id.length; i++){
         $(".D"+id[i]+'').css("background-color", "#ccc");
         $(".D"+id[i]+'').fadeOut("slow");

         }
               }
               window.location.reload();
              }); 
              
        }}

      }else{
        return false;

      }

    });

     </script-->
        
        
        
        
      
       
       	<!--script>
        $('.b').click(function() {
		   $('.nav-link').removeClass('active');
		   $(this).addClass('active');
		});
      </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>




