// shoutbox.php
<script>
if(self.location==top.location)
{
top.location='http://jacob.scriptkiddies.nl';
}
</script>
<style>
body,input,td, textarea { font-family:verdana; font-size:8pt; font-weight:bold; }
a { color:blue; }
iframe { border:1 ridge black;
</style>
</head>
<body bgcolor="e5e5e5">
<?php
if($nummer==1){
?>
<?php
$file=file("messages.txt");
for($i=count($file)-1; $i >= 0; $i--){
list($ip,$naam,$email,$mess,$datum)=split("\t",$file[$i]);
echo "<table cellpadding=0 style='border:1 dashed black; width:100%' title='Gepost op: ".$datum."'>";
echo "<tr><td><a href='mailto:".$email."'>".$naam."</a></td></tr>";
echo "<tr><td>".$mess."</td></tr>";
echo "</table><BR>";
}
}
if($nummer==2){
if($submit && $naam && $mess){
$fp=fopen("messages.txt","a");
$mess=str_replace("%0D%0A"," ",$mess);
$mess=str_replace("\n"," ",$mess);
fputs($fp,$REMOTE_ADDR."\t".strip_tags($naam)."\t".strip_tags($email)."\t".strip_tags($mess)."\t".date("H:i:s d-m-Y")."\n");
fclose($fp);
echo "Bericht toegevoegt<br>";
echo "<script>parent.shout.location='shoutbox.php?nummer=1'</script>";
echo "<script>self.location='shoutbox.php?nummer=2'</script>";
}
else {
?>
<body topmargin=0>
<form>
<input type=hidden name=nummer value=2>
<input type='text' name=naam value='naam' onfocus='this.value=""; submit.disabled=false'>
<input type='text' name=email value='email' onfocus='this.value=""'>
<textarea name=mess onfocus='this.innerHTML=""'>Message</textarea>
<input type='submit' name=submit value='Post' disabled=yes>
<input type='reset' name=wiss value='Wissen'>
<?php
}
}
?>
// index.html
<center>Shoutbox</center><br>
<iframe height=250 frameborder=0 style="border-bottom:none" src='shoutbox.php?nummer=1' name=shout>
</iframe><BR>
<iframe height=100 frameborder=0 scrolling=no style="border-top:none" src='shoutbox.php?nummer=2'>
</iframe>