<?php
require_once(__DIR__."/../includes/sysinit.php");
include("vehicle.php");
$_vehicle = new Vehicle; //new class instance
$_vehicle->hddnVehicleId			= $_POST['hddnVehicleId'];
$_vehicle->edtVehicleReg			= $_POST['edtVehicleReg'];
$_vehicle->edtVehicleName			= $_POST['edtVehicleName'];
$_vehicle->edtVehicleDesc			= $_POST['edtVehicleDesc'];
$_vehicle->cbVehicleActive			= $_POST['cbVehicleActive'];
if ($_POST['action']=='0') $_vehicle->addVehicle();
if ($_POST['action']=='1') $_vehicle->updateVehicle();
if ($_POST['action']=='2') $_vehicle->viewVehicle();
if ($_POST['action']=='3') $_vehicle->editVehicle();
if ($_POST['action']=='4') $_vehicle->deleteVehicle();
unset($_vehicle);
