2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +----------------------------------------------------------------------+
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2003 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.02 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Created: Tue Apr 29 12:35:45 2003
17 // | Author: Martin Marrese <mmarre@mecon.gov.ar>
18 // +----------------------------------------------------------------------+
27 #require_once 'PEAR.php';
31 require_once 'Menu.php';
34 // +X2C Class 103 :MenuVertical
39 class MenuVertical extends Menu {
45 * Constructor. Recibe el nombre del directorio en donde esta instalado el sistema
47 * @param string $directorio Directorio en donde se encuentra el sistema
53 function MenuVertical($directorio = null) // ~X2C
55 parent::Menu($directorio);
61 * Funcion para agregar el cuerpo de la pagina a la pagina
63 * @param string $body Cuerpo del mensaje para agregar a la pagina
64 * @param string $titulo Titulo de la seccion seleccionada
70 function addBody($body, $titulo) // ~X2C
72 $c= count($this->_componentes);
74 $tmp = $this->_componentes;
75 $this->_componentes = array ();
76 $this->_armarArraySecciones($tmp);
78 $TABLA = new HTML_Table('width=160 align="left" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0" height="1"');
79 $menu ='<img src="/www/images/carpeta0" border="0"> <font face="Arial, Helvetica, sans-serif" size="2" color="#000000"><b>Submenú</b></font>';
81 $TABLA->addRow($row,'align="left" bgcolor="#FFFFFF" height="1"');
82 $TABLA->updateCellAttributes(0,0,'colspan="2"');
84 foreach ($this->_componentesVertical as $comp) {
85 $row = array ('<img src="/www/images/carp" border="0">',' ');
87 $TABLA->addRow($comp,'align="left" bgcolor="#FFFFFF" height="1"');
88 $TABLA->updateColAttributes(0,'align="right" width="34"');
89 $TABLA->updateColAttributes(1,'align="left"');
91 $TABLA->updateCellAttributes(0,0,'align="left"');
92 $row = array ($TABLA->toHtml());
93 $this->_tabla->addRow($row,'width=160 align="left" bgcolor="#FFFFFF" valign="top" rowspan="2"');
95 $tit = '<font face="Arial, Helvetica, sans-serif" size="3" color="#FFFFFF"><b>'.$titulo.'</b></font>';
97 $this->_tabla->setCellContents (0,1,$row);
98 $this->_tabla->setCellAttributes(0,1,'align="left" bgcolor="#336699"');
101 foreach ($body as $bod) {
102 if (is_object($bod)) {
103 if (method_exists($bod,'toHtml')) {
104 $tmp.=$bod->toHtml();
107 trigger_error('El metodo no existe! - '.get_class($bod).'::toHtml()', E_USER_WARNING);
115 $this->_tabla->setCellContents (1,1,$row);
116 $this->_tabla->setCellAttributes(1,1,'align="center" bgcolor="#FFFFFF"');
118 $this->_tabla->updateColAttributes (1,'width="600"');
122 } // -X2C Class :MenuVertical