X-Git-Url: https://git.llucax.com/mecon/samurai.git/blobdiff_plain/f36973cf590bb2a3f616609a53aba542fa93a8fa..a3e22d8601c813aab90df99431e63a0492bbe472:/src/www/sistemas.php diff --git a/src/www/sistemas.php b/src/www/sistemas.php index 520d0b3..bea082c 100644 --- a/src/www/sistemas.php +++ b/src/www/sistemas.php @@ -1,52 +1,64 @@ | -// +--------------------------------------------------------------------+ +// +----------------------------------------------------------------------+ +// | 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 +// +----------------------------------------------------------------------+ // // $Id$ -// +// $Author$ // $URL$ -// $Rev$ // $Date$ -// $Author$ +// $Rev$ +// + require_once 'include/lib/samurai/Samurai.php'; + require_once 'HTML/Tabla.php'; + + $aHref = ''; + $aHrefModif = $aHref.''; + $aHrefElim = $aHref.''; + + $body = ''; + + $SAMURAI = new Samurai($DB,$_SESSION['samurai']['id_sistema']); + + $sistemas = $SAMURAI->getSistemas(); -require_once 'HTML/Form.php'; -require_once 'HTML/Tabla.php'; + $TABLA2 = new Tabla ('cellspacing=0'); + $row = array ($aHref.'Ingresar Nuevo Sistema'); + $TABLA2->agregarFila($row); + $TABLA2->align(0,0,'right'); + + $TABLA = new Tabla ('cellpadding=2'); + $row = array ('Id','Nombre','Descripcion','Fecha Inicio','Fecha Fin','Fecha Impl.','Contacto','Modif.','Elim.'); + $TABLA->agregarFilaCabecera($row); -// Armo el FORM {{{ -$FORM = new HTML_Form('sistemas_abm.php', 'post', 'sistemas'); -$FORM->start(); - //Armo la tabla {{{ - $TABLE_externa = new Tabla('width="760" align="center" bgcolor="#FFFFFF"'); - //Cargo las filas {{{ - // Cargo el link a sistemas_abm.php - $row_vacio = array ('0' => ''); - - // Agrego una linea en blanco, que mas lindo esteticamente - $TABLE_externa->agregarFila($row_vacio); - - $row = array ($sistema_remoto->htmlLinkAbm('link_abm')); - $TABLE_externa->agregarFila($row); - $TABLE_externa->align(1,0,'right'); - - // Tiro la tabla interna en la externa - $row = array ($sistema_remoto->htmlTablaCompleta()); - $TABLE_externa->agregarFila($row); - - // Tengo que agregar una fila mas para dejar un espacio en blanco - $TABLE_externa->agregarFila($row_vacio); + foreach ($sistemas as $sistema) { + $Modif = ereg_replace('NUEVO', 'm'.$sistema->getId(), $aHrefModif); + $Elim = ereg_replace('NUEVO', 'e'.$sistema->getId(), $aHrefElim); + $row = array ($sistema->getId(),$sistema->getNombre(),$sistema->getDescripcion(),$sistema->getFechaInicio(),$sistema->getFechaFin(),$sistema->getFechaImplementacion(),$sistema->getContacto(),$Modif,$Elim); + $TABLA->agregarFila($row); + } + $TABLA->setColAlign(2,'left'); + - // }}} Fin carga de filas - $TABLE_externa->display(); - // }}} Fin de la tabla - $FORM->end(); - // }}} Fin del FORM + //Agrego las cosas al cuerpo de la pagina + $body.=$TABLA2->toHtml(1); + $body.=$TABLA->toHtml().'
'; + + $MARCO = new Marco ('samurai'); + $MARCO->addBody($body); + $MARCO->display(); ?>