2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
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: mar may 27 15:16:38 ART 2003
17 // | Author: Martin Marrese <mmarre@mecon.gov.ar>
18 // +----------------------------------------------------------------------+
26 require_once 'include/lib/samurai/Samurai.php';
27 require_once 'HTML/Tabla.php';
29 $aHref = '<a href="sistemas-abm?idSistema=NUEVO">';
30 $aHrefModif = $aHref.'<img src="/www/images/modificar.gif" border="0"></a>';
31 $aHrefElim = $aHref.'<img src="/www/images/eliminar.gif" border="0"></a>';
35 $SAMURAI = new Samurai($DB,$_SESSION['samurai']['id_sistema']);
37 $sistemas = $SAMURAI->getSistemas();
39 $TABLA2 = new Tabla ('cellspacing=0');
40 $row = array ($aHref.'<img src="/www/images/nuevo.gif" border="0">Ingresar Nuevo Sistema</a>');
41 $TABLA2->agregarFila($row);
42 $TABLA2->align(0,0,'right');
44 $TABLA = new Tabla ('cellpadding=2');
45 $row = array ('Id','Nombre','Descripcion','Fecha Inicio','Fecha Fin','Fecha Impl.','Contacto','Modif.','Elim.');
46 $TABLA->agregarFilaCabecera($row);
48 foreach ($sistemas as $sistema) {
49 $Modif = ereg_replace('NUEVO', 'm'.$sistema->getId(), $aHrefModif);
50 $Elim = ereg_replace('NUEVO', 'e'.$sistema->getId(), $aHrefElim);
51 $row = array ($sistema->getId(),$sistema->getNombre(),$sistema->getDescripcion(),$sistema->getFechaInicio(),$sistema->getFechaFin(),$sistema->getFechaImplementacion(),$sistema->getContacto(),$Modif,$Elim);
52 $TABLA->agregarFila($row);
54 $TABLA->setColAlign(2,'left');
57 //Agrego las cosas al cuerpo de la pagina
58 $body.=$TABLA2->toHtml(1);
59 $body.=$TABLA->toHtml().'<BR>';
61 $MARCO = new Marco ('samurai');
62 $MARCO->addBody($body);