require_once "../../framework/User.php"; require_once "../../framework/Vehicle.php"; require_once "../../framework/Job.php"; require_once "../../framework/Driver.php"; $mUser = new User(); if (!isset($_GET['list'])) { $mVehicleList = $mUser->getVehicleList(); } else { $list = $_GET['list']; switch ($list) { case "prev": $mVehicleList = $mUser->getPreviousVehicleList(); break; case "deployed": $mVehicleList = $mUser->getDeployedVehicleList(); break; case "onjob": $mVehicleList = $mUser->getOnJobVehicleList(); break; case "free": $mVehicleList = $mUser->getFreeVehicleList(); break; case "wait": $mVehicleList = $mUser->getWaitingVehicleList(); break; default: $mVehicleList = $mUser->getVehicleList(); break; } }