1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
2 -------------------------------------------------------------------------------
3 Ministerio de EconomÃa
5 -------------------------------------------------------------------------------
6 This file is part of meconlib.
8 meconlib 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 meconlib 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: Tue Apr 29 12:35:45 2003
22 Autor: Martin Marrese <mmarre@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
28 require_once 'MECON/Marco/Menu.php';
31 // +X2C Class 103 :MenuVertical
33 * Clase que se encarga del manejo de los menues verticales
35 * @package MECON_Marco
38 class MenuVertical extends Menu {
44 * Constructor. Recibe el nombre del directorio en donde esta instalado el sistema
46 * @param array $configuracion Configuracion del sistema
51 function MenuVertical($configuracion = null) // ~X2C
53 parent::Menu($configuracion);
59 * Funcion para agregar el cuerpo de la pagina a la pagina
61 * @param string $body Cuerpo del mensaje para agregar a la pagina
62 * @param string $titulo Titulo de la seccion seleccionada
63 * @param bool $espacios Indica si hay que agregar espacios antes y despues del body
64 * @param mixed $menu Menu a mostrar
69 function addBody($body, $titulo, $espacios = true, $menu = null) // ~X2C
71 $c= count($this->_componentes);
73 $tmp = $this->_componentes;
74 $this->_componentes = array ();
75 $this->_armarArraySecciones($tmp);
77 $TABLA = new HTML_Table('width=160 align="left" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0" height="1"');
79 $menu ='<img src="/MECON/images/general_carpeta0" border="0"> <font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b>'.$titulo.'</b></font>';
81 $TABLA->addRow($row,'align="left" bgcolor="#FFFFFF" height="1"');
82 $TABLA->updateCellAttributes(0,0,'colspan="2"');
84 foreach ($this->_componentesVertical as $comp) {
85 $row = array ('<img src="/MECON/images/general_carp" border="0">',' ');
87 $TABLA->addRow($comp,'align="left" bgcolor="#FFFFFF" height="1"');
88 $TABLA->updateColAttributes(0,'align="right" width="34"');
89 $TABLA->updateColAttributes(1,'align="left"');
91 $TABLA->updateCellAttributes(0,0,'align="left"');
92 $row = array ($TABLA->toHtml());
94 $this->_tabla->addRow($row,'width=160 align="left" bgcolor="#FFFFFF" valign="top"');
98 //Agrego si corresponde el espacio al inicio
104 foreach ($body as $bod) {
105 if (is_object($bod)) {
106 if (method_exists($bod,'toHtml')) {
107 $tmp.=$bod->toHtml();
110 trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING);
117 //Agrego si corresponde el espacio al final
123 $this->_tabla->setCellContents (0,1,$row);
124 $this->_tabla->setCellAttributes(0,1,'align="center" bgcolor="#FFFFFF" valign="top"');
126 $this->_tabla->updateColAttributes (1,'width="600"');
131 } // -X2C Class :MenuVertical