X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/53e18344699b0c7545128534f757e4d4f3ec639f..30b342a8563ec023a0fdd4b37a690bd21311c33a:/sistema/www/servicios.php?ds=sidebyside diff --git a/sistema/www/servicios.php b/sistema/www/servicios.php index 9831cf0..3268be9 100644 --- a/sistema/www/servicios.php +++ b/sistema/www/servicios.php @@ -1,11 +1,42 @@ 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().'
'; + $impar = false; + } + else + { + $col_par .= $sh->toHTML().'
'; + $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); - $seccion =& new HTML_Servicio(1); - - $m->addBodyContent($seccion); $m->display(); ?>