$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 {{{
require_once 'MECON/HTML/QuickForm.php';
$TABLA = new MECON_HTML_Tabla ('cellspacing=0');
$FORM = new MECON_HTML_QuickForm ('usuarios_abm','post','usuarios-abm');
+ $FORM->renderer->updateAttributes('width="400"');
$SISTEMA = new SAMURAI_Sistema($DB, $_SESSION['samurai']['id_sistema']);
$USUARIO = new SAMURAI_Usuario($DB, $login, $_SESSION['samurai']['id_sistema']);
// }}}
}
$FORM->addElement ('select', 'perfiles' , 'Perfiles', $PERFILES, array('size' => '5', 'multiple' => 'true'));
$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 = \'usuarios\';return false;'));
$FORM->addGroup($group,'botones');
}
$login3 = $login2->getValue();
}
$USUARIO->setLogin($login3);
+
$res = $USUARIO->verificarLogin();
if ($aceptar->getValue() == 'Grabar') {
$res2 = $USUARIO->verificarAsociacionExistente();