1 <body bgcolor="#FFFFFF" class="subtitulo" link="#003366" vlink="#660066" alink="#0066FF" topmargin="0">
3 require_once '../local_lib/copete.php';
4 $c = new Copete('noticias');
7 <table width='760' border='0'>
9 <td width='160' valign='top'>
11 require_once '../local_lib/intranetdb.php';
12 require_once 'MECON/HTML/Arbol/ArbolDB.php';
13 $db = IntranetDB::connect();
16 'tabla' => 'grupo_secciones',
19 'id_padre' => 'grupo_padre',
20 'prepend_link' => 'noticias.php?grupo=');
21 $arbol = new HTML_ArbolDB($dbdata, '/MECON/images/arbol_noticias.gif');
22 echo $arbol->toHTML();
27 require_once '../../lib/noticia.php';
28 require_once '../local_lib/HTML_Noticia.php';
29 require_once '../../lib/mecondavdb.php';
30 $db = MEconDAVDB::Connect();
32 $fecha_nuevo = $hoy->format('%Y-%m-%d');
33 $hoy->subtractSeconds(60*60*24*7);//7 dias
34 $fecha_limite = $hoy->format('%Y-%m-%d');
35 $query = "SELECT Articles.article_id,
36 IF(Articles.publication_date > '$fecha_nuevo', 'NUEVA', null)
37 FROM Articles, ArticlePublicationStates
38 WHERE Articles.article_publication_state_id =
39 ArticlePublicationStates.article_publication_state_id
40 AND ArticlePublicationStates.publication_state_id=5
41 AND Articles.publication_date > '$fecha_limite'
42 ORDER BY Articles.publication_date desc";
43 $result = $db->query($query);
44 if(DB::isError($result))
45 die($result->getMessage("query mal hecho"));
46 $ht = new HTML_Table(array('width'=>'600', 'border'=>'0', 'cellspacing'=>'0'));
48 while($row = $result->fetchRow())
51 $n = new noticia($row[0]);
52 $not = new HTML_Noticia($n);
53 if($row[1] == 'NUEVA')
55 if(is_null($not1)) $not1 = $not;
56 elseif(is_null($not2))
59 $ht->addRow(array($not1, $not2));
67 if(is_null($not2)) $ht->addRow(array($not1));