X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/53e18344699b0c7545128534f757e4d4f3ec639f..5bd45a75b2d9ea8c47d6a0ca9940bac005db04eb:/sistema/www/servicios.php?ds=sidebyside diff --git a/sistema/www/servicios.php b/sistema/www/servicios.php index 9831cf0..8253b1a 100644 --- a/sistema/www/servicios.php +++ b/sistema/www/servicios.php @@ -1,11 +1,53 @@ 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, true, AI_SERVICIO_ORDEN_LONG_HIJOS); + $col_par = ''; + $col_impar = ''; + $impar = true; + $otro = false; + foreach($serv->getHijos() as $s) + { + $sh =& new HTML_Servicio($s->servicio); + if($impar) + { + $col_impar .= $sh->toHTML().'
'; + if ($otro) $otro = false; + else + { + $impar = false; + $otro = true; + } + } + else + { + $col_par .= $sh->toHTML().'
'; + if ($otro) $otro = false; + else + { + $impar = true; + $otro = 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); - $seccion =& new HTML_Servicio(1); - - $m->addBodyContent($seccion); $m->display(); ?>