X-Git-Url: https://git.llucax.com/mecon/intranet.git/blobdiff_plain/b1898620c4461ff170c6c18f6e68d792ac652125..534be32199334fd820115b65e0ccbded391945fd:/sistema/www/noticias.php diff --git a/sistema/www/noticias.php b/sistema/www/noticias.php index 08f1635..16e2119 100644 --- a/sistema/www/noticias.php +++ b/sistema/www/noticias.php @@ -7,10 +7,64 @@
- + $db, + 'tabla' => 'grupo_secciones', + 'id' => 'grupo', + 'nombre' => 'nombre', + 'id_padre' => 'grupo_padre', + 'prepend_link' => 'noticias.php?grupo='); + $arbol = new HTML_ArbolDB($dbdata, '/MECON/images/arbol_noticias.gif'); + echo $arbol->toHTML(); + ?> - + '$fecha_nuevo', 'NUEVA', null) + FROM Articles, ArticlePublicationStates + WHERE Articles.article_publication_state_id = + ArticlePublicationStates.article_publication_state_id + AND ArticlePublicationStates.publication_state_id=5 + AND Articles.publication_date > '$fecha_limite' + ORDER BY Articles.publication_date desc"; + $result = $db->query($query); + if(DB::isError($result)) + die($result->getMessage("query mal hecho")); + $ht = new HTML_Table(array('width'=>'600', 'border'=>'0', 'cellspacing'=>'0')); + $not1 = $not2 = null; + while($row = $result->fetchRow()) + { + + $n = new noticia($row[0]); + $not = new HTML_Noticia($n); + if($row[1] == 'NUEVA') + $not->setNuevo(true); + if(is_null($not1)) $not1 = $not; + elseif(is_null($not2)) + { + $not2 = $not; + $ht->addRow(array($not1, $not2)); + } + else + { + $not1 = $not; + $not2 = null; + } + } + if(is_null($not2)) $ht->addRow(array($not1)); + $ht->display(); + ?>