<?php // DATA MANIPULATION if ($_POST["action"] != "" || $_GET["action"] != "") { // Agregar Chofer if ($_POST["action"] == "Crear") { $nombre = strtoupper($_POST["txtNombre"]); $cedula = $_POST["txtCedula"]; $telefono = $_POST["txtTelefono"]; $placa = strtoupper($_POST["txtPlaca"]); $direccion = strtoupper($_POST["txtDireccion"]); $ind_activo = $_POST["cmbEstatus"]; $action_result = agregarChofer($link, $nombre, $cedula, $telefono, $placa, $direccion, $ind_activo); } // Cargar Datos para Modificar Chofer if ($_GET["action"] == "Modificar") { $chofer = obtenerChofer($link, $_GET["id"]); } // Modificar Chofer if ($_POST["action"] == "Modificar") { $id = $_POST["id"]; $nombre = strtoupper($_POST["txtNombre"]); $cedula = $_POST["txtCedula"]; $telefono = $_POST["txtTelefono"]; $placa = strtoupper($_POST["txtPlaca"]); $direccion = strtoupper($_POST["txtDireccion"]); $ind_activo = $_POST["cmbEstatus"]; $action_result = modificarChofer($link, $id, $nombre, $cedula, $telefono, $placa, $direccion, $ind_activo); } // Eliminar Chofer if ($_GET["action"] == "Eliminar") { $id = $_GET["id"];
<?php include "inc_session.php"; include "inc_seguridad.php"; include "inc_conectarse.php"; $_SESSION["modulo"] = "guias"; include "inc_functions.php"; ?> <?php $guia = obtenerGuia($link, $_GET["id"]); $chofer = obtenerChofer($link, $guia->id_chofer); $usuario = obtenerUsuario($link, $_SESSION["id_usuario"]); if ($_POST["action"] == "MarcarEnvioEntregado") { $id = $_POST["id_envio"]; $observaciones = strtoupper($_POST["txtMotivo"]); $action_result = marcarEnvioEntregado($link, $id, $observaciones); } if ($_POST["action"] == "MarcarEnvioNoEntregado") { $id = $_POST["id_envio"]; $motivo = strtoupper($_POST["txtMotivo"]); $action_result = marcarEnvioNoEntregado($link, $id, $motivo); } if ($_POST["action"] == "MarcarEnvioDevuelto") { $id = $_POST["id_envio"]; $motivo = strtoupper($_POST["txtMotivo"]); $action_result = marcarEnvioDevuelto($link, $id, $motivo); } $variables = "page=" . $_REQUEST["page"] . "&cmbEstatusGuia=" . $_REQUEST["cmbEstatusGuia"] . "&cmbAnoI=" . $_REQUEST["cmbAnoI"] . "&cmbMesI=" . $_REQUEST["cmbMesI"] . "&cmbDiaI=" . $_REQUEST["cmbDiaI"] . "&cmbChofer=" . $_REQUEST["cmbChofer"]; ?>