当前位置: 首页>>代码示例>>PHP>>正文


PHP Vehicle::getType方法代码示例

本文整理汇总了PHP中Vehicle::getType方法的典型用法代码示例。如果您正苦于以下问题:PHP Vehicle::getType方法的具体用法?PHP Vehicle::getType怎么用?PHP Vehicle::getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vehicle的用法示例。


在下文中一共展示了Vehicle::getType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Driver

									</td>
								</tr>
							</tfoot>
						 
							<tbody>
								<?php 
    //$mDriverList = $mAllDriverList;
    for ($i = 0; $i < sizeof($mDriverList); $i++) {
        $mDriver = new Driver($mDriverList[$i]);
        $mJob = new Job($mDriver->getCurrentJob());
        $mVehicle = new Vehicle($mDriver->getCurrentVehicle());
        echo "<tr>";
        echo "<td><img height='15' width='15' src='../../../images/driver_icon.png'>&nbsp;&nbsp;<b><a href='detail.php?id=" . $mDriver->getId() . "' style='text-transform:uppercase;vertical-align:2px;'>" . $mDriver->getName() . "</a></b></td>";
        echo "<td><b><img height='20' width='20' src='../../../images/phone_icon.png'><span style='vertical-align:5px;'>+91-" . $mDriver->getPhone() . "</span></b></td>";
        if ($mVehicle->getId() != "") {
            echo "<td><b><img height='15' width='15' src='../../../images/vehicle_types/" . $mVehicle->getType() . ".png'>&nbsp;<a style='text-transform:uppercase;vertical-align:2px;' href='../vehicle/detail.php?id=" . $mVehicle->getId() . "'>" . $mVehicle->getVehicleNumber() . "</a></b></td>";
        } else {
            echo "<td></td>";
        }
        echo "</tr>";
    }
    ?>
							</tbody>
							
						</table>
						
						<?php 
}
?>
						
					</div> <!-- End #all -->
开发者ID:rusty1909,项目名称:Navigator,代码行数:31,代码来源:index.php

示例2: Vehicle

?>
		</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> 
开发者ID:rustydev19,项目名称:Navigator,代码行数:31,代码来源:index2.php

示例3:

        //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">
						<b style="font-size:30px"><?php 
echo $mVehicle->getVehicleNumber();
?>
 </b>
						<span style="font-size:12px">(<?php 
echo $mVehicle->getType();
?>
)</span>	
						<br><br><input type='button' value='View full details'> &nbsp;&nbsp;&nbsp; <input type='button' value='Notifications'>					
						</div>
						
					 
					
						<div class="content-box" style="margin:5px 5px 5px 5px" id="address_block">
							<div style="display: block;" class="content-box-content-no-border">
						
								<div style="display: block;" class="tab-content default-tab">
									<b> Current Location : </b><br><br>
									<div id="address_view">
									Locating...
									</div><br>
开发者ID:rustydev19,项目名称:Navigator,代码行数:31,代码来源:detail.php

示例4: Vehicle

        }
        ?>
										</div> -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot> 
						 
							<tbody>
								<?php 
        $mVehicleList = $mWaitingVehicleList;
        for ($i = 0; $i < sizeof($mVehicleList); $i++) {
            $mVehicle = new Vehicle($mVehicleList[$i]);
            $mJob = new Job($mVehicle->getCurrentJob());
            $mDriver = new Driver($mJob->getDriver());
            $vehType = $mVehicle->getType();
            if (empty($vehType)) {
                $vehType = 'Truck';
            }
            echo "<tr>";
            echo "<td><img id='type' height='20' width='20' src='../../../images/vehicle_types/" . $vehType . ".png' title=" . $vehType . " alt=" . $vehType . " style='vertical-align:-5px;'></td>";
            echo "<td>" . $mVehicle->getModel() . "</td>";
            echo "<td><a href='detail.php?id=" . $mVehicle->getId() . "'>" . $mVehicle->getVehicleNumber() . "</a></td>";
            echo "<td>\n\t\t\t\t\t\t\t\t\t\t<!-- Icons -->\n\t\t\t\t\t\t\t\t\t\t <a href='#' title='Delete' onClick='onDelete(" . $mVehicle->getId() . ")'><img src='../../../images/cross.png' alt='Delete'></a>\n\t\t\t\t\t\t\t\t\t</td>";
            echo "</tr>";
        }
        ?>
							</tbody>
							
						</table>
						<?php 
开发者ID:rusty1909,项目名称:Navigator,代码行数:31,代码来源:index.php

示例5: Result

