<?php
$bfile="berichten.txt";
IF($_GET['status']=="")
{
echo "<marquee>";
include($bfile);
echo "</marquee>\n<button onclick=\"window.open('".$_SERVER['PHP_SELF']."?status=write','berichten','width=300,height=100')\">Write</button>";
}
if($_GET['status']=='write')
{
echo "<form action='".$_SERVER['PHP_SELF']."?status=write' METHOD=POST>";
echo "<center>";
echo "<B>Vul hier je message in:</b><BR>\n";
echo "<input type=text name=mesenge size=40><BR>\n";
echo "<input type=submit value='Send'>\n";
echo "</form>";
if($_POST['mesenge'])
{
$fp=fopen($bfile,"a");
fputs($fp,$_POST['mesenge']." ");
fclose($fp);
echo "Klaar\n";
echo "<script>\n";
echo "alert('Je bericht is toegevoegt\\n http://jacob.slompinfo.nl');\n";
echo "SetTimeout(window.close(),'10000')\n";
echo "</script>\n";
}
}
?>