Lost Registration'; echo'
'; echo'

Lost Registration '; if ($_SERVER["DOCUMENT_ROOT"] == "/home/gsak/public_html") {$user = "gsak_data";} else {$user = "gsak60_data";} ; if (!preg_match($email_pattern, $email)) { echo' - Woops!

'; echo ''; echo '
'; echo 'The email address you have entered is not formatted correctly. You probably hit the wrong key on the keyboard. Click on the go back button in your browser or click here to try again '; echo '
'; } else { $dbh=mysql_connect ("localhost", $user, "data24") or die ("I cannot connect to the database because: " . mysql_error()); mysql_select_db($user) or die( "Unable to select database"); $clean = mysql_real_escape_string($email) ; $query = "Select * from RegMaster where email = '" . $clean . "'"; $result = mysql_query($query)or die(mysql_error()); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); $name = $row['RegName']; $serial6 = $row['Serial6']; $serial7a = $row['Serial7a']; $serial7b = $row['Serial7b']; $serial8 = $row['Serial8']; $extra = $row['extra']; $v7 = $row['V7']; $v8 = $row['V8']; $gid = $row['gId']; $x = 0; $snov6 = ''; $snov7a = ''; $snov7b = ''; $sno8 = ''; $upgrade =''; $v6text = "\n\nIf using GSAK version 6 or lower:"; While ($x < 8) { $w = substr($serial6,$x,1); $snov6 = $snov6 . chr(ord($w) - 9 + $x); $x = $x + 1; } $x = 0; While ($x < 9) { $w = substr($serial7a,$x,1); $snov7a = $snov7a . chr(ord($w) - 9 + $x); $x = $x + 1; } $x = 0; While ($x < 15) { $w = substr($serial7b,$x,1); $snov7b = $snov7b . chr(ord($w) - 9 + $x); $x = $x + 1; } $x = 0; While ($x < 16) { $w = substr($serial8,$x,1); $sno8 = $sno8 . chr(ord($w) - 9 + $x); $x = $x + 1; } if ($v7 == 0) { $snotext = "\n\nFor GSAK version 6 use:\n\nName: " . $name . "\nSerial #: " . $snov6 . "\n\n"; } if ($v7 == 1) { $snotext = "\n\nFor GSAK versions 7.0.0 to 7.7.1 use:\n\nName: " . $name . "\nSerial #: " . $snov7a . "\n\nFor GSAK versions 7.7.2 onwards use:\n\nName: " . $name . "\nSerial #: " . $snov7b . "\n\n"; } if ($v8 == 1) { $snotext = "\n\nFor GSAK version 8 use:\n\nName: " . $name . "\nSerial #: " . $sno8; } else { $upgrade = "Version 8 is a chargeable upgrade. For more information see http://gsak.net/board/index.php?showtopic=19776&view=findpost&p=141429" . "\nYou can upgrade to a Version 8 registration with your discount using this link: http://gsak.net/upgradev8.php?id=" . md5($gid); } $serial = substr($serial,2,1) . substr($serial,0,2) . substr($serial,3); $msg = "This is an automated response for your registration information to be sent to " . $email . $snotext . $upgrade . "\n\nTo register GSAK with this information: \n\n1. Start GSAK\n2. Help=>Register\n3. Click on the 'Register Now' button\n" . "4. Enter the details above\n5. Click on OK\n\nPlease also see http://gsak.net/help/hs1070.htm#FAQ14\n\n" . "For the GSAK support forum see http://support.gsak.net\n\nRegards\nClyde"; // mail( "cwe@iinet.net.au", "A2600 test", $msg, "From: $email" ); mail( $email, "GSAK lost Registration details", $msg, "From: clyde@gsak.net" ); $msg = "" . $email . "" . $msg; mail( "register@gsak.net", "GSAK lost Registration details - cweresend", $msg, "From: clyde@gsak.net" ); echo' - Found! '; echo ''; echo '
'; echo "The email address $email was found in the registration database and an email has been sent to that address with your registration details"; echo '
'; } else { echo' - Woops! '; echo ''; echo '
'; echo "The email address $email was not found in the registration database." . 'Click on the go back button in your browser or click here to try again '; echo '
'; } } include 'Footer.txt'; ?>