X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/11b81d2f79bfd131d04ac0c91c51175a4d89cd4d..9fa8793e0f77424450f0d5514d1d46ce8b34b235:/lib/noticia.php diff --git a/lib/noticia.php b/lib/noticia.php index e1a38fb..fc41b80 100644 --- a/lib/noticia.php +++ b/lib/noticia.php @@ -56,7 +56,7 @@ class noticia { $this->noticia = $noticia; $db = MEconDAVDB::Connect(); $query = "SELECT A.headline, A.title, A.abstract, A.article, - A.publication_date, S.description + A.publication_date, S.description, S.section_id FROM Articles A, Sections S WHERE Article_id = $noticia AND A.section_id = S.section_id"; @@ -68,6 +68,7 @@ class noticia { $this->texto = $row[3]; $this->fecha = new Date($row[4]); $this->seccion = $row[5]; + $this->id_seccion = $row[6]; } // -X2C @@ -137,5 +138,53 @@ class noticia { } // -X2C + // +X2C Operation 197 + /** + * @return void + * @access public + */ + function getidSeccion() // ~X2C + { + return $this->id_seccion; + } + // -X2C + + // +X2C Operation 199 + /** + * @return void + * @access public + */ + function getLinks() // ~X2C + { + $db = MEconDAVDB::Connect(); + $sql = "SELECT R.link_id, A.headline + FROM Relations R, Articles A + WHERE R.link_id = A.article_id + AND R.article_id = ".$this->noticia; + $result =& $db->query($sql); + $links = array(); + while($row =& $result->fetchRow()) + $links[] = array('numero'=>$row[0], 'texto'=>$row[1]); + return $links; + } + // -X2C + + // +X2C Operation 200 + /** + * @return void + * @access public + */ + function getArchivos() // ~X2C + { + $db = MEconDAVDB::Connect(); + $sql = "SELECT file_for_article_id, caption FROM FilesForArticle WHERE article_id = ".$this->noticia; + $result =& $db->query($sql); + $archivos = array(); + while($row =& $result->fetchRow()) + $archivos[] = array('numero'=>$row[0], 'texto'=>$row[1]); + return $archivos; + } + // -X2C + } // -X2C Class :noticia ?>