From: Gonzalo Merayo Date: Tue, 8 Jul 2003 17:44:40 +0000 (+0000) Subject: Corrijo HTML_Noticia para que Myrna quede contenta X-Git-Tag: svn_import~239 X-Git-Url: https://git.llucax.com/mecon/intranet.git/commitdiff_plain/11b81d2f79bfd131d04ac0c91c51175a4d89cd4d?ds=inline Corrijo HTML_Noticia para que Myrna quede contenta --- diff --git a/doc/noticias.xmi b/doc/noticias.xmi index 4937942..f1e9d46 100644 --- a/doc/noticias.xmi +++ b/doc/noticias.xmi @@ -10,7 +10,7 @@ +" uniqueid="191" /> @@ -21,6 +21,7 @@ + @@ -63,7 +64,7 @@ x2c:include:HTML/Table.php - + @@ -79,7 +80,7 @@ x2c:include:HTML/Table.php - + @@ -113,8 +114,9 @@ x2c:include:HTML/Table.php - + + diff --git a/lib/noticia.php b/lib/noticia.php index 50e8970..e1a38fb 100644 --- a/lib/noticia.php +++ b/lib/noticia.php @@ -55,9 +55,11 @@ class noticia { { $this->noticia = $noticia; $db = MEconDAVDB::Connect(); - $query = "SELECT headline, title, abstract, article, publication_date - FROM Articles - WHERE Article_id = $noticia"; + $query = "SELECT A.headline, A.title, A.abstract, A.article, + A.publication_date, S.description + FROM Articles A, Sections S + WHERE Article_id = $noticia + AND A.section_id = S.section_id"; $result = $db->query($query); $row = $result->fetchRow(); $this->titulo = $row[0]; @@ -65,6 +67,7 @@ class noticia { $this->sintesis = $row[2]; $this->texto = $row[3]; $this->fecha = new Date($row[4]); + $this->seccion = $row[5]; } // -X2C @@ -123,5 +126,16 @@ class noticia { } // -X2C + // +X2C Operation 191 + /** + * @return void + * @access public + */ + function getSeccion() // ~X2C + { + return $this->seccion; + } + // -X2C + } // -X2C Class :noticia ?> diff --git a/sistema/local_lib/HTML_Noticia.php b/sistema/local_lib/HTML_Noticia.php index f6b96f0..7d27525 100644 --- a/sistema/local_lib/HTML_Noticia.php +++ b/sistema/local_lib/HTML_Noticia.php @@ -67,7 +67,7 @@ class HTML_Noticia extends HTML_Table { { if($this->completa) { - $this->addRow(array('El Nombre de la Seccion'), array('class' => 'titulo_uno')); + $this->addRow(array($this->noticia->getSeccion()), array('class' => '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')); @@ -85,7 +85,7 @@ class HTML_Noticia extends HTML_Table { } else { - $this->addRow(array($this->noticia->getTitulo()), + $this->addRow(array($this->noticia->getSeccion()), array('class' => 'subtitulo')); $img_str = null; if($this->nuevo) @@ -93,7 +93,7 @@ class HTML_Noticia extends HTML_Table { $nuevo = new HTML_Image('images/noticia_nuevo.gif'); $img_str = $nuevo->toHTML(); } - $this->addRow(array($this->noticia->getTitulo2().$img_str), array('class' => 'titulo_noticia')); + $this->addRow(array($this->noticia->getTitulo().$img_str), array('class' => 'titulo_noticia')); $tmp = $this->noticia->getFecha(); $this->addRow(array($tmp->format('(%d/%m/%Y)')), array('class' => 'fecha_noticia')); diff --git a/sistema/www/una_noticia.php b/sistema/www/una_noticia.php index cb10060..30346be 100644 --- a/sistema/www/una_noticia.php +++ b/sistema/www/una_noticia.php @@ -21,8 +21,8 @@ $noticia = new HTML_Noticia(new noticia($_GET['numero'])); $noticia->setCompleta(true); $noticias->addRow(array($arbol,$noticia)); - $noticias->updateCellAttributes(0, 0, array('valign'=>'top', 'width'=>'160')); - $noticias->updateCellAttributes(0, 1, array('valign'=>'top', 'width'=>'160')); + $noticias->updateCellAttributes(0, 0, array('valign'=>'top')); + $noticias->updateCellAttributes(0, 1, array('valign'=>'top')); $noticias->display(); ?>