X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/e54c0e22cd808855fdc1171d1bc70d00175e1ad0..e59d3170b36e5b9ccc19afcb1565faf4dcb40463:/lib/noticia.php diff --git a/lib/noticia.php b/lib/noticia.php index 6a07def..bd92c7b 100644 --- a/lib/noticia.php +++ b/lib/noticia.php @@ -28,6 +28,7 @@ // require_once 'mecondavdb.php'; +require_once 'Date.php'; // +X2C Class 161 :noticia @@ -52,17 +53,22 @@ class noticia { */ function noticia($noticia) // ~X2C { - $this->noticia; + $this->noticia = $noticia; $db = MEconDAVDB::Connect(); - $query = "SELECT headline, title, abstract, article - FROM Articles - WHERE Article_id = $noticia"; + $query = "SELECT A.headline, A.title, A.abstract, A.article, + A.publication_date, S.description, S.section_id + FROM Articles A, Sections S + WHERE Article_id = $noticia + AND A.section_id = S.section_id"; $result = $db->query($query); $row = $result->fetchRow(); - $this->titulo2 = $row[0]; - $this->titulo = $row[1]; - $this->abstracto = $row[2]; + $this->titulo = $row[0]; + $this->titulo2 = $row[1]; + $this->sintesis = $row[2]; $this->texto = $row[3]; + $this->fecha = new Date($row[4]); + $this->seccion = $row[5]; + $this->id_seccion = $row[6]; } // -X2C @@ -93,9 +99,9 @@ class noticia { * @return string * @access public */ - function getAbstracto() // ~X2C + function getSintesis() // ~X2C { - return $this->abstracto; + return $this->sintesis; } // -X2C @@ -110,5 +116,38 @@ class noticia { } // -X2C + // +X2C Operation 186 + /** + * @return string + * @access public + */ + function getFecha() // ~X2C + { + return $this->fecha; + } + // -X2C + + // +X2C Operation 191 + /** + * @return void + * @access public + */ + function getSeccion() // ~X2C + { + return $this->seccion; + } + // -X2C + + // +X2C Operation 197 + /** + * @return void + * @access public + */ + function getIdSeccion() // ~X2C + { + return $this->id_seccion; + } + // -X2C + } // -X2C Class :noticia -?> \ No newline at end of file +?>