From: Gonzalo Merayo Date: Thu, 3 Jul 2003 19:20:03 +0000 (+0000) Subject: (no commit message) X-Git-Tag: svn_import~248 X-Git-Url: https://git.llucax.com/mecon/intranet.git/commitdiff_plain/ab77106d0d0e5ffcef48bc563360a6332cab1d9d?ds=inline --- diff --git a/doc/noticias.xmi b/doc/noticias.xmi index 3828b70..c62be6e 100644 --- a/doc/noticias.xmi +++ b/doc/noticias.xmi @@ -10,12 +10,16 @@ +" uniqueid="183" /> + + + + @@ -23,9 +27,6 @@ - - - @@ -49,8 +50,8 @@ - - + + @@ -64,8 +65,8 @@ - - + + @@ -78,7 +79,6 @@ - @@ -86,6 +86,10 @@ + + + + diff --git a/sistema/local_lib/configuracion.php b/lib/configuracion.php similarity index 100% rename from sistema/local_lib/configuracion.php rename to lib/configuracion.php diff --git a/sistema/local_lib/intranetdb.php b/lib/intranetdb.php similarity index 100% rename from sistema/local_lib/intranetdb.php rename to lib/intranetdb.php diff --git a/lib/mecondavdb.php b/lib/mecondavdb.php new file mode 100644 index 0000000..7cb4e98 --- /dev/null +++ b/lib/mecondavdb.php @@ -0,0 +1,58 @@ + +// +----------------------------------------------------------------------+ +// +// $Id: bandadb.php 14 2003-07-03 14:24:24Z gmeray $ +// $Author: gmeray $ +// $URL: http://portal.mecon.ar/svn/bandas/sistema/local_lib/bandadb.php $ +// $Date: 2003-07-03 11:24:24 -0300 (Thu, 03 Jul 2003) $ +// $Rev: 14 $ +// + +#require_once 'PEAR.php'; +require_once 'DB.php'; + +PEAR::SetErrorHandling(PEAR_ERROR_TRIGGER); + + +// +X2C Class 121 :BandaDB +/** + * @access public + */ +class MEconDAVDB extends DB { + // ~X2C + + // +X2C Operation 122 + /** + * @return void + * @access public + */ + function connect() // ~X2C + { + $conf = include 'configuracion.php'; + $dsn = $conf['db_type'].'://'.$conf['db_user'].':'.$conf['db_pass'].'@'.$conf['db_host'].'/'.$conf['db_name']; + $db = DB::connect($dsn,true); + if (DB::isError($db)) { + die ($db->getMessage()); + } + return $db; + } + // -X2C + +} // -X2C Class :BandaDB +?> diff --git a/lib/noticia.php b/lib/noticia.php index 0580e8d..88f9f08 100644 --- a/lib/noticia.php +++ b/lib/noticia.php @@ -27,7 +27,7 @@ // $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $ // - +require_once 'mecondavdb.php'; // +X2C Class 161 :noticia @@ -52,9 +52,63 @@ class noticia { */ function noticia($noticia) // ~X2C { - trigger_error('Not implemented!', E_USER_WARNING); + $this->noticia; + $db = MEconDAVDB::Connect(); + $query = "SELECT headline, title, abstract, article + FROM Articles + WHERE Article_id = $noticia"; + $result = $db->query($query); + $row = $result->fetchRow(); + $this->titulo2 = $row[0]; + $this->titulo = $row[1]; + $this->abstracto = $row[2]; + $this->texto = $row[3]; + } + // -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 getAbstracto() // ~X2C + { + return $this->abstracto; + } + // -X2C + + // +X2C Operation 183 + /** + * @return string + * @access public + */ + function getTitulo2() // ~X2C + { + return $this->titulo2; } // -X2C } // -X2C Class :noticia -?> \ No newline at end of file +?> diff --git a/sistema/local_lib/HTML_Noticia.php b/sistema/local_lib/HTML_Noticia.php index 38a7407..ac74f83 100644 --- a/sistema/local_lib/HTML_Noticia.php +++ b/sistema/local_lib/HTML_Noticia.php @@ -70,18 +70,6 @@ class HTML_Noticia extends HTML_Table { } // -X2C - // +X2C Operation 174 - /** - * @param bool $foto - * - * @return void - * @access public - */ - function setConFoto($foto) // ~X2C - { - trigger_error('Not implemented!', E_USER_WARNING); - } - // -X2C // +X2C Operation 175 /**