2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4 foldmethod=marker:
3 // +----------------------------------------------------------------------+
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2003 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.02 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Created: jue jul 17 16:29:54 ART 2003
17 // | Author: Martin Marrese <mmarre@mecon.gov.ar>
18 // +----------------------------------------------------------------------+
22 //VERIFICO SI SE TIENE ACCESO A LA PAGINA{{{
23 $SAMURAI_PERM->setSistema(SAMURAI_PERM);
24 if (!$SAMURAI_PERM->tiene(SAMURAI_PERM_DEVELOPER)) {
25 $SAMURAI_PERM->setSistema($_SESSION['samurai']['id_sistema']);
26 $SAMURAI_PERM->chequear(SAMURAI_PERM_USUARIO_ALTA, SAMURAI_PERM_USUARIO_BAJA, SAMURAI_PERM_USUARIO_MODIF, SAMURAI_PERM_DEVELOPER);
28 $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones.php', $SAMURAI_PERM);
33 require_once 'MECON/HTML/QuickForm.php';
34 require_once 'MECON/HTML/Error.php';
37 require_once 'SAMURAI/Usuario.php';
39 require_once 'MECON/HTML/Image.php';
40 require_once 'HTML/Page.php';
42 //CREO LOS OBJETOS NECESARIOS {{{
43 if (!@$_GET['login']) {
44 $FORM = new MECON_HTML_Error('No hay un usuario seleccionado');
47 $PAGE = new HTML_Page(array ('doctype'=>'HTML 4.01 Transitional',
48 'charset' => 'iso-8859-1',
53 $PAGE->addStyleSheet('/MECON/css/marco.css');
54 $FORM = new MECON_HTML_QuickForm ('usuarios_datos','post','usuarios-datos');
55 $USUARIO = new SAMURAI_Usuario($DB, $_GET['login'],
56 $_SESSION['samurai']['id_sistema']);
60 //OBTENGO LOS DATOS DE LA BASE {{{
61 $tmps = SAMURAI_Perfil::getPerfiles($DB, null, $_SESSION['samurai']['id_sistema']);
62 foreach ($tmps as $tmp) {
63 $PERFILES[$tmp->getId()] = $tmp->getDescripcion();
67 //AGREGO LOS ELEMENTOS AL FORM {{{
68 $FORM->addElement ('static', 'login' , 'Login@Organismo', $USUARIO->getLogin() );
69 $FORM->addElement ('static', 'nrodoc' , 'Nro Documento' , $USUARIO->getNrodoc() );
70 $FORM->addElement ('static', 'nombre' , 'Nombre' , $USUARIO->getNombre() );
71 $perf =& $FORM->addElement('select', 'perfiles', 'Perfiles' , $PERFILES , array ('size'=>'5'));
72 $perf->setSelected($USUARIO->getPerfiles());
76 //DIBUJO LA PAGINA {{{
77 $PAGE->addBodyContent($FORM);
78 $imagen = new MECON_HTML_Image('/MECON/images/general_cerrar.gif');
79 $PAGE->addBodyContent('<a href="" onClick=\'self.close();return false;\'>'.$imagen->toHtml().'</a>');
80 $PAGE->setTitle('Datos del Usuario');