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('', '/MECON/images/arbol_bullet_1.gif', '/MECON/images/arbol_bullet_2.gif', '/MECON/images/arbol_bullet3.gif');
\r
29 $tabulaciones = array(0, 7, 13, 20);
\r
30 $classes = array('menu', 'menu1', 'menu1', 'menu2');
\r
31 $imagen = '<img src="'.$bullets[$n].'"
\r
32 width="'.$tabulados[$n].'"
\r
36 if(!is_null($e['link']))
\r
37 $e['titulo'] = '<a href="'.$e['link'].'">'.$imagen.$e['titulo'].'</a>';
\r
38 if(isset($e['activado']) && $e['activado'] != 0) $class_a = 'menu_activo';
\r
39 else $class_a = $class[$n];
\r
40 $this->t_interna->addRow(array($e['titulo']), array('class' => $class_a));
\r
41 if(isset($e['sub']))
\r
42 $this->expandir($e['sub'], $n+1);
\r
47 echo '<link rel="stylesheet" href="/MECON/css/arbol.css">';
\r
48 $this->addRow(array($this->t_interna->toHTML()));
\r
49 return parent::toHTML();
\r