1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
2 -------------------------------------------------------------------------------
5 -------------------------------------------------------------------------------
6 This file is part of YATTA!.
8 YATTA! is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your option)
13 YATTA! is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License; if not,
18 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA
20 -------------------------------------------------------------------------------
21 Creado: mar dic 2 18:11:32 ART 2003
22 Autor: Martin Marrese <mmarre@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
28 require_once 'HTML/Page.php';
29 require_once 'HTML/Table.php';
30 require_once 'MECON/HTML/Link.php';
31 require_once 'MECON/HTML/Image.php';
32 require_once 'YATTA/Proceso.php';
35 //Creo los objetos necesarios {{{
36 $PAGE =& new HTML_Page(array ('doctype' => 'HTML 4.01 Transitional',
37 'charset' => 'iso-8859-1',
42 $PAGE->addStyleSheet('/sistemas/yatta/css/yatta.css');
43 $PAGE->addStyleSheet('/MECON/css/marco.css');
44 $TABLA=& new HTML_Table('width="370"');
45 $PROCESO =& new YATTA_Proceso;
48 //Obtengo la info que se pasa por get {{{
49 $id = (@$_REQUEST['id']) ? $_REQUEST['id'] : null;
52 //Obtengo la informacion del proceso {{{
53 $PROCESO->owner = $_SESSION['usuario'];
55 $res = $PROCESO->buscar($DB, MECON_DBO_AND, ' id ASC');
56 if (PEAR::isError($res)) {
57 die('Error: ' . $res->getMessage() . "\n");
59 $res = $PROCESO->cargar($res);
62 //Creo las imagenes {{{
63 $imagen =& new MECON_HTML_Image('/sistemas/yatta/images/estado_'.
64 $PROCESO->status.'.gif');
65 $cerrar = new MECON_HTML_Image('/MECON/images/general_cerrar.gif');
66 $detener =& new MECON_HTML_Link('proceso_detener',
67 new MECON_HTML_Image ('/MECON/images/general_detener.gif'),
71 //DIBUJO LA PAGINA {{{
72 $PAGE->addBodyContent('<b>'. $imagen->toHtml().' '. $PROCESO->icono
76 '<b>Id: '. $id .'</b><br>'.
77 '<b>Fecha: '. $PROCESO->fecha->format("%d/%m/%Y") .'</b><br>'.
78 '<b>Sistema: '. $PROCESO->nombre_sistema .'</b><br>'.
79 '<b>Descripcion: '. $PROCESO->descripcion .'</b><br>'.
80 '<b>Owner: '. $PROCESO->owner .'</b><br>'.
81 '<b>Destinos: '. implode(', ', $PROCESO->destinos) .'</b><br>'.
82 '<b>Nota: '. $PROCESO->nota .'</b><br>'
84 $PAGE->addBodyContent($TABLA->toHtml());
85 $PAGE->addBodyContent('<br>');
86 if ($PROCESO->status == 0 || $PROCESO->status == 1) {
87 $PAGE->addBodyContent($detener->toHtml());
89 $PAGE->addBodyContent('<a href="" onClick=\'self.close();return'.
90 ' false;\'>'.$cerrar->toHtml().'</a>');
91 $PAGE->setTitle('Datos del Proceso');