3 require_once 'HTML/Table.php';
\r
5 class HTML_Arbol extends HTML_Table
\r
9 function HTML_Arbol($dat, $imagen)
\r
11 parent::HTML_Table(array ('width'=>'132',
\r
13 'cellspacing' => '0',
\r
14 'cellpadding' => '0',
\r
15 'bgcolor' => '#003868'));
\r
16 $this->t_interna = new HTML_Table(array ('width'=>'132',
\r
18 'cellspacing' => '2',
\r
19 'cellpadding' => '0',
\r
20 'class' => 'bodytext'));
\r
21 $this->addRow(array('<img src="'.$imagen.'" width="132" height="26" border="0">'));
\r
22 $this->expandir($dat, 0);
\r
24 function expandir($dat, $n)
\r
28 $bullets = array('',
\r
29 '/MECON/images/arbol_bullet_1.gif',
\r
30 '/MECON/images/arbol_bullet_2.gif',
\r
31 '/MECON/images/arbol_bullet3.gif');
\r
32 $tabulados = array(0, 7, 13, 20);
\r
33 $classes = array('menu', 'menu1', 'menu1', 'menu2');
\r
34 $imagen = '<img src="'.$bullets[$n].'"
\r
35 width="'.$tabulados[$n].'"
\r
39 if(!is_null($e['link']))
\r
40 $e['titulo'] = '<a href="'.$e['link'].'">'.$imagen.$e['titulo'].'</a>';
\r
41 if(isset($e['activado']) && $e['activado'] != 0) $class_a = 'menu_activo';
\r
42 else $class_a = $classes[$n];
\r
43 $this->t_interna->addRow(array($e['titulo']), array('class' => $class_a));
\r
44 if(isset($e['sub']))
\r
45 $this->expandir($e['sub'], $n+1);
\r
50 echo '<link rel="stylesheet" href="/MECON/css/arbol.css">';
\r
51 $this->addRow(array($this->t_interna->toHTML()));
\r
52 return parent::toHTML();
\r