VistaPDB Support
VistaPDB is currently a deprecated project without ongoing support. Please Contact for more information.
false, "email" => false, "message" => false ); $quirky = array("firstname" => false, "email" => false ); /*Check for spam the old fassioned way, using matches for to, cc, and bcc */ function spamcheck($field) { if(eregi("to:",$field) !== FALSE || eregi("cc:",$field) !== FALSE || eregi("bcc:",$field) !== FALSE ) //weve found something bad { return TRUE; } else { return FALSE; } if ( trim( $field ) == "" ){ return true; } else{ return false; } } /*Check the email using a regex, this pretty much makes the spamcheck function useless, but I'll leave it just in case */ function emailCheck($field){ if( (strpos($field,"@") === FALSE || strpos($field,".") === FALSE )) //not found - alert { return true; } else{ return false; } } /*Checks for an empty field */ function fieldcheck($field){ if ($field == "" ){ return true; } else return false; } /*Now go through the form values and look for empty or invalid values */ /* if ( fieldcheck($firstname) ){//blank first name $valid = "firstName"; $empty["firstname"] = true; } if ( preg_match( "(^[a-zA-Z-' ]+$)",$firstname) != 1 ){//quirky first name $valid ="quirkyFirstName"; $quirky["firstname"] = true; } if ( fieldcheck($lastname) ){//no last name $valid = "lastName"; $empty["lastname"] = true; } if ( preg_match( "(^[a-zA-Z-' ]+$)",$lastname) != 1 ){//quirky last last name $valid ="quirkyLastName"; $quirky["lastname"] = true; } if ( fieldcheck($email) ){//no email $valid = "email"; $empty["email"] = true; } if ( fieldcheck($message) ){//no message $valid = "message"; $empty["message"] = true; } if ( spamcheck( $email ) || emailCheck( $email ) == true ){ $valid = "spam"; $quirky["email"] = true; }*/ //if ( preg_match( "(^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$)", $email ) != 1 ){ // $valid = "invalidEmail"; // $quirky["email"] = true; //} //now if its the first time loading the form, all fields will be blank...do this so nothing is echo'd below if ( fieldcheck($message) ){ $valid = "FALSE"; } if ( preg_match("(^[0-9\.]*$)", $key ) != 1){ $valid = 'locked'; } //print_r(str_split(strtoupper($validation_entry))); if ( !validateEntry( str_split(strtoupper($validation_entry)), $key ) ){ $valid = 'locked'; } if ( $valid == "TRUE" ){//weve made it this far, valid everything, send me the mail //'localhost', 'gcopeg_algo', 'sEXG=m=IPP', 'gcopeg_algo_articles' $db = 'gcopeg_algo_writer'; $link = mysql_connect('localhost', 'gcopeg_algo', 'sEXG=m=IPP') ; if (!$link){ die('We apologize for the inconvenience. Our server is currently undergoing maintanance. Please check back again soon!'); } mysql_select_db($db , $link); mysql_query("INSERT into PDBViewerBugReports (email_address, IPAddress, bug_title, user_name, bug_description) VALUES( '$email','$ip', '$title', '$firstname', '$message' )") or die(mysql_error()); mysql_close($link); header('Location: http://www.algosome.com/gene-coder/support-thanks.html'); exit(); } ?>
VistaPDB is currently a deprecated project without ongoing support. Please Contact for more information.