'; echo "

$file: "; $data = file_get_contents($prefix . "/$file"); //read the file $convert = explode("\n", $data); //create array separate by new line for ($i=0;$i'; //write value by index if ($i == 0){ echo "

"; } } echo ''; } } if ($handle = opendir('./news/')) { $filenames = array(); while ($file = readdir($handle)) { $filenames[] = $file; } rsort($filenames); $entryfound = 0; foreach($filenames as $file) { if ($file == $_GET["entry"]) { writeNewsEntry($file, 'news'); $entryfound = 1; } } closedir($handle); if ($entryfound == 0) { if ($handle = opendir('./rssentries/')) { $filenames = array(); while ($file = readdir($handle)) { $filenames[] = $file; } rsort($filenames); $entryfound = 0; foreach($filenames as $file) { if ($file == $_GET["entry"]) { writeNewsEntry($file, 'rssentries'); $entryfound = 1; } } closedir($handle); if ($entryfound == 0) { echo 'Requested news entry not found!'; echo "

"; } } } echo 'Go back to News'; echo "

"; } ?>