當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vehicle::getCurrentJob方法代碼示例

本文整理匯總了PHP中Vehicle::getCurrentJob方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vehicle::getCurrentJob方法的具體用法?PHP Vehicle::getCurrentJob怎麽用?PHP Vehicle::getCurrentJob使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Vehicle的用法示例。


在下文中一共展示了Vehicle::getCurrentJob方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Vehicle

		<div id="sidebar" style="float:left;width:15%;">
		<?php 
include 'sidebar.php';
?>
		</div>
		<div id="content" style="float:right;width:85%;">
			Add Order
			<form action="action.php?action=add" method="POST">
			<table>
				<tr><td>Title</td><td><input type="text" name="title" id="title"></td></tr>
				<tr><td>Vehicle</td>
					<td><select name="vehicle" id="vehicle"><option> --- Select Vehicle --- </option>
					<?php 
for ($i = 0; $i < sizeof($mVehicleList); $i++) {
    $mVehicle = new Vehicle($mVehicleList[$i]);
    if ($mVehicle->getCurrentJob() == "") {
        echo "<option value=" . $mVehicleList[$i] . ">" . $mVehicle->getVehicleNumber() . "</option>";
    }
}
?>
					</select></td></tr>
				<tr><td>Driver</td>
					<td><select name="driver" id="driver"><option> --- Select Driver --- </option>
					<?php 
for ($i = 0; $i < sizeof($mDriverList); $i++) {
    $mDriver = new Driver($mDriverList[$i]);
    if ($mDriver->getCurrentJob() == "") {
        echo "<option value=" . $mDriverList[$i] . ">" . $mDriver->getName() . "</option>";
    }
}
?>
開發者ID:rustydev19,項目名稱:Navigator,代碼行數:31,代碼來源:edit.php

示例2: Vehicle

include 'sidebar.php';
?>
		</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>
	
開發者ID:rustydev19,項目名稱:Navigator,代碼行數:30,代碼來源:index2.php

示例3: VehicleMailer

     if (Vehicle::add($type, $model, $vehicle_number, $make_year, $description)) {
         //mail to admin..
         $veh_id = Vehicle::getIdByNumber($vehicle_number);
         $adder = new VehicleMailer($veh_id);
         $adder->sendVehicleAddedMessage();
         header('Location:index.php');
     } else {
         header('Location:abc.php');
     }
     break;
 case "delete":
     $id = $_GET['id'];
     echo $_GET['id'];
     $mVehicle = new Vehicle($id);
     /* if getCurrentJob() retruns o means vehicle is not on job... */
     if ($mVehicle->isOnTrip() != 0 || $mVehicle->getCurrentJob() != 0) {
         echo '<script language="javascript">';
         echo 'alert("Vehicle is on Job, can\'t delte now !!!")';
         echo '</script>';
         header('Location:index.php');
         break;
     }
     if ($mVehicle->delete()) {
         $adder = new VehicleMailer($id);
         $adder->sendVehicleDeletedMessage();
         header('Location:index.php');
     } else {
         header('Location:index.php');
     }
     //header('Location:abc.php');
     break;
開發者ID:rusty1909,項目名稱:Navigator,代碼行數:31,代碼來源:action.php


注:本文中的Vehicle::getCurrentJob方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。