3 require_once 'MECON/HTML/Arbol.php';
8 class HTML_ArbolDB extends HTML_Arbol
17 function HTML_ArbolDB($dbdata, $imagen)
19 if(isset($dbdata['id_padre']))
20 $this->padre = $dbdata['id_padre'];
21 $this->tabla = $dbdata['tabla'];
22 $this->nombre = $dbdata['nombre'];
23 $this->id = $dbdata['id'];
24 $this->link = $dbdata['link'];
25 $this->db = $dbdata['db'];
26 $dat = $this->BuscarHijos(0);
27 parent::HTML_Arbol($dat, $imagen);
30 function BuscarHijos($id)
32 $sql = "SELECT $this->nombre, $this->id
34 if(!is_null($this->padre))
35 $sql .= "WHERE $this->padre = '$id'";
36 $result = $this->db->query($sql);
37 if(DB::isError($result))
38 die($result->getMessage());
40 while($row = $result->fetchRow())
44 if(is_null($this->padre)) $sub = array();
45 else $sub = $this->BuscarHijos($id);
48 'link' => $this->link.$id,