]> git.llucax.com Git - mecon/meconlib.git/blobdiff - lib/MECON/HTML/Arbol.php
Se agrega la clase MECON_HTML_Error para mostrar errores.
[mecon/meconlib.git] / lib / MECON / HTML / Arbol.php
index 5dcea2b02f53c1d7bda0674ce4913ed0b340f140..c64b585d3dcd90465e503e34613b305aaacafc3c 100644 (file)
@@ -7,7 +7,7 @@ class HTML_Arbol extends HTML_Table
 {\r
     var $t_interna;\r
     \r
-    function HTML_Arbol($dat, $imagen)\r
+    function HTML_Arbol($dat, $titulo_str)\r
     {\r
         parent::HTML_Table(array ('width'=>'132',\r
                                   'border'   => '0',\r
@@ -19,9 +19,16 @@ class HTML_Arbol extends HTML_Table
                                   'cellspacing'   => '2',\r
                                   'cellpadding'   => '0',\r
                                   'class'   => 'bodytext'));\r
-        $this->addRow(array(new HTML_Image($imagen,'',array('width'=>'132',\r
-                                                           'height'=>'26',\r
-                                                           'border'=>'0'))));\r
+       $titulo = new HTML_Table(array('width'=>'132',\r
+                                      'height'=>'26',\r
+                                      'border' => '0',\r
+                                      'cellspacing' => '0',\r
+                                        'cellpadding' => '0',\r
+                                        'align'=>'center',\r
+                'background'=>'/MECON/images/arbol_titulo.gif'));\r
+        $titulo->addRow(array($titulo_str), array('align'=>'center',\r
+                                                 'class'=>'arboltitulo'));\r
+       $this->addRow(array($titulo), array('bgcolor' => '#FFFFFF'));\r
         $this->expandir($dat, 0);\r
     }\r
     \r
@@ -42,10 +49,10 @@ class HTML_Arbol extends HTML_Table
         foreach($dat as $e)\r
        {\r
            $e['titulo'] = $imagen->toHTML().$e['titulo'];\r
-           if(!is_null($e['link']))\r
-             $e['titulo'] = '<a href="'.$e['link'].'">'.$e['titulo'].'</a>';\r
            if(isset($e['activado']) && $e['activado'] != 0) $class = 'menu_activo';\r
            else $class = $classes[$n];\r
+           if(!is_null($e['link']))\r
+             $e['titulo'] = '<a href="'.$e['link'].'" class="'.$class.'">'.$e['titulo'].'</a>';\r
             $this->t_interna->addRow(array($e['titulo']), array('class' => $class));\r
            if(isset($e['sub']))\r
              $this->expandir($e['sub'], $n+1);\r