Пример #1
0
require_once "../../framework/User.php";
require_once "../../framework/Vehicle.php";
require_once "../../framework/Job.php";
require_once "../../framework/Driver.php";
if (!isset($_SESSION['user'])) {
    header('Location:../user/login.php');
}
$mUser = new User();
if (!isset($_GET['id'])) {
    header("Location:index.php");
    return;
}
$mId = $_GET['id'];
$mDriver = new Driver($mId);
$mVehicle = new Vehicle($mDriver->getCurrentVehicle());
?>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
		
		<title>FindGaddi</title>		
		<!--                       CSS                       -->
	  
		<!-- Reset Stylesheet -->
		<link rel="stylesheet" href="../../res/reset.css" type="text/css" media="screen">
	  
		<!-- Main Stylesheet -->
		<link rel="stylesheet" href="../../res/style.css" type="text/css" media="screen">
		
		<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
Пример #2
0
											<a href="#" class="number current" title="3">3</a>
											<a href="#" class="number" title="4">4</a>
											<a href="#" title="Next Page">Next »</a><a href="#" title="Last Page">Last »</a>
										</div> <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						 
							<tbody>
								<?php 
    $mDriverList = $mPreviousDriverList;
    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>" . $mDriver->getName() . "</td>";
        echo "<td>" . $mDriver->getPhone() . "</td>";
        echo "<td><a href='../vehicle/detail.php?id=" . $mVehicle->getId() . "'>" . $mVehicle->getVehicleNumber() . "</a></td>";
        echo "\t\t\t\t\t\t\t\t\t<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='Edit'><img src='../../res/pencil.png' alt='Edit'></a>\n\t\t\t\t\t\t\t\t\t\t <a href='#' title='Delete' onClick='onDelete(" . $mDriver->getId() . ")'><img src='../../res/cross.png' alt='Delete'></a>&nbsp;&nbsp;\n\t\t\t\t\t\t\t\t\t\t <a href='#' title='Edit Meta'><img src='../../res/hammer_screwdriver.png' alt='Edit Meta'></a>\n\t\t\t\t\t\t\t\t\t</td>";
        echo "</tr>";
    }
    ?>
							</tbody>
							
						</table>
						<?php 
}
?>
					</div> <!-- End #prev -->
Пример #3
0
 function getAvailableDriverList()
 {
     //require_once '../framework/DBConnect.php';
     // opening db connection
     $db = new Connection();
     $conn = $db->connect();
     if (empty($_SESSION['user'])) {
         return null;
     }
     $result = array();
     if ($this->companyId > 0) {
         $sql = "SELECT id FROM driver WHERE company_id = '{$this->companyId}' AND status = '1'";
     } else {
         $sql = "SELECT id FROM vehicle WHERE added_by = '{$this->id}' AND status = '1'";
     }
     //echo "--->".$sql;
     $action = mysqli_query($conn, $sql);
     if (mysqli_num_rows($action) > 0) {
         while ($row = mysqli_fetch_assoc($action)) {
             $driver = new Driver($row['id']);
             if ($driver->getCurrentVehicle() == 0) {
                 array_push($result, $row['id']);
             }
         }
     }
     //echo sizeof($result)."    < size";
     return $result;
 }