+<?php
+// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4 foldmethod=marker:
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Created: mar may 27 15:16:38 ART 2003
+// | Author: Martin Marrese <mmarre@mecon.gov.ar>
+// +----------------------------------------------------------------------+
+//
+// $Id$
+//
+
+ require_once 'MECON/HTML/Tabla.php';
+ require_once 'SAMURAI/Perfil.php';
+
+//LINKS A PERFILES-ABM {{{
+ $aHref = '<a href="perfiles-abm?accion=##ACCION##&idPerfil=##NUEVO##">';
+ $aHrefModif = $aHref.'<img src="/MECON/images/general_modificar.gif" border="0" alt="Modificar Perfil"></a>';
+ $aHrefElim = $aHref.'<img src="/MECON/images/general_eliminar.gif" border="0" alt="Eliminar Perfil" ></a>';
+// }}}
+//VEO SI HAY QUE ELEGIR EN QUE SISTEMA TRABAJAR {{{
+if (!@$_SESSION['samurai']['id_sistema'] || !@$_SESSION['samurai']['login']) {
+ header('Location: sel-sistema');
+}
+// }}}
+//CREO LOS OBJETOS NECESARIOS {{{
+ $TABLA2 = new Tabla ('cellspacing=0');
+ $TABLA = new Tabla ('cellpadding=2');
+
+// }}}
+//OBTENGO LA INFORMACION DE LA BASE {{{
+ $perfiles = SAMURAI_Perfil::getPerfiles($DB);
+// }}}
+//AGREGO LOS DATOS A LAS TABLAS {{{
+ $row = array ($aHref.'<img src="/MECON/images/general_nuevo.gif" border="0">Ingresar Nuevo Perfil</a>');
+ $TABLA2->addRow($row,'align=right');
+ $row = array ('Id','Descripcion','Tipo','Modif.','Elim.');
+ $TABLA->addRow($row,'cabecera');
+ foreach ($perfiles as $perfil) {
+ $Modif = ereg_replace('##NUEVO##' , $perfil->getId(), $aHrefModif);
+ $Elim = ereg_replace('##NUEVO##' , $perfil->getId(), $aHrefElim );
+ $Modif = ereg_replace('##ACCION##', 'm' , $Modif );
+ $Elim = ereg_replace('##ACCION##', 'e' , $Elim );
+ $row = array ( $perfil->getId(),
+ $perfil->getDescripcion(),
+ $perfil->getTipo(),
+ $Modif,
+ $Elim,
+ );
+ $TABLA->addRow($row);
+ }
+// }}}
+//DIBUJO LA PAGINA {{{
+ $MARCO = new Marco ('../../conf/confSecciones.php');
+ $MARCO->addBody($TABLA2->toHtml(1));
+ $MARCO->addBody($TABLA);
+ $MARCO->display();
+// }}}
+//FIN
+?>