SelectLimit($sql,$headline_limit);
/* fifers - no need for a count var. just use a while loop */
// fifers - should we spit out an error XML doc?
if ($result === false) {
echo "\n\nAn error occured";
} else {
echo "\n\n";
echo "\n\n";
echo "\n\n";
echo "\n";
echo "$title\n";
echo "$link\n";
echo "$description\n";
echo "$backend_language\n";
// Tried to make site searches work, but the Search module uses HTTP_POST/GET_VARS to determine
// whether to display results and I couldn't munge the RSS content enough to make it work
// reliably. (This exercise is left to the advanced student. :*)
// echo "\n";
// echo " Search ".$title."\n";
// echo " op=modload&name=Search&file=index&action=search&active_stories=1&Search\n";
// echo " ".$link."/modules.php\n";
// echo "\n";
echo "\n";
echo " $image_title\n";
echo " $image_url\n";
echo " $image_link\n";
echo "\n";
echo "$webmaster\n";
if ($managingeditor != "") {
echo "$managingeditor\n";
};
// while(list($sid, $title) = $result->fields) {
// modify for Oracle compatibility
// while(list($sid, $title,$ihome,$hometext) = $result->fields){
while(!$result-> EOF){
list($sid, $title,$ihome,$hometext) = $result->fields;
$title = pnVarPrepHTMLDisplay($title);
$link = pnVarPrepForDisplay(pnGetBaseURL() . "modules.php?op=modload&name=News&file=article&sid=$sid");
$content = pnVarPrepForDisplay($hometext);
echo "- \n";
echo "$title\n";
echo "$link\n";
if ($show_content) {
echo "\n";
echo $content;
echo "\n";
};
echo "
\n";
$result->MoveNext();
}
echo "\n";
echo "\n";
}
?>