1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
2 -------------------------------------------------------------------------------
4 -------------------------------------------------------------------------------
5 This file is part of mlib.
7 mlib is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2 of the License, or (at your option)
12 mlib is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License; if not,
17 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 Boston, MA 02111-1307 USA
19 -------------------------------------------------------------------------------
20 Creado: Tue Apr 29 12:35:45 2003
21 Autor: Martin Marrese <mmarre@mecon.gov.ar>
22 -------------------------------------------------------------------------------
24 -----------------------------------------------------------------------------*/
26 require_once 'MLIB/Marco/Menu.php';
29 * Clase que se encarga del manejo de los menues verticales
33 class MLIB_Marco_MenuVertical extends MLIB_Marco_Menu {
35 * Funcion para agregar el cuerpo de la pagina a la pagina
37 * @param string $body Cuerpo del mensaje para agregar a la pagina
38 * @param string $titulo Titulo de la seccion seleccionada
39 * @param mixed $menu Menu a mostrar
44 function addBody($body, $titulo, $menu = null)
46 $tmp = $this->_componentes;
47 $this->_componentes = array ();
48 $this->_armarArraySecciones($tmp);
50 $TABLA = new HTML_Table('width=152 align="left" cellspacing="0"
51 cellpadding="0" border="0" height="1"
52 background="/MLIB/images/general_titulo_menu.gif"');
53 $menutmp ='<div class="MLIB_marco_subtitle_vertical"> '.$titulo.'</div>';
54 $TABLA->addRow(array ($menutmp),'align="left"');
55 $TABLA->updateCellAttributes(0,0,'colspan="2"');
59 '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=36>',
60 '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=118>'
64 foreach ($this->_componentesVertical as $comp) {
65 $TABLA->addRow($comp,'align="left" height="3"
66 background="/MLIB/images/general_fondo_gris"');
67 $TABLA->updateColAttributes(0,
68 'align="right" width="34" height="3"');
69 $TABLA->updateColAttributes(1,'align="left" width="118"');
72 '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=36>',
73 '<IMG height="3" src="/MLIB/images/general_linea_relieve.gif" width=118>'
77 $TABLA->updateCellAttributes(0,0,'align="left"');
80 if (is_array($body)) {
81 if ($this->_configuracion['espacios']) {
82 $cuerpo.= ' <BR>';
84 foreach ($body as $bod) {
85 if (is_object($bod)) {
86 if (method_exists($bod,'toHtml')) {
87 $cuerpo.= $bod->toHtml();
90 trigger_error('El metodo no existe! - '.
91 get_class($bod).'::toHtml()',
105 $MENUVERTICAL = new HTML_Table ('width="608"
107 $MENUVERTICAL->addRow(array($menu, $cuerpo),
109 $MENUVERTICAL->updateColAttributes(0, 'width="10%"');
110 $cuerpo = $MENUVERTICAL;
113 $this->_tabla->addRow(array($TABLA, $cuerpo),'align="left" bgcolor="#FFFFFF" valign="top"');
114 $this->_tabla->updateColAttributes(0, 'width="10%"');
115 $this->resultado[] = $this->_tabla;