$result = new Result();
if (isset($_GET['vehicle']) && isset($_GET['type']) && isset($_GET['imei']) && isset($_GET['mac'])) {
    $vehicle = trim($_GET['vehicle']);
    $type = trim($_GET['type']);
    $imei = trim($_GET['imei']);
    $mac = trim($_GET['mac']);
    $vehicleId = Vehicle::getIdByNumber($vehicle);
    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";
开发者ID:rusty1909,项目名称:Navigator,代码行数:31,代码来源:setup.php

示例6:

} else {
    if ($mVehicle->isLocationAvailable() == 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_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>
开发者ID:rusty1909,项目名称:Navigator,代码行数:31,代码来源:detail.php

示例7: array

 if (isset($_GET['vehicle']) && isset($_GET['type'])) {
     $setup = array();
     $vehicle = trim($_GET['vehicle']);
     $type = trim($_GET['type']);
     $vehicleId = Vehicle::getIdByNumber($vehicle);
     $setup['setup']['model'] = "";
     $setup['setup']['type'] = "";
     $setup['setup']['number'] = "";
     $setup['setup']['company_name'] = "";
     $setup['setup']['owner'] = "";
     $setup['setup']['contact'] = "";
     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();
开发者ID:rustydev19,项目名称:Navigator,代码行数:31,代码来源:setup.php

示例8:

				<div class="column-right" style="width:35%;height:88%">				
					<div class="content-box-header">					
						<h3 style="cursor: s-resize;">Current Status</h3>					
					</div> <!-- End .content-box-header -->	
							<br>
							<div id="vehicle_info">
								<?php 
//$mVehicle1 = new Vehicle($mId);
//echo $mVehicle->getCurrentDriver();
if ($mDriver->getCurrentVehicle() == 0) {
    ?>
									
								<b><img id="driver_icon" height="20" width="20" src="../../res/vehicle_types/Truck.png" title="Vehicle" alt="Vehicle">&nbsp; <span style='vertical-align:5px;'>Click</span> <a class="js-open-modal" href="#" data-modal-id="popup" style="font-size:11px" ><img id="add" height="15" width="15" src="../../res/add.png" title="Add Driver" alt="Add Driver"></a> <span style='vertical-align:5px;'>to assign vehicle</span></b>
								<?php 
} else {
    echo "<img id='driver_icon' height='20' width='20' src='../../res/vehicle_types/" . $mVehicle->getType() . "' title='" . $mVehicle->getType() . "' alt='" . $mVehicle->getType() . "'>&nbsp; <span style='vertical-align:5px;'><b><a href='../vehicle/detail.php?id=" . $mVehicle->getId() . "'>" . $mVehicle->getVehicleNumber() . "</a></b></span>";
    ?>
				
								&nbsp;&nbsp;&nbsp; 
								<?php 
}
?>
							</div>				
							<br>
							<?php 
if ($mDriver->getCurrentVehicle() != 0) {
    ?>
							<div id="location_info">
								<img id="location_icon" height="15" width="15" src="../../res/location_icon.png" title="Location" alt="Location">&nbsp;
								<b><span id="location_view" style='vertical-align:2px;'>
									Locating...
开发者ID:rusty1909,项目名称:Navigator,代码行数:31,代码来源:detail2.php

示例9: Expense

     } else {
         echo "<script>alert('There was some error, please try again...  !!!');</script>";
         echo "<script>window.location.href = 'http://www.findgaddi.com/navigator/Ver2.0/ui/pages/user/login.php'</script>";
     }
     break;
 case "billdetail":
     if (!isset($_GET['id'])) {
         break;
     }
     $id = $_GET['id'];
     $mExpense = new Expense($id);
     $vehicleId = $mExpense->getVehicle();
     $mVehicle = new Vehicle($vehicleId);
     $vehicleDetail['id'] = $mVehicle->getId();
     $vehicleDetail['number'] = $mVehicle->getVehicleNumber();
     $vehicleDetail['type'] = $mVehicle->getType();
     $driverId = $mExpense->getDriver();
     $mDriver = new Driver($driverId);
     $driverDetail['id'] = $mDriver->getId();
     $driverDetail['name'] = $mDriver->getName();
     $detail['id'] = $mExpense->getId();
     $detail['vehicle'] = $vehicleDetail;
     $detail['driver'] = $driverDetail;
     $detail['reason'] = $mExpense->getReason();
     $detail['amount'] = $mExpense->getAmount();
     $detail['filename'] = $mExpense->getFilename();
     $detail['date_added'] = $mExpense->getDateAdded();
     $detail['location'] = $mExpense->getLocation();
     echo json_encode($detail);
     break;
 case "billapproval":
开发者ID:rusty1909,项目名称:Navigator,代码行数:31,代码来源:UserActionHelper.php


注:本文中的Vehicle::getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。