X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/39a56906821b30ffdc025a2b05cf2026d1b83037..949f38b57fda7ac5269ffe9418753ad5b9765a29:/sistema/www/servicios.php?ds=inline diff --git a/sistema/www/servicios.php b/sistema/www/servicios.php index 55bd5fa..caf3d85 100644 --- a/sistema/www/servicios.php +++ b/sistema/www/servicios.php @@ -1,39 +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_Table(array('width' =>'360', - 'border' => '0', - 'cellspacing' => '0', - 'cellpadding' => '0', - 'bgcolor' => '#003868')); - $seccion->addRow(array("Nombre(sin estilo)"), array('align' => 'center', - 'class' => 'arboltitulo', - 'background'=>'images/servicio_cabecera.gif', - 'height'=>32)); - $tmp =& new HTML_Table(array ('width' =>'100%', - 'border' => '0', - 'cellspacing' => '2', - 'cellpadding' => '0', - 'class' => 'bodytext')); - $interna =& new HTML_Table(array ('width' =>'100%')); - $img = new HTML_Image('images/servicio_bullet.gif'); - $interna->addRow(array($img, 'Nombre(sin estilo) ffffff',$img,'nombre'), - array('valign' => 'top')); - $interna->addRow(array($img, 'Nombre(sin estilo)',$img,'nombre'), - array('valign' => 'top')); - $interna->addRow(array($img, 'Nombre(sin estilo)',$img,'nombre'), - array('valign' => 'top')); - $interna->updateColAttributes(0, array('width' => '10%')); - $interna->updateColAttributes(1, array('width' => '40%')); - $interna->updateColAttributes(2, array('width' => '10%')); - $interna->updateColAttributes(3, array('width' => '40%')); - $tmp->addRow(array($interna), array('bgcolor' => '#FFFFFF')); - $seccion->addRow(array($tmp), array('bgcolor' => '#003868')); - - $m->addBodyContent($seccion); $m->display(); ?>