From a40527415e52e730e1a2e16ed3e46b32adf17512 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Fri, 16 Jan 2004 17:10:10 +0000 Subject: [PATCH] BugFixes. --- sistema/local_lib/prepend.php | 2 +- sistema/www/images/sistemas.gif | Bin 892 -> 838 bytes sistema/www/images/sistemas_f2.gif | Bin 907 -> 997 bytes sistema/www/permisos/permisos-abm.php | 20 +++++++++++++++++++- sistema/www/sistemas/sistemas-abm.php | 20 +++++++++++++++++++- sistema/www/sistemas/sistemas-datos.php | 1 + 6 files changed, 40 insertions(+), 3 deletions(-) diff --git a/sistema/local_lib/prepend.php b/sistema/local_lib/prepend.php index 97b93f1..57331d5 100644 --- a/sistema/local_lib/prepend.php +++ b/sistema/local_lib/prepend.php @@ -30,7 +30,7 @@ elseif (($_SERVER['REQUEST_URI'] != "/sistemas/samurai/sel-sistema" && !@$_SESSION['samurai']['id_sistema']) { header('Location: /sistemas/samurai/sel-sistema?redirect=index'); } -elseif (@$_SESSION['samurai']['id_sistema']) { +if (@$_SESSION['samurai']['id_sistema']) { //Creo el objeto Permiso $SAMURAI_PERM = new SAMURAI_Perm ($_SESSION['usuario'], $_SESSION['samurai']['id_sistema'], $DB); diff --git a/sistema/www/images/sistemas.gif b/sistema/www/images/sistemas.gif index 15f40cac41d16265d852d9df69af855f4a351225..9e9da789521051f13f86a55723205a3da7265a7e 100644 GIT binary patch delta 7 Ocmeyvc8qO<8#4e6qyoqQ delta 62 zcmV-E0Kxyp2K)xFMgulpFe(OuvPq!INl_C+aK#&&<$)5;@N|^wz5R?dO2C}Yz U9C`aCtL(DOHtX!O1cU$pJMoPfEC2ui diff --git a/sistema/www/images/sistemas_f2.gif b/sistema/www/images/sistemas_f2.gif index c3b1668a8d5339aaf4341d8f44a5701405f9ac24..72388195c9fcc230bd4c668ffa5df15034985fff 100644 GIT binary patch delta 11 ScmeBXf6BfgmwECn#tHx%Py~el delta 38 ucmaFL-p#%tmsw6l${~l@q$;a%y|zyBvW6>R*>5?v-bh=m%dN=3U=08Xrwxt( diff --git a/sistema/www/permisos/permisos-abm.php b/sistema/www/permisos/permisos-abm.php index de5acc3..31637a2 100644 --- a/sistema/www/permisos/permisos-abm.php +++ b/sistema/www/permisos/permisos-abm.php @@ -26,6 +26,23 @@ if (!$SAMURAI_PERM->tiene(SAMURAI_PERM_DEVELOPER)) { } $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones.php', $SAMURAI_PERM); //}}} + +//XXX OBTENGO LA ACCION {{{ +switch ($_REQUEST['accion']) { + case 'm': + $b_accion = 'Modificar'; + $accion = 'm'; + break; + case 'e': + $b_accion = 'Eliminar'; + $accion = 'e'; + break; + default: + $b_accion = 'Grabar'; + $accion = ''; + break; +} +//}}} //REQUIRE_ONCE {{{ //MECON {{{ @@ -45,7 +62,8 @@ $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones $FORM->addElement ('hidden', 'id_permiso'); $FORM->addElement ('text' , 'desc_permiso', 'DescripciĆ³n', array('size'=>'50')); $FORM->addElement ('hidden', 'responsable' , $_SESSION['usuario']); - $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar'); + $FORM->addElement ('hidden', 'accion', $accion); + $group[] = HTML_QuickForm::createElement('submit', 'aceptar', $b_accion); $group[] = HTML_QuickForm::createElement('button', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:history.go(-1);return true;')); $FORM->addGroup($group,'botones'); // }}} diff --git a/sistema/www/sistemas/sistemas-abm.php b/sistema/www/sistemas/sistemas-abm.php index 7311db3..4481ac1 100644 --- a/sistema/www/sistemas/sistemas-abm.php +++ b/sistema/www/sistemas/sistemas-abm.php @@ -31,6 +31,23 @@ require_once 'SAMURAI/Permiso.php'; // }}} // }}} + +//XXX OBTENGO LA ACCION {{{ +switch ($_REQUEST['accion']) { + case 'm': + $b_accion = 'Modificar'; + $accion = 'm'; + break; + case 'e': + $b_accion = 'Eliminar'; + $accion = 'e'; + break; + default: + $b_accion = 'Grabar'; + $accion = ''; + break; +} +//}}} //VERIFICO SI SE TIENE ACCESO A LA PAGINA{{{ $SAMURAI_PERM->setSistema(SAMURAI_PERM); if (!$SAMURAI_PERM->tiene(SAMURAI_PERM_DEVELOPER)) { @@ -63,7 +80,8 @@ $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones $FORM->addElement ('textarea', 'contacto' , 'Contacto' , array('rows' => '2','cols'=>'50')); $FORM->addElement ('select' , 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'multiple')); $FORM->addElement ('hidden' , 'responsable' , $_SESSION['usuario']); - $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar'); + $FORM->addElement ('hidden', 'accion', $accion); + $group[] = HTML_QuickForm::createElement('submit', 'aceptar', $b_accion); $group[] = HTML_QuickForm::createElement('submit', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:window.location =\'sistemas\';return false;')); $FORM->addGroup($group,'botones'); // }}} diff --git a/sistema/www/sistemas/sistemas-datos.php b/sistema/www/sistemas/sistemas-datos.php index a70828f..53765f5 100644 --- a/sistema/www/sistemas/sistemas-datos.php +++ b/sistema/www/sistemas/sistemas-datos.php @@ -20,6 +20,7 @@ // $Id$ // + //VERIFICO SI SE TIENE ACCESO A LA PAGINA{{{ $SAMURAI_PERM->setSistema(SAMURAI_PERM); if (!$SAMURAI_PERM->tiene(SAMURAI_PERM_DEVELOPER)) { -- 2.43.0