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=152 align="left" cellspacing="0"
61 cellpadding="0" border="0" height="1"
62 background="/MECON/images/general_titulo_menu.gif"');
64 $menutmp ='<font face="Arial, Helvetica, sans-serif" size="3"
65 color="#000000"><p> '.$titulo.'</p></font>';
66 $row = array ($menutmp);
67 $TABLA->addRow($row,'align="left"');
68 $TABLA->updateCellAttributes(0,0,'colspan="2"');
70 $SEP = array('<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=36>',
71 '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=118>'
75 foreach ($this->_componentesVertical as $comp) {
76 $TABLA->addRow($comp,'align="left" height="3"
77 background="/MECON/images/general_fondo_gris"');
78 $TABLA->updateColAttributes(0,'align="right" width="34" height="3"');
79 $TABLA->updateColAttributes(1,'align="left" width="118"');
82 $TABLA->updateCellAttributes(0,0,'align="left"');
83 $row = array ($TABLA->toHtml());
85 $this->_tabla->addRow($row,'width=152 align="left" bgcolor="#FFFFFF" valign="top"');
88 $TABLA2 = new HTML_Table('width="600"align="right" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"');
91 //AGREGO EL MENU VERTICAL
93 if (is_object($menu)) {
94 if (method_exists($menu,'toHtml')) {
95 $tmp.=$menu->toHtml();
98 trigger_error('El metodo no existe!', E_USER_WARNING);
108 //Agrego si corresponde el espacio al inicio
109 if ($this->_configuracion['espacios']) {
114 foreach ($body as $bod) {
115 if (is_object($bod)) {
116 if (method_exists($bod,'toHtml')) {
117 $tmp.=$bod->toHtml();
120 trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING);
127 //Agrego si corresponde el espacio al final
128 if ($this->_configuracion['espacios']) {
133 $TABLA2->addRow($row, 'valign="top"');
134 $row = array ($TABLA2->toHtml());
135 $this->_tabla->setCellContents (0,2,$row);
136 $this->_tabla->setCellAttributes(0,2,'align="center" bgcolor="#FFFFFF" valign="top"');
138 $this->_tabla->updateColAttributes (1,'width="8" bgcolor="#FFFFFF"');
139 $this->_tabla->updateColAttributes (2,'width="600" bgcolor="#FFFFFF"');
144 } // -X2C Class :MECON_Marco_MenuVertical