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: Wed May 7 13:05:08 2003
22 Autor: Martin Marrese <mmarre@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
27 require_once 'MECON/Marco/Menu.php';
28 require_once 'MECON/HTML/Image.php';
31 * Clase que se encarga del manejo de los menues ocultos.
35 class MECON_Marco_MenuOculto extends MECON_Marco_Menu {
37 * Funcion para agregar el cuerpo de la pagina a la pagina
39 * @param string $body String con el cuerpo a agregar a la pagina
40 * @param string $titulo Titulo de la seccion seleccionada
41 * @param mixed $menu Menu a mostrar
46 function addBody($body, $titulo, $menu = null)
48 $this->resultado[] = $this->_armarEncabezado($titulo .
49 $this->_configuracion['subtitulo']);
50 $this->resultado[] =& new MECON_HTML_Image(
51 '/MECON/images/general_linea2.gif',
53 'border="0" align="center"');
55 $MENUVERTICAL = new HTML_Table ('width="760" align="left"');
57 if (is_array($body)) {
58 if ($this->_configuracion['espacios']) {
59 $cuerpo.= ' <BR>';
61 foreach ($body as $bod) {
62 if (is_object($bod)) {
63 if (method_exists($bod,'toHtml')) {
64 $cuerpo.= $bod->toHtml();
67 trigger_error('El metodo no existe! - '.
68 get_class($bod).'::toHtml()',
80 $MENUVERTICAL->addRow(array($menu, $cuerpo),
82 $MENUVERTICAL->updateColAttributes(0, 'width="10%"');
83 $this->resultado[] = $MENUVERTICAL;
86 //Agrego si corresponde el espacio al inicio
87 if ($this->_configuracion['espacios']) {
88 $this->resultado[] = ' <BR>';
90 $this->resultado = array_merge($this->resultado, $body);