From eb86d04858357c87d5d7a7e3cb528ef24949b725 Mon Sep 17 00:00:00 2001 From: Gonzalo Merayo Date: Fri, 25 Jul 2003 19:58:47 +0000 Subject: [PATCH] estandarizo nombre de estilos. listo servicios --- sistema/local_lib/HTML_Copete.php | 16 ++--- sistema/local_lib/HTML_Noticia.php | 28 ++++----- sistema/local_lib/HTML_Servicio.php | 93 +++++++++++++++++++++-------- sistema/www/css/copete.css | 6 +- sistema/www/css/noticias.css | 14 ++--- sistema/www/css/servicio.css | 6 ++ sistema/www/servicios.php | 36 ++++++++++- 7 files changed, 140 insertions(+), 59 deletions(-) create mode 100644 sistema/www/css/servicio.css diff --git a/sistema/local_lib/HTML_Copete.php b/sistema/local_lib/HTML_Copete.php index 9d09a4d..78b3c8c 100644 --- a/sistema/local_lib/HTML_Copete.php +++ b/sistema/local_lib/HTML_Copete.php @@ -79,31 +79,31 @@ parent::HTML_Table(array('width' => '760', switch($seccion) { case 'noticias': $fila[] = 'Enlaces útiles: - + Ministerio de Economía y Producción - - + Boletín Oficial - - + INFOLEG - - + CDI '; break; - case 'servicios': $fila[] = 'Servicios'; + case 'servicios': $fila[] = 'Servicios'; break; - case 'sistemas': $fila[] = 'Sistemas'; + case 'sistemas': $fila[] = 'Sistemas'; break; } $fila[] = ''; - $this->addRow($fila, array('class' => 'titulo_vinculos')); + $this->addRow($fila, array('class' => 'copete_titulo_vinculos')); } // -X2C } // -X2C Class :HTML_Copete -?> \ No newline at end of file +?> diff --git a/sistema/local_lib/HTML_Noticia.php b/sistema/local_lib/HTML_Noticia.php index 901a5ac..87ce96f 100644 --- a/sistema/local_lib/HTML_Noticia.php +++ b/sistema/local_lib/HTML_Noticia.php @@ -67,42 +67,42 @@ class HTML_Noticia extends HTML_Table { { if($this->completa) { - $this->addRow(array($this->noticia->getSeccion()), array('class' => 'titulo_uno')); + $this->addRow(array($this->noticia->getSeccion()), array('class' => 'noticias_titulo_uno')); $this->addRow(array(new HTML_Image('images/noticia_linea_azul.gif')), array('class' => 'ver_mas')); - $this->addRow(array($this->noticia->getTitulo()), array('class' => 'textoazul')); - $this->addRow(array($this->noticia->getTitulo2()), array('class' => 'titulo_vinculos')); - $this->addRow(array($this->noticia->getTexto()), array('class' => 'titulo_noticia')); + $this->addRow(array($this->noticia->getTitulo()), array('class' => 'noticias_textoazul')); + $this->addRow(array($this->noticia->getTitulo2()), array('class' => 'noticias_titulo_vinculos')); + $this->addRow(array($this->noticia->getTexto()), array('class' => 'noticias_titulo_noticia')); $tmp = $this->noticia->getFecha(); $this->addRow(array($tmp->format('Fecha de publicación: %d/%m/%Y')), - array('class' => 'ver_mas')); + array('class' => 'noticias_ver_mas')); $this->addRow(array(new HTML_Image('images/blanco.gif','', array('height'=>'15', 'width'=>'1', 'border'=>'0'))), - array('class' => 'ver_mas')); + array('class' => 'noticias_ver_mas')); $tmp = new HTML_Image('images/noticia_anterior.gif'); - $this->addRow(array("".$tmp->toHTML(). + $this->addRow(array("".$tmp->toHTML(). 'volver'), - array('class' => 'ver_mas')); + array('class' => 'noticias_ver_mas')); } else { $this->addRow(array($this->noticia->getSeccion()), - array('class' => 'subtitulo')); + array('class' => 'noticias_subtitulo')); $img_str = null; if($this->nuevo) { $nuevo = new HTML_Image('images/noticia_nuevo.gif'); $img_str = ' '.$nuevo->toHTML(); } - $this->addRow(array("".$this->noticia->getTitulo().$img_str.''), array('class' => 'titulo_noticia')); + $this->addRow(array("".$this->noticia->getTitulo().$img_str.''), array('class' => 'noticias_titulo_noticia')); $tmp = $this->noticia->getFecha(); $this->addRow(array($tmp->format('(%d/%m/%Y)')), - array('class' => 'fecha_noticia')); + array('class' => 'noticias_fecha_noticia')); $mas = new HTML_Image('images/noticia_mas.gif'); - $this->addRow(array("".$mas->toHTML().' ver más'), - array('class' => 'ver_mas')); + $this->addRow(array("".$mas->toHTML().' ver más'), + array('class' => 'noticias_ver_mas')); $this->addRow(array(new HTML_Image('images/noticia_linea_puntos.gif')), - array('class' => 'ver_mas')); + array('class' => 'noticias_ver_mas')); } return parent::toHTML(); } diff --git a/sistema/local_lib/HTML_Servicio.php b/sistema/local_lib/HTML_Servicio.php index ea8977f..ee65e0f 100644 --- a/sistema/local_lib/HTML_Servicio.php +++ b/sistema/local_lib/HTML_Servicio.php @@ -29,6 +29,10 @@ require_once 'HTML/Image.php'; +require_once 'HTML/Link.php'; +require_once 'DB.php'; +require_once 'AI/Servicio.php'; +// require_once 'AI/DB.php'; // +X2C includes require_once 'HTML/Table.php'; @@ -54,7 +58,12 @@ class HTML_Servicio extends HTML_Table { 'border' => '0', 'cellspacing' => '0', 'cellpadding' => '0', - 'bgcolor' => '#FFFFFF')); + 'bgcolor' => '#FFFFFF', + 'class' => 'servicio_tabla')); + $bd = DB::Connect('mysql://intranet:intranet@bal747f/intranet'); + $this->servicio = new AI_Servicio($seccion); + $this->servicio->cargar($bd); + $this->servicio->cargarHijos($bd); } // -X2C @@ -65,32 +74,68 @@ class HTML_Servicio extends HTML_Table { */ function toHTML() // ~X2C { - $this->addRow(array("Nombre(sin estilo)"), + echo ''; + if($this->servicio->link == '') + $this->servicio->link = 'servicios.php?servicios='.$this->servicio->servicio; + $l = new HTML_Link($this->servicio->link, $this->servicio->nombre, array(), + array('class' => 'servicio_titulo_tabla')); + $this->addRow(array('   '.$l->toHTML()), array('align' => 'center', 'class' => 'arboltitulo', 'background'=>'images/servicio_cabecera.gif', - 'height'=>30)); - $img = new HTML_Image('images/servicio_bullet.gif'); - $int =& new HTML_Table(array('width' =>'360', - 'border' => '0', - 'cellspacing' => '0', - 'cellpadding' => '0', - 'bgcolor' => '#FFFFFF')); - $int->addRow(array($img, 'Nombre(sin estilo)',$img,'nombre'), - array('valign' => 'top')); - $int->updateColAttributes(0, array('width' => '10%', - 'background' => 'images/servicio_borde_sup_izq.gif')); - $int->updateColAttributes(1, array('width' => '40%', - 'background' => 'images/servicio_borde_sup_cen.gif')); - $int->updateColAttributes(2, array('width' => '10%', - 'background' => 'images/servicio_borde_sup_cen.gif')); - $int->updateColAttributes(3, array('width' => '40%', - 'background' => 'images/servicio_borde_sup_der.gif')); - $this->addRow(array($int)); - $this->addRow(array($int)); - $this->addRow(array($int)); - $this->addRow(array(new HTML_Image('images/servicio_borde_inf.gif'))); - return parent::toHTML(); + 'height'=>30, + 'class' => 'servicio_titulo_tabla')); + $img = new HTML_Image('images/servicio_bullet.gif'); + $int =& new HTML_Table(array('width' =>'360', + 'border' => '0', + 'cellspacing' => '0', + 'cellpadding' => '0', + 'bgcolor' => '#FFFFFF')); + $int->addRow(array($img, '',$img,''), + array()); + $int->updateColAttributes(0, array('width' => '10%', + 'background' => 'images/servicio_borde_sup_izq.gif', + 'valign' => 'top')); + $int->updateColAttributes(1, array('width' => '40%', + 'background' => 'images/servicio_borde_sup_cen.gif')); + $int->updateColAttributes(2, array('width' => '10%', + 'background' => 'images/servicio_borde_sup_cen.gif', + 'valign' => 'top')); + $int->updateColAttributes(3, array('width' => '40%', + 'background' => 'images/servicio_borde_sup_der.gif')); + $par = false; + foreach($this->servicio->getHijos() as $s) + { + if($s->link == '') + $s->link = 'servicios.php?servicios='.$s->servicio; + if($par) + { + $int->setCellContents(0, 3, new HTML_Link($s->link, $s->nombre, + array(), + array('class' => 'servicio_tabla'))); + $this->addRow(array($int)); + $par = false; + } + else + { + $int->setCellContents(0, 1, new HTML_Link($s->link, $s->nombre, + array(), + array('class' => 'servicio_tabla'))); + $par = true; + } + } + if($par) + { + $int->setCellContents(0, 1, new HTML_Link($s->link, $s->nombre, + array(), + array('class' => 'servicio_tabla'))); + $int->setCellContents(0, 2, ''); + $int->setCellContents(0, 3, ''); + $this->addRow(array($int)); + } + + $this->addRow(array(new HTML_Image('images/servicio_borde_inf.gif'))); + return parent::toHTML(); } // -X2C diff --git a/sistema/www/css/copete.css b/sistema/www/css/copete.css index 92ea307..f528a2d 100644 --- a/sistema/www/css/copete.css +++ b/sistema/www/css/copete.css @@ -1,3 +1,3 @@ -.TextBlue { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; font-weight: normal } -.titulo_vinculos { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold ; font-style: normal; line-height: normal; background-position: left centre; text-align: left } -.titulo_uno { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: middle ; font-weight: bold } +.copete_TextBlue { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; font-weight: normal } +.copete_titulo_vinculos { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold ; font-style: normal; line-height: normal; background-position: left centre; text-align: left } +.copete_titulo_uno { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: middle ; font-weight: bold } diff --git a/sistema/www/css/noticias.css b/sistema/www/css/noticias.css index c81c796..a6eb52a 100644 --- a/sistema/www/css/noticias.css +++ b/sistema/www/css/noticias.css @@ -1,7 +1,7 @@ -.titulo_vinculos { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold ; font-style: normal; line-height: normal; background-position: left centre; text-align: left } -.titulo_uno { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: middle ; font-weight: bold } -.subtitulo { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: middle ; font-weight: bold} -.titulo_noticia { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: top; font-weight: normal} -.fecha_noticia { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; font-style: normal; line-height: normal; background-position: left bottom; text-align: left; vertical-align: bottom; font-weight: normal} -.ver_mas { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; font-style: normal; line-height: normal; background-position: right bottom; text-align: right; vertical-align: middle ; font-weight: normal } -.textoazul { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; font-weight: normal } +.noticias_titulo_vinculos { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold ; font-style: normal; line-height: normal; background-position: left centre; text-align: left } +.noticias_titulo_uno { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 12pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: middle ; font-weight: bold } +.noticias_subtitulo { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: middle ; font-weight: bold} +.noticias_titulo_noticia { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; background-position: left centre; text-align: left; vertical-align: top; font-weight: normal} +.noticias_fecha_noticia { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; font-style: normal; line-height: normal; background-position: left bottom; text-align: left; vertical-align: bottom; font-weight: normal} +.noticias_ver_mas { COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; font-style: normal; line-height: normal; background-position: right bottom; text-align: right; vertical-align: middle ; font-weight: normal } +.noticias_textoazul { COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; font-style: normal; line-height: normal; font-weight: normal } diff --git a/sistema/www/css/servicio.css b/sistema/www/css/servicio.css new file mode 100644 index 0000000..682efcd --- /dev/null +++ b/sistema/www/css/servicio.css @@ -0,0 +1,6 @@ +.servicio_tabla { + BACKGROUND-POSITION: left top; COLOR: #000000; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT: normal; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle +} +.servicio_titulo_tabla { + BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-WEIGHT: bold; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle; +} diff --git a/sistema/www/servicios.php b/sistema/www/servicios.php index 9831cf0..33ec252 100644 --- a/sistema/www/servicios.php +++ b/sistema/www/servicios.php @@ -1,11 +1,41 @@ 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; + } + } + $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(); ?> -- 2.43.0