", $line); $line=str_replace(" ", " ", $line); $line=str_replace(""", " ", $line); $line=str_replace("©", " ", $line); $line=str_replace("®", " ", $line); $line=str_replace("™", " ", $line); $line=str_replace("€", "?", $line); $line=str_replace("„", " ", $line); $line=str_replace("“", " ", $line); $line=str_replace("«", " ", $line); $line=str_replace("»", " ", $line); $line=str_replace("§", " ", $line); $line=str_replace("&", "&", $line); $line=str_replace("—", " ", $line); $line=str_replace("'", "'", $line); $line=str_replace("ç", "ç", $line); return $line; } function generate_desc($body) { if ($body=="") return ""; $body = strip_tags($body); $words = explode(" ",$body); $desc = ""; $n = 0; foreach ($words as $word) { $desc .= "$word "; $n++; if ($n==40) break; } return "$desc..."; } function show_feeds($ids) { echo "\n"; echo "\n"; echo "\n"; echo "Faculdade de Engenharia da UERJ\n"; echo "Servico de noticias da FEN/UERJ\n"; echo "pt-br\n"; echo "http://www.eng.uerj.br/noticias\n"; echo "\nhttp://www.eng.uerj.br/lib/uerj.jpg\nhttp://www.eng.uerj.br\n\n"; echo ""; $min = count($ids)-50; if ($min < 0) $min = 0; for ($i=count($ids)-1; $i >= $min; $i--) { $noticia = nl_getnews($ids[$i]); $id = $noticia['id']; $href = FEN_ROOT.app_noticiaurl($noticia['id']); // $description = $noticia['header'] ? clearstr($noticia['header']) : clearstr(generate_desc($noticia['body'])); // $description = $noticia['header'] ? converte_htmlchar($noticia['header']) : "..."; $description = $noticia['header'] ? clearstr($noticia['header']) : "..."; if (is_file(FEN_DIR."/publico/anexos/$id/$id.jpg")) { $description = "\n" . $description . "]]>\n"; } echo "\n"; echo "".clearstr($noticia['title'])."\n"; echo "$description\n"; echo "".date("D, j M Y H:i:s O",strtotime($noticia['dt']))."\n"; echo "$href\n"; if (is_file(FEN_DIR."/publico/anexos/$id/$id.jpg")) echo "".$FEN_ROOT."/publico/anexos/$id/$id.jpg\n"; // echo "\n".$FEN_ROOT."/publico/anexos/$id/$id.jpg\n$href\n\n"; echo "$href\n"; echo "\n"; } echo "\n"; echo ""; } $tags = urldecode($_REQUEST['tags']); $tags_arr = $tags ? explode(' ',$tags) : NULL; $ids = nl_getnewsidswithtags($tags_arr); show_feeds($ids); ?>