Exemple #1
0
			
			<div class="clear"></div> <!-- End .clear -->
			

			<div class="clear"></div>
			
			<div class="content-box" style="margin: 0 0 0 0;padding: 0 0 0 0;border:0px"><!-- Start Content Box -->
				

				
				<div class="content-box-content-map" style="padding:0;width:100%">
					
					
					<div style="display: block; " class="tab-content default-tab" id="map" style="width:100%;height:100%;"> <!-- This is the target div. id must match the href of this div's tab -->
					<?php 
if (!$mVehicle->isDeployed()) {
    echo "<div class='notification information png_bg' style='width:50%;float:left;margin:10px 10px 10px 10px;'><div>Tracking device has been installed yet.</div></div> ";
} else {
    if ($mVehicle->getAddress() == null) {
        echo "<div class='notification attention png_bg' style='width:50%;float:left;margin:10px 10px 10px 10px;'><div>Could not find location at this moment, Please be patient and be with us.</div></div> ";
    } 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_number" style="margin:15px 5px 20px 5px">
Exemple #2
0
 if ($vehicleId == null) {
     $setupResponse->status = "FAILURE";
     $error = new Error();
     $error->reason = "VEHICLE";
     $error->message = "No such vehicle registered.";
     $result->error = $error;
 } else {
     $mVehicle = new Vehicle($vehicleId);
     if ($mVehicle->getType() != $type) {
         $setupResponse->status = "FAILURE";
         $error = new Error();
         $error->reason = "VEHICLE_TYPE";
         $error->message = "Vehicle type does not match";
         $result->error = $error;
     } else {
         if ($mVehicle->isDeployed() == 1) {
             $setupResponse->status = "FAILURE";
             $error = new Error();
             $error->reason = "VEHICLE";
             $error->message = $vehicle . " is already deployed";
             $result->error = $error;
         } else {
             if ($mVehicle->deploy($imei, $mac)) {
                 $setupResponse->status = "SUCCESS";
                 $vehicle = new TempVehicle();
                 $vehicle->id = $mVehicle->getId();
                 $vehicle->number = $mVehicle->getVehicleNumber();
                 $vehicle->type = $mVehicle->getType();
                 $vehicle->year = $mVehicle->getMakeYear();
                 $vehicle->date_added = $mVehicle->getDateAdded();
                 $result->vehicle = $vehicle;