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 $c= count($this->_componentes);
49 $tmp = $this->_componentes;
50 $this->_componentes = array ();
51 $this->_armarArraySecciones($tmp);
53 $TABLA = new HTML_Table('width=152 align="left" cellspacing="0"
54 cellpadding="0" border="0" height="1"
55 background="/MECON/images/general_titulo_menu.gif"');
57 $menutmp ='<font face="Arial, Helvetica, sans-serif" size="3"
58 color="#000000"><p> '.$titulo.'</p></font>';
59 $row = array ($menutmp);
60 $TABLA->addRow($row,'align="left"');
61 $TABLA->updateCellAttributes(0,0,'colspan="2"');
63 $SEP = array('<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=36>',
64 '<IMG height="3" src="/MECON/images/general_linea_relieve.gif" width=118>'
68 foreach ($this->_componentesVertical as $comp) {
69 $TABLA->addRow($comp,'align="left" height="3"
70 background="/MECON/images/general_fondo_gris"');
71 $TABLA->updateColAttributes(0,'align="right" width="34" height="3"');
72 $TABLA->updateColAttributes(1,'align="left" width="118"');
75 $TABLA->updateCellAttributes(0,0,'align="left"');
76 $row = array ($TABLA->toHtml());
78 $this->_tabla->addRow($row,'width=152 align="left" bgcolor="#FFFFFF" valign="top"');
81 $TABLA2 = new HTML_Table('width="600"align="right" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"');
84 //AGREGO EL MENU VERTICAL
86 if (is_object($menu)) {
87 if (method_exists($menu,'toHtml')) {
88 $tmp.=$menu->toHtml();
91 trigger_error('El metodo no existe!', E_USER_WARNING);
100 //Agrego si corresponde el espacio al inicio
101 if ($this->_configuracion['espacios']) {
105 foreach ($body as $bod) {
106 if (is_object($bod)) {
107 if (method_exists($bod,'toHtml')) {
108 $tmp.=$bod->toHtml();
111 trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING);
118 //Agrego si corresponde el espacio al final
119 if ($this->_configuracion['espacios']) {
123 $TABLA2->addRow($row, 'valign="top"');
124 $row = array ($TABLA2->toHtml());
125 $this->_tabla->setCellContents (0,2,$row);
126 $this->_tabla->setCellAttributes(0,2,'align="center" bgcolor="#FFFFFF" valign="top"');
128 $this->_tabla->updateColAttributes (1,'width="8" bgcolor="#FFFFFF"');
129 $this->_tabla->updateColAttributes (2,'width="600" bgcolor="#FFFFFF"');