-<?\r
-\r
-require_once 'HTML/Table.php';\r
-\r
-class HTML_Arbol extends HTML_Table\r
-{\r
- var $t_interna;\r
- \r
- function HTML_Arbol($dat, $imagen)\r
- {\r
- parent::HTML_Table(array ('width'=>'132',\r
- 'border' => '0',\r
- 'cellspacing' => '0',\r
- 'cellpadding' => '0',\r
- 'bgcolor' => '#003868'));\r
- $this->t_interna = new HTML_Table(array ('width'=>'132',\r
- 'border' => '0',\r
- 'cellspacing' => '2',\r
- 'cellpadding' => '0',\r
- 'class' => 'bodytext'));\r
- $this->addRow(array('<img src="'.$imagen.'" width="132" height="26" border="0">'));\r
- $this->expandir($dat, 0);\r
- }\r
- function expandir($dat, $n)\r
- {\r
- $imagen = '';\r
- $class = 'menu';\r
- $bullets = array('',\r
- '/MECON/images/arbol_bullet_1.gif',\r
- '/MECON/images/arbol_bullet_2.gif',\r
- '/MECON/images/arbol_bullet_3.gif');\r
- $tabulados = array(0, 7, 13, 20);\r
- $classes = array('menu', 'menu1', 'menu1', 'menu2');\r
- $imagen = '<img src="'.$bullets[$n].'"\r
- width="'.$tabulados[$n].'"\r
- height="10">';\r
- foreach($dat as $e)\r
- {\r
- if(!is_null($e['link']))\r
- $e['titulo'] = '<a href="'.$e['link'].'">'.$imagen.$e['titulo'].'</a>';\r
- if(isset($e['activado']) && $e['activado'] != 0) $class_a = 'menu_activo';\r
- else $class_a = $classes[$n];\r
- $this->t_interna->addRow(array($e['titulo']), array('class' => $class_a));\r
- if(isset($e['sub']))\r
- $this->expandir($e['sub'], $n+1);\r
- }\r
- }\r
- function toHTML()\r
- {\r
- echo '<link rel="stylesheet" href="/MECON/css/arbol.css">';\r
- $this->addRow(array($this->t_interna->toHTML()));\r
- return parent::toHTML();\r
- }\r
-};\r
-\r
-?>\r
+<?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: jue jul 17 15:32:52 ART 2003
+Autor: Gonzalo Merayo <gmeray@mecon.gov.ar>
+-------------------------------------------------------------------------------
+$Id$
+-----------------------------------------------------------------------------*/
+
+require_once 'HTML/Table.php';
+require_once 'HTML/Image.php';
+
+class HTML_Arbol extends HTML_Table
+{
+ var $t_interna;
+
+ function HTML_Arbol($dat, $titulo_str)
+ {
+ parent::HTML_Table(array ('width'=>'132',
+ 'border' => '0',
+ 'cellspacing' => '0',
+ 'cellpadding' => '0',
+ 'bgcolor' => '#003868'));
+ $this->t_interna = new HTML_Table(array ('width'=>'132',
+ 'border' => '0',
+ 'cellspacing' => '2',
+ 'cellpadding' => '0',
+ 'class' => 'bodytext'));
+ $titulo = new HTML_Table(array('width'=>'132',
+ 'height'=>'26',
+ 'border' => '0',
+ 'cellspacing' => '0',
+ 'cellpadding' => '0',
+ 'align'=>'center',
+ 'background'=>'/MECON/images/arbol_titulo.gif'));
+ $titulo->addRow(array($titulo_str), array('align'=>'center',
+ 'class'=>'arboltitulo'));
+ $this->addRow(array($titulo), array('bgcolor' => '#FFFFFF'));
+ $this->expandir($dat, 0);
+ }
+
+ function expandir($dat, $n)
+ {
+ $imagen = '';
+ $bullets = array(
+ '',
+ '/MECON/images/arbol_bullet_1.gif',
+ '/MECON/images/arbol_bullet_2.gif',
+ '/MECON/images/arbol_bullet_3.gif'
+ );
+ $tabulados = 7;
+ $classes = array('menu', 'menu1', 'menu1', 'menu2');
+
+ $atr = array('border' => '0',
+ 'width' => $n * $tabulados,
+ 'height' => '10');
+ $imagen =& new HTML_Image(@$bullets[$n] ? $bullets[$n] : '', 'bullet', $atr);
+ foreach($dat as $e)
+ {
+ $e['titulo'] = $imagen->toHTML().$e['titulo'];
+ if(isset($e['activado']) && $e['activado'] != 0) $class = 'menu_activo';
+ else $class = $classes[$n];
+ if(!is_null($e['link']))
+ $e['titulo'] = '<a href="'.$e['link'].'" class="'.$class.'">'.$e['titulo'].'</a>';
+ $this->t_interna->addRow(array($e['titulo']), array('class' => $class));
+ if(isset($e['sub']))
+ $this->expandir($e['sub'], $n+1);
+ }
+ }
+
+ function toHTML()
+ {
+ echo '<link rel="stylesheet" href="/MECON/css/arbol.css">';
+ $this->addRow(array($this->t_interna->toHTML()));
+ return parent::toHTML();
+ }
+};
+
+?>