<?php header("Cache-Control: no-cache, must-revalidate");
include "head_without_jquery.php";
include "dynamic_table.php";
?>

<?php

include "dbconfig.php";
$today= date('Y-m-d');
$sql="SELECT employees.*,employees.id as id,
vehicles.*, vehicle_make.make
FROM employees
JOIN vehicles on vehicles.driver_id=employees.id
JOIN vehicle_make on vehicles.make=vehicle_make.id
"; // this is main big SQL Query to fetch data

if(@$_REQUEST['id']!='')
{
$sql.=" WHERE employees.id=".@$_REQUEST['id'];
}

$res=mysqli_query($con,$sql);
$rowcount=mysqli_num_rows($res);
?>

<?php 
$count_sql="SELECT * from bookings";
$count_res=mysqli_query($con,$count_sql);
$total_jobs=mysqli_num_rows($count_res);
;?>
<!DOCTYPE html>

<html lang="en">
   <body>

      

      <div class="container-fluid">
<div class="col-md-12" style="text-align:center;color:#0000; padding:5px; font-size:18px;">
   <h2> List of All Drivers</h2>
     
</div>
      <div class="col-md-12" id="filter_results">
        
        <?php include "ajax/list_driver_data.php";?>
        
		    </div>
	    </div>
<!-- Delete Modal -->

   <script>
   
  $(document).ready(function() {
	 
    $('#drivers').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            'copyHtml5',
            'excelHtml5',
            'csvHtml5',
            'pdfHtml5',
			'print'
			        ]
    } );
} );
 </script>
   </body>
</html>
