require_once 'SAMURAI/Perfil.php';
require_once 'SAMURAI/Permiso.php';
require_once 'SAMURAI/Sistema.php';
require_once 'SAMURAI/Perfil.php';
require_once 'SAMURAI/Permiso.php';
require_once 'SAMURAI/Sistema.php';
}
$FORM = new MECON_HTML_QuickForm ('perfiles_abm','post','perfiles-abm');
$SISTEMA = new SAMURAI_Sistema ($DB, $_SESSION['samurai']['id_sistema']);
}
$FORM = new MECON_HTML_QuickForm ('perfiles_abm','post','perfiles-abm');
$SISTEMA = new SAMURAI_Sistema ($DB, $_SESSION['samurai']['id_sistema']);
- $PERFIL = new SAMURAI_Perfil ($DB, $id_perfil);
+ $PERFIL = new SAMURAI_Perfil ($DB, $id_perfil,
+ $_SESSION['samurai']['id_sistema']);
$FORM->addElement ('hidden', 'desc_ant' , $descripcion);
$FORM->addElement ('static', 'desc_perfil', 'Descripcion', $descripcion);
$FORM->addElement ('select', 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'true'));
$FORM->addElement ('hidden', 'desc_ant' , $descripcion);
$FORM->addElement ('static', 'desc_perfil', 'Descripcion', $descripcion);
$FORM->addElement ('select', 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'true'));
$FORM->addElement ('hidden', 'responsable', $responsable);
$group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar');
$group[] = HTML_QuickForm::createElement('submit', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:window.location=\'perfiles\';return false;'));
$FORM->addElement ('hidden', 'responsable', $responsable);
$group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar');
$group[] = HTML_QuickForm::createElement('submit', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:window.location=\'perfiles\';return false;'));
$id_perfil =& $FORM->getElement ('id_perfil' );
$desc_perfil =& $FORM->getElement ('desc_perfil');
$permisos =& $FORM->getElement ('permisos' );
$id_perfil =& $FORM->getElement ('id_perfil' );
$desc_perfil =& $FORM->getElement ('desc_perfil');
$permisos =& $FORM->getElement ('permisos' );
$responsable =& $FORM->getElement ('responsable');
$group =& $FORM->getElement ('botones' );
$group =& $group->getElements('aceptar' );
$aceptar =& $group[0];
$permisos->setSelected($PERFIL->getPermisos());
$responsable =& $FORM->getElement ('responsable');
$group =& $FORM->getElement ('botones' );
$group =& $group->getElements('aceptar' );
$aceptar =& $group[0];
$permisos->setSelected($PERFIL->getPermisos());
$id_perfil =& $FORM->getElement ('id_perfil' );
$desc_perfil =& $FORM->getElement ('desc_perfil');
$permisos =& $FORM->getElement ('permisos' );
$id_perfil =& $FORM->getElement ('id_perfil' );
$desc_perfil =& $FORM->getElement ('desc_perfil');
$permisos =& $FORM->getElement ('permisos' );
$responsable =& $FORM->getElement ('responsable');
$group =& $FORM->getElement ('botones' );
$group =& $group->getElements('aceptar' );
$responsable =& $FORM->getElement ('responsable');
$group =& $FORM->getElement ('botones' );
$group =& $group->getElements('aceptar' );
$PERFIL->setDescripcion($desc_perfil->_text );
$PERFIL->setResponsable($responsable->getValue());
$PERFIL->setPermisos ($permisos->getSelected()); //Le asigno al perfil los permisos seleccionados
$PERFIL->setDescripcion($desc_perfil->_text );
$PERFIL->setResponsable($responsable->getValue());
$PERFIL->setPermisos ($permisos->getSelected()); //Le asigno al perfil los permisos seleccionados