<?php 
include("include/connection.php"); 

session_start();
$uID=$_SESSION['uID'];
if(empty($uID))
	{
		header("location: index.php");
	}
?>

<html>
    <head>
        <title>Fleet record</title>
			<meta charset="utf-8">
   			<meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap.min.css">
        <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.6.2/css/buttons.bootstrap.min.css">

    </head>


<div class="container-fluID"> 
    <div class="row">
        <div class="col-sm-12">	
		
                <center>
					<div class="alert alert-success" role="alert">
					<h2><span class="badge badge-secondary">INTERNAL DATA | FLEET VIEW</span></h2>
					DASHBOARD
					</div>
					
				</center>

                <a href="accountantDashboard.php"> <button class="btn btn-info approve" type="button">Home</button></a>	
        <body>
            
        <table id="example" class="table table-striped table-bordered" style="width:100%">
            <thead>
                <tr>
                       
						<th>Client Name</th>
						<th>Company Name</th>
						<!--<th>Phone No</th>-->
						<!--<th>Email</th>-->
						<th>Cost</th>
						<th>InstallDate</th>
                  
                </tr>
            </thead>
            <tbody
                
                 <?php
			  $result = mysqli_query($link,"SELECT * FROM fleet_view ORDER BY No ASC limit 200" );
			  		while($row = mysqli_fetch_array($result)) {
			  ?>
			  
                <tr>
				
                   <td><?php echo  $row['clientName']; ?></td>
                   <td><?php echo  $row['companyName']; ?></td>
                   <!--<td> <?php echo $row['phoneNo'];?></td>-->
                   <!--<td> <?php echo $row['email'];?></td>-->
                   <td><?php echo $row['cost'];?></td>
                   <td><?php echo $row['installDate'];?></td>
                
                    
                    	<?php  }  ?>

                </tr>
            </tbody>

			



</table>	  
    </body>
        </div>
    </div>
</div>

<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.colVis.min.js"></script>

<!-- <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script> -->
<script>
    $(document).ready(function() {
        var table = $('#example').DataTable( {
            lengthChange: false,
            buttons: [ 'excel']
        } );
     
        table.buttons().container()
            .appendTo( '#example_wrapper .col-sm-6:eq(0)' );
    } );
</script>

</html>