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:33:41 ART 2003
22 Autor: Gonzalo Merayo <gmeray@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
27 require_once '../../lib/MECON/HTML/Arbol/ArbolDB.php';
28 require_once 'DB.php';
30 PEAR::setErrorHandling(PEAR_ERROR_TRIGGER);
32 $dsn = 'mysql://intranet:intranet@bal747f.mecon.ar/intranet';
33 $db =& DB::connect($dsn,true);
37 'tabla' => 'grupo_secciones',
40 'id_padre' => 'grupo_padre',
43 $arbol = new HTML_ArbolDB($dbdata, 'TITULO', 'noticias.php?grupo=');
44 echo '<link rel="stylesheet" href="'.$arbol->getCSS().'">';
45 echo $arbol->toHTML();
46 echo '<SELECT name="id">';
47 foreach ($arbol->toArray(false) as $id => $val) {
48 echo '<OPTION value="'.$id.'">'.$val.'</OPTION>';
51 echo '<SELECT name="id">';
52 foreach ($arbol->toArray(true) as $id => $val) {
53 echo '<OPTION value="'.$id.'">'.$val.'</OPTION>';
56 var_dump($arbol->setActivado(34));
57 echo $arbol->toHTML();
58 echo '<SELECT name="id">';
59 foreach ($arbol->toArray() as $id => $val) {
60 echo '<OPTION value="'.$id.'">'.$val.'</OPTION>';