From: Martín Marrese Date: Fri, 16 Jan 2004 17:10:10 +0000 (+0000) Subject: BugFixes. X-Git-Tag: svn_import~47 X-Git-Url: https://git.llucax.com/mecon/samurai.git/commitdiff_plain/a40527415e52e730e1a2e16ed3e46b32adf17512?ds=inline BugFixes. --- 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 15f40ca..9e9da78 100644 Binary files a/sistema/www/images/sistemas.gif and b/sistema/www/images/sistemas.gif differ diff --git a/sistema/www/images/sistemas_f2.gif b/sistema/www/images/sistemas_f2.gif index c3b1668..7238819 100644 Binary files a/sistema/www/images/sistemas_f2.gif and b/sistema/www/images/sistemas_f2.gif differ 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)) {