X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/d611eeb548173732a4b05955d98408fcc69fff64..0520607cdb3e5d7347ed08bfe8c2a4dfaeefee15:/lib/MECON/HTML/Arbol.php
diff --git a/lib/MECON/HTML/Arbol.php b/lib/MECON/HTML/Arbol.php
index 4931356..5cc2660 100644
--- a/lib/MECON/HTML/Arbol.php
+++ b/lib/MECON/HTML/Arbol.php
@@ -6,7 +6,7 @@ class HTML_Arbol extends HTML_Table
{
var $t_interna;
- function Arbol($dat)
+ function HTML_Arbol($dat, $imagen)
{
parent::HTML_Table(array ('width'=>'132',
'border' => '0',
@@ -18,30 +18,28 @@ class HTML_Arbol extends HTML_Table
'cellspacing' => '2',
'cellpadding' => '0',
'class' => 'bodytext'));
- $this->addRow(array(''));
+ $this->addRow(array(''));
$this->expandir($dat, 0);
}
function expandir($dat, $n)
{
$imagen = '';
- $class = 'menu';
- switch($n){
- case 1: $imagen = '';
- $class = 'menu1';
- break;
- case 2: $imagen = '';
- $class = 'menu1';
- break;
- case 3: $imagen = '';
- $class = 'menu2';
- break;
- }
+ $class = 'menu';
+ $bullets = array('',
+ '/MECON/images/arbol_bullet_1.gif',
+ '/MECON/images/arbol_bullet_2.gif',
+ '/MECON/images/arbol_bullet3.gif');
+ $tabulados = array(0, 7, 13, 20);
+ $classes = array('menu', 'menu1', 'menu1', 'menu2');
+ $imagen = '';
foreach($dat as $e)
{
if(!is_null($e['link']))
$e['titulo'] = ''.$imagen.$e['titulo'].'';
if(isset($e['activado']) && $e['activado'] != 0) $class_a = 'menu_activo';
- else $class_a = $class;
+ else $class_a = $classes[$n];
$this->t_interna->addRow(array($e['titulo']), array('class' => $class_a));
if(isset($e['sub']))
$this->expandir($e['sub'], $n+1);
@@ -49,7 +47,7 @@ class HTML_Arbol extends HTML_Table
}
function toHTML()
{
- echo '';
+ echo '';
$this->addRow(array($this->t_interna->toHTML()));
return parent::toHTML();
}