\n"; error_reporting(0); $dir=substr(__FILE__, 0, strrpos(__FILE__, "/")+1); // load config include_once($dir."config.inc.php"); ?> sortkeys = array(array('time', $rssOrder)); if (count($foo)==0){ $empty=true; }else{ $i=0; foreach ($foo as $line){ $line=explode("|", rtrim($line)); if ($line[2]=="static" || ($line[2]=="dynamic" && $line[1]<$now)){ $stuff->data[$i] = array("id" => $line[0], "time" => $line[1], "mode" => $line[2], "title" => $line[3], "story" => $line[4], "teaser" => $line[5]); $i++; } } if ($i>0){ $stuff->msort(); $numposts=count($stuff->data); }else{ $empty=true; $numposts=0; } } $i=0; $news = array_slice ($stuff->data, 0, $rssNumNews); foreach ($news as $row){ $title = htmlspecialchars(html_entity_decode(strip_tags(stripslashes($row['title'])))); $description = htmlspecialchars(html_entity_decode(strip_tags(stripslashes($row['teaser'])))); $link = $rssNewspageUrl.((strpos($rssNewspageUrl, "?")!==false) ? "&" : "?")."mnid=".$row['id']; $i++; echo ' '.$title.' '.$link.' '.$description.' '; } ?>