$amount=15;
if ($_GET['action']=='write') {
header('location: gb.php?action=read&start=0');
$file=fopen('gastenboek.txt','a');
$message=str_replace("\r",'',$message);
$message=str_replace("\n",'{{',$_GET['message']);
fwrite($file,$_GET['name'].'|||'.$_GET['email'].'|||'.date('d-m-Y').'|||'.$_GET['url'].'|||'.$message."\n");
fclose($file);
}
$start=(isset($_GET['start'])?$_GET['start']:0);
$gastenboek=Array();
$gastenboek=file('gastenboek.txt');
?>
">
Berichten echo $start+1; ?> tot en met echo min($start+$amount,sizeof($gastenboek)); ?>.
$gastenboek=array_reverse($gastenboek);
for ($i=$start;$i<$start+$amount && $i'.($email!=""?''.$name.'':$name).' | '.$date.' | '."\n";
echo ($url!=""?''.$url.' | ':'')."\n";
echo ''.str_replace("\n",' ',htmlspecialchars($message)).' | '."\n";
echo '
| '."\n";
}
?>
if ($start>0) echo '<<< ';
if ($start+$amount>>>';
?> |