-<?php
-// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2003 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 2.02 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/2_02.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Created: Tue Apr 29 12:35:45 2003
-// | Author: Martin Marrese <mmarre@mecon.gov.ar>
-// +----------------------------------------------------------------------+
-//
-// $Id$
-// $Author$
-// $URL$
-// $Date$
-// $Rev$
-//
+<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
+-------------------------------------------------------------------------------
+ Ministerio de EconomÃa
+ meconlib
+-------------------------------------------------------------------------------
+This file is part of meconlib.
+
+meconlib is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+meconlib is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License; if not,
+write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+Boston, MA 02111-1307 USA
+-------------------------------------------------------------------------------
+Creado: Tue Apr 29 12:35:45 2003
+Autor: Martin Marrese <mmarre@mecon.gov.ar>
+-------------------------------------------------------------------------------
+$Id$
+-----------------------------------------------------------------------------*/
#require_once 'PEAR.php';
// +X2C includes
-require_once 'Marco/Menu.php';
+require_once 'MECON/Marco/Menu.php';
// ~X2C
-// +X2C Class 100 :MenuHorizontal
+// +X2C Class 100 :MECON_Marco_MenuHorizontal
/**
* Clase que se encarga del manejo de los menues horizontales
*
+ * @package MECON_Marco
* @access public
*/
-class MenuHorizontal extends Menu {
+class MECON_Marco_MenuHorizontal extends MECON_Marco_Menu {
// ~X2C
-
- // +X2C Operation 111
- /**
- * Constructor. Recibe el nombre del directorio en donde esta instalado el sistema
- *
- * @param string $directorio Directorio en donde se encuentra la aplicacion
- *
- * @return void
- * @access public
- */
- function MenuHorizontal($directorio = null) // ~X2C
- {
- parent::Menu($directorio);
- }
- // -X2C
-
// +X2C Operation 139
/**
* Funcion para agregar el cuerpo de la pagina a la pagina
*
* @param string $body Body para agregar a la pagina
* @param string $titulo Titulo de la seccion seleccionada
+ * @param mixed $menu Menu a mostrar
*
* @return void
* @access public
*/
- function addBody($body, $titulo) // ~X2C
+ function addBody($body, $titulo, $menu = null) // ~X2C
{
- $c = count($this->_componentes);
-
- $tit = '<font face="Arial, Helvetica, sans-serif" size="3" color="#FFFFFF"><b>'.$titulo.'</b></font>';
- $row = array ($tit);
- $this->_tabla->addRow($row,'align="left" bgcolor="#336699" colspan="'.$c.'"');
-
+
$tmp = $this->_componentes;
$this->_componentes = array ();
$this->_armarArraySecciones($tmp);
- $this->_tabla->addRow($this->_componentes,'align="center" bgcolor="#FFFFFF"');
-
+ $this->_tabla->addRow($this->_componentes,'align="center" bgcolor="#CCCCCC" valign="top"');
+ $c = count($this->_componentes);
$colcount = $this->_tabla->getColCount();
$width = 100 / $colcount;
for ($col=0; $col < $colcount; $col++) {
$this->_tabla->updateColAttributes($col,'width="'.$width.'%"');
}
+
+ $imagen = new HTML_Image('/MECON/images/general_linea.gif');
+ $i = $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$c.'"');
+ $this->_tabla->updateRowAttributes($i, 'height="1"');
+
+ //Agrego el titulo
+ $row = array ($this->_armarEncabezado($titulo));
+ $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$c.'"');
+ $imagen = new HTML_Image('/MECON/images/general_linea2.gif', 'boder="0" align="center"');
+ $this->_tabla->addRow(array ($imagen->toHtml()), 'align="center" colspan="'.$c.'"');
+ //
+
$tmp='';
+
+ //Agrego si corresponde el espacio al inicio
+ if ($this->_configuracion['espacios']) {
+ $row = array (' ');
+ $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$c.'"');
+ }
+ //
+ //AGREGO EL MENU VERTICAL
+ $TABLA = new HTML_Table('width=760 align="center" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" border="0"');
+ $row = array();
+ $tmp = '';
+ if ($menu) {
+ if (is_object($menu)) {
+ if (method_exists($menu,'toHtml')) {
+ $tmp.=$menu->toHtml();
+ }
+ else {
+ trigger_error('El metodo no existe!', E_USER_WARNING);
+ }
+ }
+ else {
+ $tmp.=$menu;
+ }
+ $row[] = $tmp;
+ }
+ $tmp = '';
foreach ($body as $bod) {
if (is_object($bod)) {
if (method_exists($bod,'toHtml')) {
$tmp.=$bod;
}
}
- $row = array ($tmp);
- $this->_tabla->addRow($row,'align="center" bgcolor="#FFFFFF" colspan="'.$c.'"');
+ $row[] = $tmp;
+ $TABLA->addRow($row);
+ $row = array ($TABLA->toHtml());
+ $this->_tabla->addRow($row,'align="center" bgcolor="#FFFFFF" colspan="'.$c.'" valign="top"');
+ //Agrego si corresponde el espacio al final
+ if ($this->_configuracion['espacios']) {
+ $row = array (' ');
+ $this->_tabla->addRow($row,'align="left" bgcolor="#FFFFFF" colspan="'.$c.'"');
+ }
+ //
}
// -X2C
-} // -X2C Class :MenuHorizontal
+} // -X2C Class :MECON_Marco_MenuHorizontal
?>
\ No newline at end of file