NOW() OR DataCadu_Element IS NULL)"; $sql .= " AND Elements.DataPubli_Element <= NOW()"; $sql .= " AND (Elements.IdIdioma=1)"; $sql .= " ORDER BY Elements.DataPubli_Element DESC limit 5"; $rs_item_noticies = seleccionar_rowset_personalitzat($sql); //var_dump($rs_item_noticies); $sql = "SELECT * FROM Elements INNER JOIN Portfolio ON Elements.IdElement = Portfolio.IdElement "; $sql .= " WHERE Elements.EsPublicat_Element=1 "; $sql .= " AND (DataCadu_Element > NOW() OR DataCadu_Element IS NULL)"; $sql .= " AND Elements.DataPubli_Element <= NOW()"; $sql .= " AND (Elements.IdIdioma=1)"; $sql .= " ORDER BY Elements.DataPubli_Element DESC limit 5"; $rs_item_publicacions = seleccionar_rowset_personalitzat($sql); //var_dump($rs_item_publicacions); $rs_item_homeAcred = donamWebsDestacades(); //var_dump ($rs_item_homeAcred); tancar_connexio(); obrir_connexio_client_gestor(); $sql = "SELECT * FROM TBLWMA INNER JOIN Elements ON Elements.IdElement = TBLWMA.IdElement"; $sql .= " WHERE (INTWMATIPUSNOU_Wma=7 OR INTWMATIPUSNOU_Wma=13 OR INTWMATIPUSNOU_Wma=14 OR INTWMATIPUSNOU_Wma=15 OR INTWMATIPUSNOU_Wma=16 OR INTWMATIPUSNOU_Wma=17 OR INTWMATIPUSNOU_Wma=18)"; $sql .= " ORDER BY DataOTORG_Wma DESC LIMIT 5"; $rs_item_ultimesAcred = seleccionar_rowset_personalitzat($sql); //var_dump ($rs_item_ultimesAcred); // Header para escribir XML header("Content-type: text/xml; charset=\"utf-8\"", true); // Escribimos el archivo RSS echo "\n"; echo "\n \n ".$rss_titulo."\n ".$rss_url."\n es-sp\n ".$rss_descripcion."\n ".$rss_email."\n ".$rss_email."\n"; for($i=0; $i< sizeof($rs_item_noticies) ; $i++) { $data = new DateTime($rs_item_noticies[$i]['DataPubli_Element']); echo "\n" ; echo "".htmlspecialchars(amper($rs_item_noticies[$i]['Titol_Element']))."\n" ; echo "".$rs_item_noticies[$i]['Subtitol_Not']."\n"; echo "".$data->format("D, d M Y H:i:s O")."\n"; echo "http://wma.comb.es/ca/noticies-fitxa.php?" . Encode("IdNoticia") . "=" . Encode($rs_item_noticies[$i]['IdElement']) . htmlspecialchars("&Noticia=") . urlAmigables($rs_item_noticies[$i]['Titol_Element']) . "\n"; echo "Notícies\n"; echo "\n"; } for($i=0; $i< sizeof($rs_item_publicacions) ; $i++) { $data = new DateTime($rs_item_publicacions[$i]['DataPubli_Element']); echo "\n" ; echo "".htmlspecialchars(amper($rs_item_publicacions[$i]['Titol_Element']))."\n" ; echo "".htmlspecialchars(amper($rs_item_publicacions[$i]['Subtitol_Port']))."\n"; echo "".$data->format("D, d M Y H:i:s O")."\n"; echo "http://wma.comb.es/ca/publicacions-fitxa.php?" . Encode("IdPortfolio") . "=" . Encode($rs_item_publicacions[$i]['IdElement']) . htmlspecialchars("&Noticia=") . urlAmigables($rs_item_publicacions[$i]['Titol_Element']) . "\n"; echo "Publicacions\n"; echo "\n"; } for($i=0; $i< sizeof($rs_item_homeAcred) ; $i++) { $data = new DateTime($rs_item_homeAcred[$i]['DataPubli_Element']); echo "\n" ; echo "".htmlspecialchars(amper($rs_item_homeAcred[$i]['Titol_Element']))."\n" ; echo "".htmlspecialchars(amper($rs_item_homeAcred[$i]['Text_Des']))."\n"; echo "".$data->format("D, d M Y H:i:s O")."\n"; echo "Webs destacades\n"; echo "" .htmlspecialchars(amper($rs_item_homeAcred[$i]['Text_Des'])). "\n"; echo "\n"; } for($i=0; $i< sizeof($rs_item_ultimesAcred) ; $i++) { $data = new DateTime($rs_item_ultimesAcred[$i]['DataOTORG_Wma']); echo "\n" ; echo "".htmlspecialchars(amper($rs_item_ultimesAcred[$i]['Titol_Element']))."\n" ; echo "".htmlspecialchars(amper($rs_item_ultimesAcred[$i]['STRURL_Wma']))."\n"; echo "".$data->format("D, d M Y H:i:s O")."\n"; echo "Últimes webs acreditades\n"; echo "" .htmlspecialchars(amper($rs_item_ultimesAcred[$i]['STRURL_Wma'])). "\n"; echo "\n"; } echo ""; echo ""; ?>