| // +--------------------------------------------------------------------+ // // $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $ // require_once 'Date.php'; require_once 'intranetdb.php'; // +X2C Class 161 :noticia /** * @access public */ class noticia { /** * @var int $Noticia * @access public */ var $Noticia; // ~X2C // +X2C Operation 169 /** * @param int $noticia codigo de la noticia * * @return void * @access public */ function noticia($noticia) // ~X2C { $this->noticia = $noticia; $db = IntranetDB::Connect(); $query = "SELECT A.headline, A.title, A.abstract, A.article, A.publication_date, S.description, S.section_id FROM MEconDAV.Articles A, MEconDAV.Sections S WHERE Article_id = $noticia AND A.section_id = S.section_id"; $result = $db->query($query); $row = $result->fetchRow(); $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 // +X2C Operation 180 /** * @return string * @access public */ function getTitulo() // ~X2C { return $this->titulo; } // -X2C // +X2C Operation 181 /** * @return string * @access public */ function getTexto() // ~X2C { return $this->texto; } // -X2C // +X2C Operation 182 /** * @return string * @access public */ function getSintesis() // ~X2C { return $this->sintesis; } // -X2C // +X2C Operation 183 /** * @return string * @access public */ function getTitulo2() // ~X2C { return $this->titulo2; } // -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 Operation 199 /** * @return void * @access public */ function getLinks() // ~X2C { $db = IntranetDB::Connect(); $sql = "SELECT R.link_id, A.headline FROM MEconDAV.Relations R, MEconDAV.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 = IntranetDB::Connect(); $sql = "SELECT file_for_article_id, caption FROM MEconDAV.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 ?>