From 271d752bc3321b73e78343ed03935dd46b5fb551 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 5 May 2005 02:15:22 +0000 Subject: [PATCH] =?utf8?q?Se=20agrega=20opci=C3=B3n=20para=20elegir=20fech?= =?utf8?q?a=20desde=20la=20cual=20ver=20los=20logs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/admin.log.php | 25 ++++++++++++++++++++++--- src/lib/admin.forms.php | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/admin.log.php b/src/admin.log.php index e7d24c8..7863e97 100644 --- a/src/admin.log.php +++ b/src/admin.log.php @@ -11,13 +11,32 @@ require_once 'lib/pagina.php'; require_once 'lib/LogMsg.php'; require_once 'lib/listador.php'; +require_once 'lib/validacion.php'; +require_once 'lib/admin.forms.php'; marco_cabecera('Log de actividades'); + p($_SESSION['user']->toHtml()); -$log = new LogMsg($_SESSION['user']); -listar($log, 'admin.log.php', 'Listado de actividades', - 'Listado de actividades'); +$desde = 0; +$mes = date('m'); +$dia = 1; +$anio = date('Y'); +// Cargo datos que vienen por GET (si corresponde) +if (isset($_GET['admin_anio']) and isset($_GET['admin_mes']) + and isset($_GET['admin_dia']) and !isset($_GET['admin_todo'])) +{ + $mes = intval($_GET['admin_mes']); + $dia = intval($_GET['admin_dia']); + $anio = intval($_GET['admin_anio']); +} + +if (check_fecha($anio, $mes, $dia)) $desde = mktime(0, 0, 0, $mes, $dia, $anio); + +$log = new LogMsg($_SESSION['user'], $desde); +listar($log, 'admin.log.php'); + +admin_form_log_desde($anio, $mes, $dia); marco_pie('Leandro Lucarella', 'llucare@fi.uba.ar'); diff --git a/src/lib/admin.forms.php b/src/lib/admin.forms.php index be68f9f..5ac1704 100644 --- a/src/lib/admin.forms.php +++ b/src/lib/admin.forms.php @@ -8,6 +8,7 @@ // // $Id$ +/// Formulario para entrar al sistema. function admin_form_login($id = '') { ?> @@ -34,6 +35,7 @@ function admin_form_login($id = '') @@ -79,4 +81,38 @@ function admin_form_asociarse($admin = false, $id = '', $email = '', $foto = '') +
+

+ o + desde el + + +