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 -----------------------------------------------------------------------------*/
27 require_once 'MECON/Marco/Menu.php';
30 * Clase que se encarga del manejo de los menues verticales
34 class MECON_Marco_MenuVertical extends MECON_Marco_Menu {
36 * Funcion para agregar el cuerpo de la pagina a la pagina
38 * @param string $body Cuerpo del mensaje para agregar a la pagina
39 * @param string $titulo Titulo de la seccion seleccionada
40 * @param mixed $menu Menu a mostrar
45 function addBody($body, $titulo, $menu = null)
47 $tmp = $this->_componentes;
48 $this->_componentes = array ();
49 $this->_armarArraySecciones($tmp);
51 $TABLA = new HTML_Table('width=152 align="left" cellspacing="0"
52 cellpadding="0" border="0" height="1"
53 background="/MECON/images/general_titulo_menu.gif"');
54 $menutmp ='<div class="mecon_marco_subtitle_vertical"> '.$titulo.'</div>';
55 $TABLA->addRow(array ($menutmp),'align="left"');
56 $TABLA->updateCellAttributes(0,0,'colspan="2"');
60 '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=36>',
61 '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=118>'
65 foreach ($this->_componentesVertical as $comp) {
66 $TABLA->addRow($comp,'align="left" height="3"
67 background="/MECON/images/general_fondo_gris"');
68 $TABLA->updateColAttributes(0,
69 'align="right" width="34" height="3"');
70 $TABLA->updateColAttributes(1,'align="left" width="118"');
73 '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=36>',
74 '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=118>'
78 $TABLA->updateCellAttributes(0,0,'align="left"');
81 if (is_array($body)) {
82 if ($this->_configuracion['espacios']) {
83 $cuerpo.= ' <BR>';
85 foreach ($body as $bod) {
86 if (is_object($bod)) {
87 if (method_exists($bod,'toHtml')) {
88 $cuerpo.= $bod->toHtml();
91 trigger_error('El metodo no existe! - '.
92 get_class($bod).'::toHtml()',
106 $MENUVERTICAL = new HTML_Table ('width="608" align="left"
108 $MENUVERTICAL->addRow(array($menu, $cuerpo),
110 $MENUVERTICAL->updateColAttributes(0, 'width="10%"');
111 $cuerpo = $MENUVERTICAL;
114 $this->_tabla->addRow(array($TABLA, $cuerpo),'align="left" bgcolor="#FFFFFF" valign="top"');
115 $this->_tabla->updateColAttributes(0, 'width="10%"');
116 $this->resultado[] = $this->_tabla;