/* Muesta la lista de tareas */ if (!Estadentro()) { $HayError = true; $errores['autenticacion'] = "El usuario no es correcto"; include '\\ctrl\\inicio.php'; exit; } include MODEL_PATH . 'tareas.php'; include_once "\\..\\Model\\Logica.php"; if ($_POST) { $_SESSION['condBusqueda'] = $condicion; } else { $condicion = $_SESSION['condBusqueda']; } if (isset($_GET['pag'])) { $pag = $_GET['pag']; } else { $pag = 1; } $maxPag = (int) (Nregistrosfiltrados($condicion) - 1) / PROXPAG + 1; if ($pag < 1 || $pag > $maxPag) { $pag = 1; } $posIni = ($pag - 1) * PROXPAG + 1; if (Nregistrosfiltrados($condicion) > 0) { $FiltroTareas = BuscarTareas($condicion, $posIni, PROXPAG); // En un controlador real esto haría más cosas include VIEW_PATH . 'listar_Filtro_Fecha_y_Pendientes.php'; } else { echo "<h3 align='center'> No existen tareas</h3>"; }
include_once "\\Helpers\\form.php"; include_once "\\model\\login.php"; if (!Estadentro()) { $HayError = true; $errores['autenticacion'] = "Registrese correctamente."; include '\\ctrl\\inicio.php'; exit; } if (!$_POST) { include_once VIEW_PATH . 'form_buscar.php'; } else { if (isset($_POST['pendiente'])) { $condicion = "estado='Pendiente'"; include CTRL_PATH . 'listarFiltro.php'; } if (isset($_POST['Buscarfecha'])) { $fecha = $_POST['fecha_b']; $fecha = TransformarFecha($fecha); $condicion = "f_fin= '{$fecha}'"; include CTRL_PATH . 'listarFiltro.php'; } if (isset($_POST['Buscarid'])) { $id = $_POST['id']; $ListaTareas = BuscarTareas("idtarea='{$id}'", 0, 1); if (Nregistrosfiltrados("idtarea='{$id}'") > 0) { include VIEW_PATH . 'listarFiltroid.php'; } else { echo "<h3 align='center'> No existen tareas</h3>"; } } }