// User-defined Variables (FEEL FREE TO EDIT THESE)
$head_title = "schreibt's Euch von der Seele";
$body_alink = "#903636";
$body_bgcolor = "#E2DAD2";
$body_link = "#903636";
$body_text = "#000000";
$body_vlink = "#6F2D2D";
$table_bgcolor = array("#E2DAD2", "#C4BCB4");
$font_altcolor = "#203050";
$font_face = "trebuchet ms, trebuchet, verdana, arial, geneva, sans-serif";
$font_size = "12px";
$form_bgcolor = "#D5CABF";
$form_text = "#1B212B";
$order = "1";
$timeAdjustment = "0";
$comments_path = "";
$email = "anghy@t-online.de";
$showip = "0";
// Begin Comment Parsing (DON'T EDIT THIS)
error_reporting(7);
$commentID = ereg_replace('[^_&A-Z&a-z&0-9]', '', getenv('QUERY_STRING'));
$commentText = preg_replace('/<((?!\/?(b|i|u|a|ol|ul|li)\b)[^>]*)>/xis', '', ' ' . stripslashes(trim($commentText)));
$commentText = trim(eregi_replace("[^\"]((http|mailto|ftp):\/\/[^[:space:]<>]{1,})", " \\1", $commentText));
$commentText = str_replace("\n", '
', $commentText);
if($commentText) {
if(!isset($commentName) && isset($submit)) $commentName = 'Anonymous'; else $commentName = strip_tags(trim($commentName));
if(!isset($commentMail)) $commentMail = ''; else $commentMail = strip_tags(trim($commentMail));
if(!isset($commentSite)) $commentSite = ''; else $commentSite = strip_tags(trim($commentSite));
if(strlen($commentSite) && !stristr($commentSite, 'http://')) $commentSite = 'http://' . $commentSite;
if($commentName == "")
{
$commentName = "Anonym";
}
$commentDate = time() + ($timeAdjustment * 3600);
$thisComment = $commentDate . '[+]' . $commentName . '[+]' . $commentMail . '[+]' . $commentText . '[+]' . $commentSite . '[+]' . getenv('REMOTE_ADDR') . "\n";
$file = @fopen("comments/$commentID.comment", 'a');
fwrite($file, $thisComment);
fclose($file);
$cookie = $commentName . '[+]' . $commentMail . '[+]' . $commentSite;
setcookie('comments', $cookie, time() + 31536000);
if($email) {
mail($email, "Neuer Kommentar [$commentID]", stripslashes($commentText) . "\n\n--\nAuf der folgenden Seite kannst Du den Kommentar sehen " . $comments_path . "http://www.seelenfarben.de/comments.php?" . $commentID, "From: $commentName <$commentMail>");
}
} elseif($HTTP_COOKIE_VARS['comments']){
list($commentName, $commentMail, $commentSite) = explode('[+]', $HTTP_COOKIE_VARS['comments']);
}
if($file = @fopen($comments_path . "comments/$commentID.comment", 'r')) {
$comments = fread($file, '1000000');
$comments = explode("\n", trim($comments));
fclose($file);
for($i = 0; $i < sizeof($comments); $i++) {
$thisComment = explode('[+]', stripslashes($comments[$i]));
$thisComment[0] = ' ' . date("d M, Y H:i", $thisComment[0]);
if($thisComment[2]) $thisComment[2] = ' [' . $thisComment[2] . '] ';
if($thisComment[4]) $thisComment[1] = '' . $thisComment[1] . '';
if($thisComment[5] && $showip) $thisComment[5] = ' ' . $thisComment[5]; else $thisComment[5] = '';
$comment[$i] = $thisComment[3] . "
\n