false, "lastname" => false, "email" => false, "message" => false ); //$quirky = array("firstname" => false, "lastname" => 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 ( 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($email) && fieldcheck($firstname) && fieldcheck($lastname) ){ $valid = "FALSE"; } if ( $valid == "TRUE" ){//weve made it this far, valid everything, send me the mail /*$myEmailAddress = "gregcope@algosome.com"; if ( mail( $myEmailAddress, "Algosome.com: Feedback from ".$firstname." ".$lastname , $message, "From: $email" ) ){ header( "Location: http://www.algosome.com/redirect.html" ); }else{ echo "We're sorry, your message could not be sent - please contact gregcope at algosome dot com"; }*/ $ip = $_SERVER['REMOTE_ADDR']; $db = 'gcopeg_algo_writer'; $link = mysql_connect('localhost', 'gcopeg_algo', 'sEXG=m=IPP') ; // $db = 'gregAlgoWriter'; // $link = mysql_connect('72.167.233.85', 'gregAlgoWriter', 'y6yGH0ip2') ; if (! $link); mysql_select_db($db , $link); $mysqlQuery = "INSERT INTO PDBViewerDownloads (first_name, last_name, institution, email, phone, address1, address2, city, state, zip_code, IPAddress, keep_informed, use_type ) VALUES('".$firstname."', '".$lastname."', '".$institution."','".$email."', '".$phone."', '".$address1."', '".$address2."', '".$city."', '".$state."', '".$zipcode."', '".$ip."', '".$kI."','".$tU."')"; //echo $mysqlQuery; mysql_query( $mysqlQuery ) or die(mysql_error()); mysql_close($link); header('Location: http://www.algosome.com/pdbviewer/download-license.html'); exit(); } ?> VistaPDB Software - Download Registration
Unable to proceed. Please make sure the required information is valid.

'; } ?>

Registration -> License -> Download

VistaPDB Registration:

Please complete the registration form below. * denote required information.

Name*
FirstLast
Institution
Address
Street Address
Address Line 2
CityState/Province
Postal/Zip Code
Email*
Phone
 -  - 
Targeted Use
style="width:15px;" />Academia  style="width:15px;" />Industry  style="width:15px;" />Government  style="width:15px;" />Other 
style="width:20px" />Keep me informed of news and events.
Privacy Policy
To prevent automated spamming, please enter the numbers and letters as they appear in the image in the box below.
validate