<?php session_start(); include "db.php"; include "class.truck.dao.php"; $dao = new DAOtruck(); $vo = new truck($_SESSION["uid"], $_POST["make"], $_POST["yr_model"], $_POST["yr_first_sold"], $_POST["vlf_class"], $_POST["type_veh"], $_POST["type_lic"], $_POST["license_num"], $_POST["body_type_model"], $_POST["mp"], $_POST["mo"], $_POST["ax"], $_POST["wc"], $_POST["unladen_g_cgw"], $_POST["vehicle_id_num"], $_POST["type_vehicle_use"], $_POST["date_issued"], $_POST["cc_alco"], $_POST["dt_fee_recvd"], $_POST["pic"], $_POST["registered_owner"], $_POST["amount_due"], $_POST["amount_recvd"], $_POST["amount_paid"]); if (isset($_POST["truck_id"])) { $vo->truck_id = $_POST["truck_id"]; } $dao->save($vo); header("Location: truck.php");
<?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>
} return true; } </script> <?php include "header.php"; include "class.truck.dao.php"; ?> <center> <h3>Add Truck Details</h3> <form name = "frmTruck" method="POST" action="save.truck.php" onsubmit = "return validateTruck();"> <table cellspacing="5" cellpadding="5"> <?php if (isset($_GET["id"])) { $dao = new DAOtruck(); $vo = $dao->get($_GET["id"]); ?> <tr> <td> Make </td> <td><input type = "text" name = "make" value= "<?php echo $vo->make; ?> "/></td> </tr> <tr> <td> Year Model </td> <td><input type = "text" name = "yr_model" value= "<?php echo $vo->yr_model; ?> "/></td>
<?php include_once "db.php"; include "class.truck.dao.php"; $dao = new DAOtruck(); $truckList = $dao->getVehicleId(9); echo join(', ', $truckList); $count = 1; ?> <html> <head> <title> Test Company </title> </head> <body> <form action = "test.php" method = "post"> <table> <tr> <td> <select name = "truckSelect"> <?php foreach ($truckList as $name) { echo "<option value=\"{$count}\">{$name}</option>"; $count++; } ?> </select> </td> <td><button type = "submit">Submit</button></td>
<?php session_start(); include "class.truck.dao.php"; include_once "header.php"; $dao = new DAOtruck(); ?> <center><b><u><font face ="Britannic Bold"><h1>Truck</h1></font></u></b></center><br> <a href="form.truck.php" class="btn btn-info">Add truck</a><br> <table class="table table-striped" > <tr class ="info"> <td>#</td> <td>Make</td> <td>Model Year</td> <td>Year First Sold</td> <td>Vlf Class</td> <td>Vehicle Type</td> <td>License Type</td> <td>License Num</td> <td>Model Body Type</td> <td>MP</td> <td>MO</td> <td>AX</td> <td>WC</td> <td>Unladen G Cgw</td> <td>Vehicle Id Num</td> <td>Vehicle Use Type</td> <td>Date Issued</td> <td>Cc Alco</td> <td>Date Fee Recieved</td> <td>Picture</td>
<?php include "db.php"; include "class.truck.dao.php"; $dao = new DAOtruck(); if (isset($_GET["id"])) { $vo = $dao->get($_GET["id"]); $dao->del($vo); } header("Location: truck.php");
if(to_address == null || to_address == ""){ alert("to_address can't be empty"); return false; } return true; } </script> <?php session_start(); include "header.php"; include "class.dispatch.dao.php"; include "class.company.dao.php"; include_once "db.php"; include "class.truck.dao.php"; include "class.trailer.dao.php"; $dao = new DAOtruck(); $truckList = $dao->getVehicleId($_SESSION["uid"], 1); $daoTrailer = new DAOtrailer(); $trailerList = $daoTrailer->getVehicleId($_SESSION["uid"], 1); $count = count($truckList); $daoCompany = new DAOcompany(); $companyList = $daoCompany->getCompany($_SESSION["uid"]); ?> <center> <h3>Add Dispatch</h3> <form name = "frmDispatch" method="POST" action="save.dispatch.php" onsubmit = "return validateDispatch();"> <table cellspacing="5" cellpadding="5"> <?php if (isset($_GET["id"])) { $dao = new DAOdispatch(); $vo = $dao->get($_GET["id"]);
<?php session_start(); include "db.php"; include "class.dispatch.dao.php"; include "class.truck.dao.php"; include "class.trailer.dao.php"; $daoTruck = new DAOtruck(); $daoTruck->setTruckAvailable($_SESSION["uid"], 0, $_POST["truck_id"]); $daoTrailer = new DAOTrailer(); $daoTrailer->setTrailerAvailable($_SESSION["uid"], 0, $_POST["trailer_id"]); $dao = new DAOdispatch(); $creation_date = date('Y-m-d'); //echo $_POST["trailer_id"]; //echo $creation_date; $vo = new dispatch($_SESSION["uid"], $creation_date, $_POST["carrier"], $_POST["pieces"], $_POST["space"], $_POST["act_wgt"], $_POST["as_wgt"], $_POST["type"], $_POST["attention"], $_POST["reference"], $_POST["trailer_id"], $_POST["truck_id"], $_POST["pay_code"], $_POST["pay_type"], $_POST["rate"], $_POST["total"], $_POST["pallets"], $_POST["temp"], $_POST["miles"], $_POST["load_num"], $_POST["load_terms"], $_POST["advance"], $_POST["bill_to"], $_POST["from_address"], $_POST["to_address"], $_POST["pickup_num"]); //$vo->show(); if (isset($_POST["did"])) { $vo->did = $_POST["did"]; } $dao->save($vo); header("Location: dispatch.php");