Wrong Image Verification Code Entered!
Please go back and enter it again.


"; include("footer.php"); exit; } } // Checking to see if the visitor has already posted -------------------- if ($gbflood == 1) { if (isset($_COOKIE['entry'])) { include("header.php"); $cookieval = $_COOKIE['entry']; echo $cookieval; echo "

$goback
"; include("footer.php"); exit; } // Set cookie for flood protection -------------------------------------------------------------- $cookie = setcookie('entry','

Sorry, You have already posted a Message on this guestbook.
Please wait 2 minutes and try again.


',time() + (120)); } // End of If statement for flooding // Including header of the system --------------------------------------- //include("functions.php"); include("header.php"); // Check for Banned IP if Option is set --------------------------------- if ($banIPKey == 1) { include("ban.php"); } // Check to make sure that the post is coming from YOUR domain ---------- if ($referersKey == 1) { if (!check_referer($referers)) { // Form was not submitted from the site so exit echo "

You are attempting to submit this entry from an
UNAUTHORIZED LOCATION. Your IP Number and Address has been logged.
Please be warned that continuing your attempt
to flood this guestbook may result
in legal action against you and your organization.
"; include("footer.php"); exit; } } // Re-assigning the variables passed by posted form --------------------- $yourname = $_POST['yourname']; $youremail = $_POST['youremail']; $yourmessage = $_POST['yourmessage']; $date = date("D m/j/y g:iA"); // Error Handeling and entry checking ----------------------------------- echo "

$addentryheadtxt

"; // Name Validation Section ----------------------------- if ($name_optional != 1) { if (strlen($yourname) > 40) // Check Name Length { $error .= "
$error1"; } if (empty($yourname)) // Check if Name field is empty { $error .= "
$error4"; } } // Email Validation Section ---------------------------- if ($email_optional != 1) { if (strlen($youremail) > 40) // Check Email Length { $error .= "
$error2"; } if (empty($youremail)) // Check if Email field is empty { $error .= "
$error5"; } if (checkmail($youremail) != 1) // Validate Email format { $error .= "
$error3"; } } // Message Validation Section --------------------------- if ($message_optional != 1) { if (empty($yourmessage)) // Check if Message field is empty { $error .= "
$error6"; } } // Exit Program if there is an error -------------------- if (isset($error)) { $z="1"; echo $error; echo "

$goback
"; include("footer.php"); exit; } if (!isset($error)) { // Detect Spam based on keywords ------------------------------------------------------------------ if ($gbSpamKey == 1) { $detectSpam = spamDetect($yourmessage); if($detectSpam == true) { $yourmessage = str_replace("\n", "
", $yourmessage); $yourmessage = str_replace("\r", "
", $yourmessage); $message_ip_log = $_SERVER['REMOTE_ADDR']; $message_ip_address_log = gethostbyaddr($_SERVER['REMOTE_ADDR']); $message_time_log = $date; $message_log_string = $message_time_log." | ".$message_ip_log." | ".$message_ip_address_log." | ".$yourname." | ".$yourmessage."\n"; $fp = fopen("data/message_spam.log", "a"); fwrite($fp, $message_log_string); fclose($fp); echo "
SPAM DETECTED!
Your IP HAS BEEN LOGGED
AND WILL BE REPORTED TO YOUR ISP.
"; echo "

$goback
"; include("footer.php"); exit; } } // Log visitor IP Number and IP Address if option is set by guestbook administrator --------------- if ($gbIPLogKey == 1) { $message_ip_log = $_SERVER['REMOTE_ADDR']; $message_ip_address_log = gethostbyaddr($_SERVER['REMOTE_ADDR']); $message_time_log = $date; $message_log_string = $message_time_log." | ".$message_ip_log." | ".$message_ip_address_log." | ".$yourname."\n"; $fp = fopen("data/message_post.log", "a"); fwrite($fp, $message_log_string); fclose($fp); } // Notify administrator of new email if option is selected ---------------------------------------- if ($notify_admin == 1) { mail("$notify_admin_email", "$notify_subject", "$notify_message"); } // Smiley face insertion into the message --------------------------------------------------------- $yourname = clean_message(stripslashes($yourname)); $yourmessage = clean_message(stripslashes($yourmessage)); // Call for filtering bad words ------------------------------------------------------------------- if ($gbBadWordsKey == 1) { $yourmessage = swapBadWords($yourmessage); } // Give Confirmation that the Guestbook Entry was written ----------------------------------------- echo "

$result1 "; echo $date; echo "

"; $temp1 = stripslashes($yourname); $temp2 = stripslashes($youremail); $temp3 = stripslashes($yourmessage); echo "
"; echo "$yournametxt $temp1
"; echo "$youremailtxt $temp2
"; echo "$yourMessagetxt ".smiley_face($temp3)."
"; echo "
"; // Write the verified guestbook entry to file ---------------------------------------------------- $a = new gbClass(); $a->setGBVars($date,$yourname,$youremail,$yourmessage); @ $fp = fopen("data/list.txt","a"); flock($fp, 2); if (!$fp) { echo "

$error7. " ."$error8.

"; exit; } $data = serialize($a).""; fwrite($fp, $data); flock($fp, 3); fclose($fp); echo "

$result2.

"; } include("footer.php"); ?>