当前位置: 首页>>代码示例>>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;未经允许,请勿转载。