1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
2 -------------------------------------------------------------------------------
3 Ministerio de EconomÃa
5 -------------------------------------------------------------------------------
6 This file is part of meconlib.
8 meconlib is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your option)
13 meconlib is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License; if not,
18 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA
20 -------------------------------------------------------------------------------
21 Creado: jue jul 17 15:32:52 ART 2003
22 Autor: Gonzalo Merayo <gmeray@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
27 require_once 'HTML/Table.php';
28 require_once 'HTML/Image.php';
30 class HTML_Arbol extends HTML_Table
34 function HTML_Arbol($dat, $titulo_str)
36 parent::HTML_Table(array ('width'=>'132',
40 'bgcolor' => '#003868'));
41 $this->t_interna = new HTML_Table(array ('width'=>'132',
45 'class' => 'bodytext'));
46 $titulo = new HTML_Table(array('width'=>'132',
52 'background'=>'/MECON/images/arbol_titulo.gif'));
53 $titulo->addRow(array($titulo_str), array('align'=>'center',
54 'class'=>'arboltitulo'));
55 $this->addRow(array($titulo), array('bgcolor' => '#FFFFFF'));
56 $this->expandir($dat, 0);
59 function expandir($dat, $n)
64 '/MECON/images/arbol_bullet_1.gif',
65 '/MECON/images/arbol_bullet_2.gif',
66 '/MECON/images/arbol_bullet_3.gif'
69 $classes = array('menu', 'menu1', 'menu1', 'menu2');
71 $atr = array('border' => '0',
72 'width' => $n * $tabulados,
74 $imagen =& new HTML_Image(@$bullets[$n] ? $bullets[$n] : '', 'bullet', $atr);
77 $e['titulo'] = $imagen->toHTML().$e['titulo'];
78 if(isset($e['activado']) && $e['activado'] != 0) $class = 'menu_activo';
79 else $class = $classes[$n];
80 if(!is_null($e['link']))
81 $e['titulo'] = '<a href="'.$e['link'].'" class="'.$class.'">'.$e['titulo'].'</a>';
82 $this->t_interna->addRow(array($e['titulo']), array('class' => $class));
84 $this->expandir($e['sub'], $n+1);
90 echo '<link rel="stylesheet" href="/MECON/css/arbol.css">';
91 $this->addRow(array($this->t_interna->toHTML()));
92 return parent::toHTML();