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 :MECON_Marco_MenuVertical
33 * Clase que se encarga del manejo de los menues verticales
35 * @package MECON_Marco
38 class MECON_Marco_MenuVertical extends MECON_Marco_Menu {
43 * Funcion para agregar el cuerpo de la pagina a la pagina
45 * @param string $body Cuerpo del mensaje para agregar a la pagina
46 * @param string $titulo Titulo de la seccion seleccionada
47 * @param mixed $menu Menu a mostrar
52 function addBody($body, $titulo, $menu = null) // ~X2C
54 $c= count($this->_componentes);
56 $tmp = $this->_componentes;
57 $this->_componentes = array ();
58 $this->_armarArraySecciones($tmp);
60 $TABLA = new HTML_Table('width=160 align="left" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0" height="1"');
62 $menutmp ='<img src="/MECON/images/general_carpeta0" border="0"> <font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b>'.$titulo.'</b></font>';
63 $row = array ($menutmp);
64 $TABLA->addRow($row,'align="left" bgcolor="#FFFFFF" height="1"');
65 $TABLA->updateCellAttributes(0,0,'colspan="2"');
67 foreach ($this->_componentesVertical as $comp) {
68 $row = array ('<img src="/MECON/images/general_carp" border="0">',' ');
70 $TABLA->addRow($comp,'align="left" bgcolor="#FFFFFF" height="1"');
71 $TABLA->updateColAttributes(0,'align="right" width="34"');
72 $TABLA->updateColAttributes(1,'align="left"');
74 $TABLA->updateCellAttributes(0,0,'align="left"');
75 $row = array ($TABLA->toHtml());
77 $this->_tabla->addRow($row,'width=160 align="left" bgcolor="#FFFFFF" valign="top"');
80 $TABLA2 = new HTML_Table('align="center" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"');
83 //AGREGO EL MENU VERTICAL
85 if (is_object($menu)) {
86 if (method_exists($menu,'toHtml')) {
87 $tmp.=$menu->toHtml();
90 trigger_error('El metodo no existe!', E_USER_WARNING);
100 //Agrego si corresponde el espacio al inicio
101 if ($this->_configuracion['espacios']) {
106 foreach ($body as $bod) {
107 if (is_object($bod)) {
108 if (method_exists($bod,'toHtml')) {
109 $tmp.=$bod->toHtml();
112 trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING);
119 //Agrego si corresponde el espacio al final
120 if ($this->_configuracion['espacios']) {
125 $TABLA2->addRow($row, 'valign="top"');
126 $row = array ($TABLA2->toHtml());
127 $this->_tabla->setCellContents (0,1,$row);
128 $this->_tabla->setCellAttributes(0,1,'align="center" bgcolor="#FFFFFF" valign="top"');
130 $this->_tabla->updateColAttributes (1,'width="600"');
135 } // -X2C Class :MECON_Marco_MenuVertical