From: Gonzalo Merayo Date: Thu, 3 Jul 2003 16:40:38 +0000 (+0000) Subject: Cambio en Arbol, ahora usa HTML_Image X-Git-Tag: svn_import~405 X-Git-Url: https://git.llucax.com/mecon/meconlib.git/commitdiff_plain/33a81970240b498ed10f3ca688ae3578a013dfef Cambio en Arbol, ahora usa HTML_Image --- diff --git a/lib/MECON/HTML/Arbol.php b/lib/MECON/HTML/Arbol.php index bca4d58..5dcea2b 100644 --- a/lib/MECON/HTML/Arbol.php +++ b/lib/MECON/HTML/Arbol.php @@ -1,6 +1,7 @@ '2', 'cellpadding' => '0', 'class' => 'bodytext')); - $this->addRow(array('')); + $this->addRow(array(new HTML_Image($imagen,'',array('width'=>'132', + 'height'=>'26', + 'border'=>'0')))); $this->expandir($dat, 0); } + function expandir($dat, $n) { $imagen = ''; - $class = 'menu'; $bullets = array('', '/MECON/images/arbol_bullet_1.gif', '/MECON/images/arbol_bullet_2.gif', '/MECON/images/arbol_bullet_3.gif'); $tabulados = array(0, 7, 13, 20); $classes = array('menu', 'menu1', 'menu1', 'menu2'); - $imagen = ''; + + $atr = array('border' => '0', + 'width' => $tabulados[$n], + 'height' => '10'); + $imagen =& new HTML_Image($bullets[$n], 'bullet', $atr); foreach($dat as $e) { + $e['titulo'] = $imagen->toHTML().$e['titulo']; if(!is_null($e['link'])) - $e['titulo'] = ''.$imagen.$e['titulo'].''; - if(isset($e['activado']) && $e['activado'] != 0) $class_a = 'menu_activo'; - else $class_a = $classes[$n]; - $this->t_interna->addRow(array($e['titulo']), array('class' => $class_a)); + $e['titulo'] = ''.$e['titulo'].''; + if(isset($e['activado']) && $e['activado'] != 0) $class = 'menu_activo'; + else $class = $classes[$n]; + $this->t_interna->addRow(array($e['titulo']), array('class' => $class)); if(isset($e['sub'])) $this->expandir($e['sub'], $n+1); } } + function toHTML() { echo '';