]> git.llucax.com Git - mecon/intranet.git/commitdiff
Corrijo HTML_Noticia para que Myrna quede contenta
authorGonzalo Merayo <merayo@gmail.com>
Tue, 8 Jul 2003 17:44:40 +0000 (17:44 +0000)
committerGonzalo Merayo <merayo@gmail.com>
Tue, 8 Jul 2003 17:44:40 +0000 (17:44 +0000)
doc/noticias.xmi
lib/noticia.php
sistema/local_lib/HTML_Noticia.php
sistema/www/una_noticia.php

index 4937942840204e46d542c42243bf997ff3b05125..f1e9d466bfcf3172975892114053abea614b234c 100644 (file)
@@ -10,7 +10,7 @@
  </XMI.header>
  <XMI.content>
   <docsettings viewid="160" documentation="
-" uniqueid="190" />
+" uniqueid="191" />
   <umlobjects>
    <UML:Class stereotype="" package="lib" xmi.id="161" abstract="0" documentation="" name="noticia" static="0" scope="200" >
     <UML:Operation stereotype="" package="" xmi.id="169" type="void" abstract="0" documentation="" name="noticia" static="0" scope="200" >
@@ -21,6 +21,7 @@
     <UML:Operation stereotype="" package="" xmi.id="181" type="string" abstract="0" documentation="" name="getTexto" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="182" type="string" abstract="0" documentation="" name="getSintesis" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="186" type="string" abstract="0" documentation="" name="getFecha" static="0" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="191" type="void" abstract="0" documentation="" name="getSeccion" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="168" value="" type="int" abstract="0" documentation="" name="Noticia" static="0" scope="200" />
    </UML:Class>
    <UML:Class stereotype="" package="sistema/local_lib" xmi.id="162" abstract="0" documentation="" name="HTML_Noticia" static="0" scope="200" >
@@ -63,7 +64,7 @@ x2c:include:HTML/Table.php
   <diagrams>
    <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="1" xmi.id="160" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
     <widgets>
-     <UML:ConceptWidget usesdiagramfillcolour="0" width="160" showattsigs="601" usesdiagramusefillcolour="0" x="10" linecolour="#ff0000" y="237" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="128" usefillcolor="1" showattributes="1" xmi.id="161" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+     <UML:ConceptWidget usesdiagramfillcolour="0" width="160" showattsigs="601" usesdiagramusefillcolour="0" x="15" linecolour="#ff0000" y="243" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="144" usefillcolor="1" showattributes="1" xmi.id="161" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="220" showattsigs="601" usesdiagramusefillcolour="0" x="225" linecolour="#ff0000" y="197" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="128" usefillcolor="1" showattributes="1" xmi.id="162" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="80" showattsigs="601" usesdiagramusefillcolour="0" x="477" linecolour="#ff0000" y="47" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="32" usefillcolor="1" showattributes="1" xmi.id="164" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ConceptWidget usesdiagramfillcolour="0" width="272" showattsigs="601" usesdiagramusefillcolour="0" x="65" linecolour="#ff0000" y="62" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="88" usefillcolor="1" showattributes="1" xmi.id="170" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
@@ -79,7 +80,7 @@ x2c:include:HTML/Table.php
      </UML:AssocWidget>
      <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="162" widgetaid="161" documentation="" type="510" >
       <linepath>
-       <startpoint startx="170" starty="301" />
+       <startpoint startx="95" starty="243" />
        <endpoint endx="225" endy="261" />
       </linepath>
      </UML:AssocWidget>
@@ -113,8 +114,9 @@ x2c:include:HTML/Table.php
      <listitem open="0" type="807" id="160" label="class diagram" />
      <listitem open="1" type="813" id="161" label="noticia" >
       <listitem open="0" type="814" id="168" label="Noticia" />
-      <listitem open="0" type="815" id="182" label="getSintesis" />
       <listitem open="0" type="815" id="186" label="getFecha" />
+      <listitem open="0" type="815" id="191" label="getSeccion" />
+      <listitem open="0" type="815" id="182" label="getSintesis" />
       <listitem open="0" type="815" id="181" label="getTexto" />
       <listitem open="0" type="815" id="180" label="getTitulo" />
       <listitem open="0" type="815" id="183" label="getTitulo2" />
index 50e89704f530963bd0b9c5f64f852490b0ddb0f1..e1a38fb8bbc9451d8f9faccccf6110620b3f4129 100644 (file)
@@ -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
 ?>
index f6b96f08add2d1444f3f9a33aec2780f21f7d072..7d275254a6adf58d53c9edd136b724878f2e9406 100644 (file)
@@ -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'));
index cb10060d028226f88502e35bbb7d4af372a3b460..30346bec66a8d05968c8b30f668cb95deb25a6ef 100644 (file)
@@ -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();
 ?>
 </body>