X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/2ac30dee43deebe8da8babe95548470b9e822d0c..968c22c4e71bb075c2d472b1da4e29ff04a3f293:/sistema/www/servicios.php diff --git a/sistema/www/servicios.php b/sistema/www/servicios.php index 85a296b..caf3d85 100644 --- a/sistema/www/servicios.php +++ b/sistema/www/servicios.php @@ -1,37 +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' => '#FFFFFF')); - $seccion->addRow(array("Nombre(sin estilo)"), array('align' => 'center', - 'class' => 'arboltitulo', - 'background'=>'images/servicio_cabecera.gif', - 'height'=>32)); - $img = new HTML_Image('images/servicio_bullet.gif'); - $int =& new HTML_Table(array('width' =>'360', - 'border' => '0', - 'cellspacing' => '0', - 'cellpadding' => '0', - 'bgcolor' => '#FFFFFF', - 'background' => 'images/servicio_borde_sup.gif')); - $int->addRow(array($img, 'Nombre(sin estilo)',$img,'nombre'), - array('valign' => 'top')); - $int->updateColAttributes(0, array('width' => '10%')); - $int->updateColAttributes(1, array('width' => '40%')); - $int->updateColAttributes(2, array('width' => '10%')); - $int->updateColAttributes(3, array('width' => '40%')); - $seccion->addRow(array($int)); - $seccion->addRow(array($int)); - $seccion->addRow(array($int)); - $seccion->addRow(array(new HTML_Image('images/servicio_borde_inf.gif'))); - - $m->addBodyContent($seccion); $m->display(); ?>