<?php
	include("vehicle_func.php");
	$hddnVehicleId = $_SESSION['caller']['args'][1];
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		SableGeneralFunctions::divertFromPage();
	}
	$row = $sableDB->getRow("select * from vehicle where vehicle_id = ".$hddnVehicleId);

?>
<script src="<?php SableGeneralFunctions::printModuleJS('vehicle'); ?>"></script>

<!--// Vehicle -->
<form id="frmVehicle" name="frmVehicle" autocomplete="on">
	<input type="hidden" value="<?php echo(SableSystem::sableEncode($hddnVehicleId)); ?>" id="hddnVehicleId" name="hddnVehicleId" />
	<div class="forms">
		<div class="container forms-grids">
			<div class="row forms-grid">
				<div class="col-md-12">
					<h3 class="title"><i class="fa fa-eye" aria-hidden="true"></i>&nbsp;View Vehicle</h3>
					<p></p>
				</div>
			</div>
			<!--// edtVehicleReg -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtVehicleReg" type="text" id="edtVehicleReg"readonly value="<?php echo($row['vehicle_reg']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtVehicleReg">Vehicle Reg</div>
				</div>
			</div>
			<p></p>
			<!-- edtVehicleReg //-->
			<p></p>
			<!--// edtVehicleName -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtVehicleName" type="text" id="edtVehicleName"readonly value="<?php echo($row['vehicle_name']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtVehicleName">Vehicle Name</div>
				</div>
			</div>
			<p></p>
			<!-- edtVehicleName //-->
			<p></p>
			<!--// edtVehicleDesc -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtVehicleDesc" type="text" id="edtVehicleDesc"readonly value="<?php echo($row['vehicle_desc']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtVehicleDesc">Vehicle Desc</div>
				</div>
			</div>
			<p></p>
			<!-- edtVehicleDesc //-->
			<p></p>
			<!--// cbVehicleActive -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<?php $cbVehicleActive = $row['vehicle_active']?"Yes":"No"; ?>
					<input name="cbVehicleActive" type="text" id="cbVehicleActive"readonly value="<?php echo($cbVehicleActive); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_cbVehicleActive">Active?</div>
				</div>
			</div>
			<p></p>
			<!-- cbVehicleActive //-->
			<p></p>
		<!--// buttons -->
			<div class="row forms-grid">
				<div class="col-md-2">
					<input type="button" id="btnCancel" value="Cancel"
					class="submit" onclick="window.location = '<?php SableSystem::printCallPageLink('/vehicle/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="editVehicle('<?php echo(SableSystem::sableEncode($hddnVehicleId)); ?>')" value="Modify Vehicle" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Vehicle //-->
