"readerlinks.php", ""=>"", ""=>"", ""=>"", ""=>""); /* confirm that all of the fields have proper values */ if (isset($_POST['submit'])) { $check = $_POST['check']; $name = $_POST['name']; $email = $_POST['email']; $pass = $_POST['pass']; $badwords = "/yandex|preved|yozheg|sex|pussy|shit|fuck|penis|cock|cunt|vagina|slut|anal|nude|asian|hardcore|gay|tits|boob|nipple|interacial|porn/i"; //words that should not exist in the name or message unset($errors); unset($success); // check for errors if ($email == "" || !preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email) || strlen($email) < 10) { $errors[] = "Make sure you enter a valid email address."; } $badcheck = $name; if(preg_match($badwords,$badcheck,$out) != 0) { $errors[] = "The name you entered is naughty. Tsk tsk."; } if($name == "") { $errors[] = "You did not enter a name."; } if ($check == "") { $errors[] = "Type image text into the box."; } else if (md5($check) != $_SESSION['image_random_value']) { $errors[] = "Your Validation failed. Make sure you type the letters and numbers exactly as they appear in the image below. Use all uppercase."; } if($pass != "recommend" && $pass != "between") { $errors[] = "You entered the incorrect word from the book."; } if (md5($check) == $_SESSION['image_random_value'] && empty($errors)) { $page = $pages['linklist1']; $loggedin = 1; //write to a log file $myFile = "/home1/computl1/www/logs/ad324FRJ32logins.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $today = date("D M j G:i:s T Y"); $stringData = "{$today}::{$name}::{$email}\n"; fwrite($fh, $stringData); fclose($fh); /*** Make sure to check that the user isn't already on the mailing list, then add the user ***/ //print "campid: ".$_SESSION['campid']; //header("HTTP/1.0 307 Temporary redirect"); //header("Location: http://www.computerjourney.com/php/ml/responder.php"); /* include "/home1/computl1/www/php/ml/include/database/mysql.php"; include "/home1/computl1/www/php/ml/connection/connection.php"; include "/home1/computl1/www/php/ml/cfg/table.inc.php"; include "/home1/computl1/www/php/ml/functions/subscribers_functions.php"; $check1=Check_Email_Existing($campid,$email); $check2=Check_Email_Existing_Inactive($campid,$email); $check3=Check_Email_Unconfirmed($campid,$email); //check if the email already exists if($check1 > 0 || $check2 > 0 || $check3 > 0) { $errors[] = "The email address entered already exists on the mailing list or is pending confirmation. If you believe there is an error please contact the admin."; }//end if email already exists else { unset($_POST); }//end else new member */ } else { $page = "login.php"; } } else if(isset($_POST['page'])) { $page = $pages[$_POST['page']]; $loggedin = 1; } else { $page = "login.php"; } ?>
" . $f . "


\n"; } } ?>