Ksiêga go¶ci

$txt=fopen("guestbook.gb","r"); // Pfad zur Datei
$gbfile="";
while($line=fgets($txt,3000))
$gbfile.=$line;
//name
if(isset($name))
if($name==""){
$errorfarbe_1 = "red";
$error = "fehler";
}
else{
$errorfarbe_1 = "black";
}
//comment
if(isset($comment))
if($comment==""){
$errorfarbe_2 = "red";
$error = "fehler";
}
else{
$errorfarbe_2 = "black";
}
if(!$aktion){
$aktion = "eingabe";
}
if($error=="fehler"||$aktion=="eingabe"){
?>
echo "$gbfile "
?>
}else{
if(isset($name)&&isset($comment))
{
if (preg_match("/http/i", $comment)) {
echo "Spam?\n";
} else {
$name=stripslashes(strip_tags($name));
$comment=stripslashes(strip_tags($comment));
$comment2=chunk_split($comment,100);
$mail=stripslashes(strip_tags($mail));
$site=stripslashes(strip_tags($site));
//mail("mail@kingnero.de","Gästebucheintrag - KingNero","name: $name\nText:$comment"); //Bestätigungs email
// $gbfile="$name - ".date("m/d/Y")." \n$mail\n"." \n$site\n"." \n$comment
\n".$gbfile;
$gbfile="$name - ".date("m/d/Y")." \n$comment2
\n".$gbfile;
fclose($txt);
$txt=fopen("guestbook.gb","w"); // Pfad zur Datei
fputs($txt,$gbfile);
}
}
echo "Nowy wpis
" . $gbfile . " ";
fclose($txt);
}
?>
Strona glowna
Skrypt napisal Tjark Süßen, www.bit-style.de
|