-<?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: Mon Apr 14 16:23:22 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.
-#require_once 'PEAR.php';
+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: Mon Apr 14 16:23:22 2003
+Autor: Martin Marrese <mmarre@mecon.gov.ar>
+-------------------------------------------------------------------------------
+$Id$
+-----------------------------------------------------------------------------*/
// +X2C includes
require_once 'MECON/Marco/Pagina.php';
require_once 'MECON/Marco/MenuVertical.php';
require_once 'MECON/Marco/MenuOculto.php';
-
// +X2C Class 16 :Seccion
/**
* Clase seccion para el manejo de las secciones
*
+ * @package MECON_Marco
* @access public
*/
class Seccion extends Pagina {
*/
function Seccion($seccion, $configuracion) // ~X2C
{
- if (array_key_exists('nombre',$seccion)) {
- $this->_nombre = $seccion['nombre'];
+ $this->_nombre = @strval($seccion['nombre']);
+ $imgComun = @strval($seccion['imagenComun']);
+ $imgMouseOn = @strval($seccion['imagenMouseOn']);
+ $imgSelect = @strval($seccion['imagenSelect']);
+ $this->_tipoMenu = @strval($seccion['tipoMenu']);
+ if (@$seccion['link']) {
+ parent::Pagina($seccion['link']);
}
- if (array_key_exists('imagenComun', $seccion))
- $imgComun = $seccion['imagenComun'];
- else
- unset($imgComun);
- if (array_key_exists('imagenMouseOn', $seccion))
- $imgMouseOn = $seccion['imagenMouseOn'];
- else
- unset($imgMouseOn);
- if (array_key_exists('imagenSelect', $seccion))
- $imgSelect = $seccion['imagenSelect'];
- else
- unset($imgSelect);
- $this->_imagen = new ImagenAnimada($imgComun, $imgMouseOn, $imgSelect, $configuracion['directorios']['imagenes']);
-
- if (array_key_exists('tipoMenu', $seccion)) {
- $this->_tipoMenu = $seccion['tipoMenu'];
- }
+ $this->_imagen = new ImagenAnimada($imgComun, $imgMouseOn, $imgSelect,
+ $configuracion['directorios']['imagenes'], $this->_nombre,
+ $configuracion['directorios']['root'].'/'.$this->_link);
if (!is_null($configuracion)) {
$this->_configuracion = $configuracion;
}
- if (array_key_exists('link', $seccion)) {
- parent::Pagina($seccion['link']);
- }
if (array_key_exists('hijos', $seccion)) {
$this->_cargarHijos($seccion['hijos']);
}
function toHtml($link_sel) // ~X2C
{
if (isset($_SESSION['deshabilitar_links']) && $_SESSION['deshabilitar_links']) {
- $link_start = '';
- $link_end = '';
- $link_start2 = '';
+ $this->_imagen->setHabilitada(false);
}
- else {
- $link_start = '<a href="'.$this->_link.'">';
- $link_start2 = '<a href="'.$this->_link.'" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_displayStatusMsg(\''.$this->_nombre.'\'); MM_swapImage(\''.$this->_nombre.'\',\'\',\''.$this->_imagen->_imgMouseOn.'\',1); return document.MM_returnValue" MM_swapImage(\''.$this->_nombre.'\',\'\',\''.$this->_imagen->_imgMouseOn.'\',1)>';
- $link_end = '</a>';
- }
-
if ($this->verifSeccionSeleccionada($link_sel)) {
- $sec = $link_start."<img name=\"".$this->_nombre."\" src=\"".$this->_imagen->_imgSelect."\" border=\"0\" alt=\"".$this->_imagen->_alt."\">".$link_end;
- }
- else {
- $sec = $link_start2."<img name=\"".$this->_nombre."\" src=\"".$this->_imagen->_imgComun."\" border=\"0\" alt=\"".$this->_imagen->_alt."\">".$link_end;
+ $this->_imagen->setSeleccionada(true);
}
-
- return $sec;
+ return $this->_imagen->toHtml();
}
// -X2C
$link_end = '';
}
else {
- $link_start = '<a href="'.$this->_link.'" style="'.$style.'">';
+ $link_start = '<a href="'.$this->_configuracion['directorios']['root'].'/'.$this->_link.'" style="'.$style.'">';
$link_end = '</a>';
}
$sec = array ();
if ($this->verifSeccionSeleccionada($link_sel)) {
if ($ultimo) {
- $sec[] = $link_start.'<img src="/www/images/carp2_f3" border="0">'.$link_end;
+ $sec[] = $link_start.'<img src="/MECON/images/general_carp2_f3" border="0">'.$link_end;
}
else {
- $sec[] = $link_start.'<img src="/www/images/carp1_f3" border="0">'.$link_end;
+ $sec[] = $link_start.'<img src="/MECON/images/general_carp1_f3" border="0">'.$link_end;
}
}
else {
if ($ultimo) {
- $sec[] = $link_start.'<img src="/www/images/carp2_f2" border="0">'.$link_end;
+ $sec[] = $link_start.'<img src="/MECON/images/general_carp2_f2" border="0">'.$link_end;
}
else {
- $sec[] = $link_start.'<img src="/www/images/carp1_f2" border="0">'.$link_end;
+ $sec[] = $link_start.'<img src="/MECON/images/general_carp1_f2" border="0">'.$link_end;
}
}
} // -X2C Class :Seccion
-?>
+?>
\ No newline at end of file