Esempio n. 1
0
   <?php 
include_once "includes/camion.php";
include_once "includes/empleado.php";
include_once "includes/sucursal.php";
$empleado = new Empleado();
$sucursal = new Sucursal();
$camion = new Camion();
if (isset($_POST["origen"], $_POST["destino"], $_POST["empleado"], $_POST["cantidad_paquetes"], $_POST["placa"])) {
    if (!empty($_POST["origen"]) && !empty($_POST["destino"]) && !empty($_POST["empleado"]) && !empty($_POST["cantidad_paquetes"]) && !empty($_POST["placa"])) {
        $camion->setOrigen($_POST["origen"]);
        $camion->setDestino($_POST["destino"]);
        $camion->setEmpleado($_POST["empleado"]);
        $camion->setCantidad_paquetes($_POST["cantidad_paquetes"]);
        $camion->setPlaca($_POST["placa"]);
        $camion->agregar_camion();
        $empleado->setNombre($_POST["empleado"]);
        $empleado->ocupar();
    }
}
if (isset($_GET["eliminar"])) {
    $camion = $camion->setId_camion($_GET["eliminar"]);
    $camion->eliminar();
}
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Camiones</title>
	<link rel="stylesheet" type="text/css" href="css/style.css">
</head>