<?php
$table='transport_routes';
$routes_count=0;
$get_routes=$this->TransportModel->get_data($table);
if($get_routes){
    foreach($get_routes as $routes){
        $routes_count=$routes_count + 1;
    }
}
$vehicles_count=0;
$vehicles_table='transport_vehicle';
$all_vehicles=$this->TransportModel->get_data($vehicles_table);
if($all_vehicles){
    foreach($all_vehicles as $vehicles){
        $vehicles_count=$vehicles_count + 1;
    }
}

$vehicle_drivers_count=0;
$vehicle_drivers='vehicle_driver';
$all_vehicle_drivers=$this->TransportModel->get_data($vehicle_drivers);
if($all_vehicle_drivers){
    foreach($all_vehicle_drivers as $vehicle_drivers){
        $vehicle_drivers_count =$vehicle_drivers_count + 1;        
    }
}

$transport_students=0;

$transport_student_report_table='transport_student_report';
$get_transport_student_report=$this->TransportModel->get_data($transport_student_report_table);
if($get_transport_student_report){
    foreach($get_transport_student_report as $transport_student_report){
        $transport_students=$transport_students + 1;    
    }
}
?>

            <ul class="list-group">
                <li class="list-group-item active d-flex justify-content-between align-items-center font-weight-bold">Quick Links</li>
                <li class="list-group-item d-flex justify-content-between align-items-center">
                    <a href="<?php echo base_url();?>Transport/routes" class="link-expanded" style="width:100%;text-decoration:none;">Routes</a>
                    <span class="badge badge-primary badge-pill" style="align:right;"><?php echo $routes_count;?></span>
                </li>
                <li class="list-group-item d-flex justify-content-between align-items-center">
                    <a href="<?php echo base_url();?>Transport/vehicles">Vehicles</a>
                    <span class="badge badge-primary badge-pill"><?php echo $vehicles_count;?></span>
                </li>
                <li class="list-group-item d-flex justify-content-between align-items-center">
                    <a href="<?php echo base_url();?>Transport/drivers">Drivers</a>
                    <span class="badge badge-primary badge-pill"><?php echo $vehicle_drivers_count;?></span>
                </li>
                <li class="list-group-item d-flex justify-content-between align-items-center">
                    <a href="<?php echo base_url();?>Transport/students">Students</a>
                    <span class="badge badge-primary badge-pill"><?php echo $transport_students;?></span>
                </li>
            </ul>