if(!$_GET['act']) { $_GET['act'] = "overview"; }
#### Overview
if($_GET['act'] == "overview") {
$handle = fopen("_filelist.txt", "r");
while (!feof($handle)) { $cont .= fread($handle, 500); }
$cont = str_replace("\n", "
", $cont);
$cont = explode("
", $cont);
$count = 0;
while(isset($cont[$count])) { $cont2[$count] = explode("#!#", $cont[$count]); $count++; }
unset($cont); unset($count);
fclose($handle);
?>
$count = 0;
while(isset($cont2[$count][0])) {
echo "- ".$cont2[$count][2]."
";
$count++;
}
unset($count);
echo "
|
";
exit;
}
#### Show
if($_GET['act'] == "show") {
if(!$_GET['file']) { echo "Keine Filenummer gesetzt!"; exit; }
if(strlen($_GET['file'] > 5)) { echo "Filenummer unlogisch"; exit; }
$handle = fopen("_filelist.txt", "r");
while (!feof($handle)) { $cont .= fread($handle, 500); }
$cont = str_replace("\n", "
", $cont);
$cont = explode("
", $cont);
$count = 0;
while(isset($cont[$count])) { $cont2[$count] = explode("#!#", $cont[$count]); $count++; }
unset($cont); unset($count);
fclose($handle);
unset($handle);
$temp_1000 = $_GET['file'];
$temp_1000 = $temp_1000 * 1;
$temp_1000 = $temp_1000 - 1;
$getfile = $cont2[$temp_1000][1];
unset($temp_1000);
unset($cont2);
if (file_exists($getfile)) { }
else { echo "File leider nicht gefunden."; exit; }
$handle = fopen("$getfile", "r");
while (!feof($handle)) { $cont .= fread($handle, 500); }
fclose($handle);
unset($handle);
$cont = htmlspecialchars($cont);
$cont = nl2br($cont);
$cont = str_replace("[B]", "", $cont);
$cont = str_replace("[b]", "", $cont);
$cont = str_replace("[/B]", "", $cont);
$cont = str_replace("[/b]", "", $cont);
$cont = str_replace("[U]", "", $cont);
$cont = str_replace("[u]", "", $cont);
$cont = str_replace("[/U]", "", $cont);
$cont = str_replace("[/u]", "", $cont);
$cont = str_replace("[CENTER]", "", $cont);
$cont = str_replace("[center]", "", $cont);
$cont = str_replace("[/CENTER]", "", $cont);
$cont = str_replace("[/center]", "", $cont);
$cont = str_replace("[BILD]", "", $cont);
$cont = str_replace("[/bild]", "'>", $cont);
$cont = str_replace("[LINK]", "LINK", $cont);
$cont = str_replace("[/link]", "' target='_blank'>LINK", $cont);
?>
echo $cont;
echo "";
exit;
}
exit;
?>