3 require_once 'HTML/Table.php';
\r
4 require_once 'HTML/Image.php';
\r
6 class HTML_Arbol extends HTML_Table
\r
10 function HTML_Arbol($dat, $imagen)
\r
12 parent::HTML_Table(array ('width'=>'132',
\r
14 'cellspacing' => '0',
\r
15 'cellpadding' => '0',
\r
16 'bgcolor' => '#003868'));
\r
17 $this->t_interna = new HTML_Table(array ('width'=>'132',
\r
19 'cellspacing' => '2',
\r
20 'cellpadding' => '0',
\r
21 'class' => 'bodytext'));
\r
22 /* $this->addRow(array(new HTML_Image($imagen,'',array('width'=>'132',
\r
24 'border'=>'0'))));*/
\r
25 /* $titulo = new HTML_Table(array('width'=>'132',
\r
28 'cellspacing' => '0',
\r
29 'cellpadding' => '0',
\r
31 'background'=>'/MECON/images/arbol_titulo.gif'));
\r
32 $titulo->addRow(array('<font size="2"><b class="arbol_titulo">aa</b></font>'), array('align'=>'center'));
\r
33 $this->addRow(array($titulo));*/
\r
34 $this->addRow(array('<table width="132" border="0" cellspacing="0" cellpadding="0" background="/MECON/images/arbol_titulo.gif" height="26">
\r
35 <tr align="center">
\r
36 <td><font size="2"><b class="arbol_titulo">NOTICIAS</b></font></td>
\r
39 $this->expandir($dat, 0);
\r
42 function expandir($dat, $n)
\r
45 $bullets = array('',
\r
46 '/MECON/images/arbol_bullet_1.gif',
\r
47 '/MECON/images/arbol_bullet_2.gif',
\r
48 '/MECON/images/arbol_bullet_3.gif');
\r
49 $tabulados = array(0, 7, 13, 20);
\r
50 $classes = array('menu', 'menu1', 'menu1', 'menu2');
\r
52 $atr = array('border' => '0',
\r
53 'width' => $tabulados[$n],
\r
55 $imagen =& new HTML_Image($bullets[$n], 'bullet', $atr);
\r
58 $e['titulo'] = $imagen->toHTML().$e['titulo'];
\r
59 if(isset($e['activado']) && $e['activado'] != 0) $class = 'menu_activo';
\r
60 else $class = $classes[$n];
\r
61 if(!is_null($e['link']))
\r
62 $e['titulo'] = '<a href="'.$e['link'].'" class="'.$class.'">'.$e['titulo'].'</a>';
\r
63 $this->t_interna->addRow(array($e['titulo']), array('class' => $class));
\r
64 if(isset($e['sub']))
\r
65 $this->expandir($e['sub'], $n+1);
\r
71 echo '<link rel="stylesheet" href="/MECON/css/arbol.css">';
\r
72 $this->addRow(array($this->t_interna->toHTML()));
\r
73 return parent::toHTML();
\r