-<body bgcolor="#FFFFFF" class="subtitulo" link="#003366" vlink="#660066" alink="#0066FF" topmargin="0">
<?
- require_once '../local_lib/copete.php';
- $c = new Copete('servicios');
- echo $c->toHTML();
+ require_once '../local_lib/HTML_DietMarco.php';
+ require_once '../local_lib/HTML_Servicio.php';
+ require_once 'AI/Servicio.php';
+// require_once 'AI/DB.php';
+ require_once 'DB.php';
+ $m = new HTML_DietMarco('servicios');
+ $m->addTitle('Servicios');
+
+ $n_serv = 0;
+ if(isset($_GET['servicios']))
+ $n_serv = $_GET['servicios'];
+ $serv = new AI_Servicio($n_serv);
+ //$bd = AI_DB::Connect();
+ $bd = DB::Connect('mysql://intranet:intranet@bal747f/intranet');
+ $serv->cargar($bd);
+ $serv->cargarHijos($bd);
+ $col_par = '';
+ $col_impar = '';
+ $impar = true;
+ foreach($serv->getHijos() as $s)
+ {
+ $sh =& new HTML_Servicio($s->servicio);
+ if($impar)
+ {
+ $col_impar .= $sh->toHTML().'<br>';
+ $impar = false;
+ }
+ else
+ {
+ $col_par .= $sh->toHTML().'<br>';
+ $impar = true;
+ }
+ }
+ $m->addStyleSheet($sh->getCSS());
+ $tabla =& new HTML_Table(array('width' => 760,
+ 'cellspacing' => 10));
+ $tabla->addRow(array($col_impar, $col_par), array('valign'=>'top'));
+ $m->addBodyContent($tabla);
- require_once '../local_lib/intranetdb.php';
- require_once 'MECON/HTML/Arbol/ArbolDB.php';
- $db = IntranetDB::connect();
- $dbdata = array(
- 'db' => $db,
- 'tabla' => 'servicio',
- 'id' => 'servicio',
- 'nombre' => 'nombre',
- 'id_padre' => 'servicio_padre',
- 'link' => 'link');
- $arbol = new HTML_ArbolDB($dbdata, '/MECON/images/arbol_noticias.gif');
- echo $arbol->toHTML();
+ $m->display();
?>
-</body>