:: snooweatinganima :: guestbook ::
html nicht möglich_-_html not possible
";
print "
Bitte folgende Fehler verbessern...";
foreach($error as $cerror)
print "
$cerror";
print "";
}
?>
",">",$comments);
//allow basic quotes and in the comments only
$comments = ereg_replace('\\\"',""",$comments);
$comments = nl2br($comments);
$nentry = "name: $name
";
$eentry = "eMail: $email
";
$hsentry = "page: $hsite
";
$centry = "2cents:
$comments
";
$tdstring = "";
$tdstring.= strftime ("%A, %B %d %Y, %H:%M");
$tdstring.= "
";
$complete_entry = $nentry.$eentry.$hsentry.$centry.$tdstring;
//all the variables have been processed and formatted, now add to the file
//this method adds the comment to the end of the file, I don't even know if this is done !!
/*
if(file_exists($gfile)) $fp = fopen($gfile,"a");
else $fp = fopen($gfile,"w");
flock($fp,1);
fputs($fp,$complete_entry);
flock($fp,3);
fclose($fp);
*/
//this method will add latest comments to beginning of the file and is commonly used
if(file_exists($gfile)) {
$fp = fopen($gfile,"r");
$guestentries = fread($fp,filesize($gfile));
fclose($fp);
}
$fp = fopen($gfile,"w");
flock($fp,1);
fputs($fp,$complete_entry);
if(isset($guestentries)) fputs($fp,$guestentries);
flock($fp,3);
fclose($fp);
print "
:: snooweatinganima :: sagt ::";
print "
danke für eure gedanken.";
print "
folgendes wurde eingetragen:";
print "
$complete_entry";
print "
ansehen";
print "";
$mailinfo = "\nname: ".$name."\neMail: ".$email."\npage: ".$hsite."\n2cents:\n".$oldcomments;
mail("info@snooweatinganima.de","eintrag ins gaestebuch","Eintrag im Gaestebuch: $mailinfo",
"From: Gaestebuch-Robot ");
//send the user an email thanking him, only if he entered an email address.
if($email != "") {
$user_name = split(' ', $name, 2);
if($user_name[0] == "") $user_name[0] = "du da";
mail($email,":: snooweatinganima :: sagt :: danke ::","$user_name[0],\ndanke fuer deine gedanken.\ndein eintrag lautet:$mailinfo\n\nnochmals danke,\nDominique",
"From: Dominique Kaspar \nReply-To: Dominique Kaspar