示例#1
0
    } else {
        //echo $mVehicle->getAddress();
        ?>
					<div id="googleMap" style="width:70%;height:100%;float:left;"></div>
					<?php 
    }
}
?>
					<div class="content-box-content-detail" style="width:30%;height:100%;float:right;overflow-y:auto">
					
						<div id="vehicle_details" style="margin:15px 5px 20px 10px">
							<img id="type" height="45" width="45" src="../../../images/vehicle_types/<?php 
echo $mVehicle->getType();
?>
.png" title="<?php 
echo $mVehicle->getType() . " : " . $mVehicle->getModel();
?>
" alt="<?php 
echo $mVehicle->getType();
?>
"> <span style="vertical-align:12px;"><b style="font-size:30px;"><?php 
echo $mVehicle->getVehicleNumber();
?>
 </b>	</span>	
							<br><br><input class="button" type='button' value='View full details'>
							<br><br><br>
							<div id="location_info">
								<table>
								<tr><td><img id="location_icon" height="15" width="15" src="../../../images/location_icon.png" title="Location" alt="Location">&nbsp;</td>
									<td><b><span id="address_view" style='vertical-align:2px;'>
									Locating...
示例#2
0
?>
		</div>
		<div id="content" style="float:right;width:85%;">
			<table>
				<tr><td style="width:200px;">Vehicle Type</td>
					<td style="width:200px;">Model</td>
					<td style="width:200px;">Vehicle Number</td>
					<td style="width:200px;">Current Job</td>
					<td style="width:200px;">Current Driver</td>
					<td style="width:200px;">Action</td>
				</tr>
				<?php 
for ($i = 0; $i < sizeof($mVehicleList); $i++) {
    $mVehicle = new Vehicle($mVehicleList[$i]);
    $mJob = new Job($mVehicle->getCurrentJob());
    $mDriver = new Driver($mJob->getDriver());
    echo "<tr>";
    echo "<td>" . $mVehicle->getType() . "</td>";
    echo "<td>" . $mVehicle->getModel() . "</td>";
    echo "<td>" . $mVehicle->getVehicleNumber() . "</td>";
    echo "<td>" . $mJob->getCode() . "</td>";
    echo "<td>" . $mDriver->getName() . "</td>";
    echo "<td><input type='submit' value='Assign'><input type='submit' value='Track'></td>";
    echo "</tr>";
}
?>
			</table>
		<div>
	</div>
	
</body> 
示例#3
0
 if ($vehicleId == null) {
     $setup['setup']['result'] = "fail_vehicle";
 } else {
     $mVehicle = new Vehicle($vehicleId);
     if ($mVehicle->getType() != $type) {
         $setup['setup']['result'] = "fail_type";
         //echo "fail_type";
     } else {
         if ($mVehicle->isDeployed() == 1) {
             $setup['setup']['result'] = "already";
             //echo "already";
         } else {
             if ($mVehicle->deploy()) {
                 $setup['setup']['result'] = "success";
                 $companyId = $mVehicle->getCompany();
                 $setup['setup']['model'] = $mVehicle->getModel();
                 $setup['setup']['type'] = $mVehicle->getType();
                 $setup['setup']['number'] = $mVehicle->getVehicleNumber();
                 $mCompany = new Company($companyId);
                 $setup['setup']['company_name'] = $mCompany->getName();
                 $setup['setup']['owner'] = $mCompany->getAdmin();
                 $setup['setup']['contact'] = $mCompany->getPhone();
                 //echo "success";
             } else {
                 $setup['setup']['result'] = "fail";
                 //echo "fail";
             }
         }
     }
 }
 echo json_encode($setup);