Example #1
0
		}

		return true;
	}
</script>
<?php 
include "header.php";
include "class.driver.dao.php";
?>
<center>
	<h3>Add Driver</h3>
<form name = "frmDriver" method="POST" action="save.driver.php"  onsubmit = "return validateDriver();">
	<table cellspacing="5" cellpadding="5">
		<?php 
if (isset($_GET["id"])) {
    $dao = new DAOdriver();
    $vo = $dao->get($_GET["id"]);
    ?>
			<tr>
				<td> Driver Name </td>
				<td><input type = "text" name = "name" value= "<?php 
    echo $vo->name;
    ?>
 "/></td>
			</tr>
			<tr>
				<td> Photo </td>
				<td><input type = "text" name = "photo" value= "<?php 
    echo $vo->photo;
    ?>
 "/></td>
Example #2
0
<?php

session_start();
include "db.php";
include "class.driver.dao.php";
$dao = new DAOdriver();
$vo = new driver($_SESSION["uid"], $_POST["name"], $_POST["photo"], $_POST["address"], $_POST["email"], $_POST["phone"], $_POST["social_security_no"], $_POST["license_num"], $_POST["expiry_date"]);
if (isset($_POST["did"])) {
    $vo->did = $_POST["did"];
}
$dao->save($vo);
header("Location: driver.php");
<?php

include "db.php";
include "class.driver.dao.php";
$dao = new DAOdriver();
if (isset($_GET["id"])) {
    $vo = $dao->get($_GET["id"]);
    $dao->del($vo);
}
header("Location: driver.php");
Example #4
0
<?php

session_start();
include "class.truck.dao.php";
include "class.driver.dao.php";
include "class.invoice.dao.php";
include_once "header.php";
$dao = new DAOtruck();
$daoDriver = new DAOdriver();
$daoInvoice = new DAOinvoice();
$truckAvailableList = $dao->getVehicleId($_SESSION["uid"], 1);
$truckLoadedList = $dao->getVehicleId($_SESSION["uid"], 0);
$t_available = count($truckAvailableList);
$t_loaded = count($truckLoadedList);
$c_date = date('Y-m-d');
$driver_detail = $daoDriver->getDrivers($_SESSION['uid']);
$invoice_detail = $daoInvoice->getInvoices($_SESSION['uid']);
?>
<center>
		<font color ="red" face ="Britannic Bold"><h2><U>STATUS</U></h2></font>
		<table class="table table-bordered" >
			<tr><td width = '50%'><center><img src="img/truck.png" width = 80 height = 80 ><br><br>
				Trucks available are <?php 
echo $t_available;
?>
<br>
				Trucks loaded are <?php 
echo $t_loaded;
?>
</center></td>
				<td width = '50%'><center><img src="img/transaction.png" width = 80 height = 80 ><br><br>
Example #5
0
<?php

session_start();
include "class.driver.dao.php";
include_once "header.php";
$dao = new DAOdriver();
?>
<center><b><u><font face ="Britannic Bold"><h1>Driver</h1></font></u></b></center><br>
<a href="form.driver.php" class="btn btn-info">Add driver</a><br>
<table class="table table-striped">
	<tr class ="info">
		<td>#</td>
		<td>Name</td>
		<td>Photo</td>
		<td>Address</td>
		<td>Email</td>
		<td>Phone</td>
		<td>Social Security No</td>
		<td>License Number</td>
		<td>License Expiry Date</td>
		<td><b>Edit</b></td>
		<td><b>Delete</b></td>
	</tr>

<?php 
$rec_per_page = 10;
if (isset($_GET['page'])) {
    $page = $_GET['page'];
} else {
    $page = 1;
}