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: Wed May 7 13:05:08 2003
21 Autor: Martin Marrese <mmarre@mecon.gov.ar>
22 -------------------------------------------------------------------------------
24 -----------------------------------------------------------------------------*/
26 require_once 'MLIB/Marco/Menu.php';
27 require_once 'MLIB/HTML/Image.php';
30 * Clase que se encarga del manejo de los menues ocultos.
34 class MLIB_Marco_MenuOculto extends MLIB_Marco_Menu {
36 * Funcion para agregar el cuerpo de la pagina a la pagina
38 * @param string $body String con el cuerpo a 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 $this->resultado[] = $this->_armarEncabezado($titulo .
48 $this->_configuracion['subtitulo']);
49 $this->resultado[] =& new MLIB_HTML_Image(
50 '/MLIB/images/general_linea2.gif',
52 'border="0" align="center"');
54 $MENUVERTICAL = new HTML_Table ('width="760"');
56 if (is_array($body)) {
57 if ($this->_configuracion['espacios']) {
58 $cuerpo.= ' <BR>';
60 foreach ($body as $bod) {
61 if (is_object($bod)) {
62 if (method_exists($bod,'toHtml')) {
63 $cuerpo.= $bod->toHtml();
66 trigger_error('El metodo no existe! - '.
67 get_class($bod).'::toHtml()',
79 $MENUVERTICAL->addRow(array($menu, $cuerpo),
81 $MENUVERTICAL->updateColAttributes(0, 'width="10%"');
82 $this->resultado[] = $MENUVERTICAL;
85 //Agrego si corresponde el espacio al inicio
86 if ($this->_configuracion['espacios']) {
87 $this->resultado[] = ' <BR>';
89 $this->resultado = array_merge($this->resultado, $body);