Sindbad~EG File Manager
<?php
require_once('DB.php');
require_once('query.php');
$SerialNumber = $_POST['SerialNumber'];
$Email = $_POST['Email'];
if(is_null($SerialNumber))
header("Location: index.php"); // they didn't come by the correct referring page
// check if this serial number is in the Registered table, if so get the CustomerID;
// then check if there's an Order with that CustomerID and status "authorized". If so
// they may download, so redirect to SaveOrRun, passing the serial number as a _GET.
// If the serial number is registered but already shipped, give an error message.
// If the serial number is not registered let them proceed--I want to be able to give
// people a serial number and let them download a copy.
// Do not test for validity of the serial number itself, only whether it is registered.
$sql = "SELECT CustomerID FROM `Registered` WHERE SerialNumber='$SerialNumber';";
$q = query($sql);
if(!$q->fetchInto($row))
{ mail("sales@HelpWithMath.com","download","User downloaded saying they already have a serial number.\n Serial number they entered: $SerialNumber\nCustomer email: $Email\n");
header("Location: Install/SaveOrRun.html?SerialNumber=$SerialNumber" ); // ok, they can download
}
else
{ mail("sales@HelpWithMath.com","download","User downloaded using a serial number already registered: $SerialNumber\nCustomer email: $Email\n");
header("Location: Install/SaveOrRun.html?SerialNumber=$SerialNumber" ); // ok, they can download
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<?php include ('include/head.php'); ?>
<body onmousemove="closesubnav(event);">
<?php include ('include/body.php'); ?>
<?php
echo "<div class=\"style1\" id=\"pageName\">";
echo "<h2>Error. That serial number is already registered. ";
?>
<img alt="MathXpert logo" src="TransparentMathXpertLogo.gif" height="50" width="118"/></h2>
<p> If it came with a CD, you can reinstall from the original CD. </p>
<p>If it came from a reseller, contact that reseller. </p>
<p>If you paid for and downloaded a copy of MathXpert, and need a replacement, or if you believe there is an error, please contact <a href=\"mailto:support@HelpWithMath.com\">support@HelpWithMath.com</a>.</p>
</div>
<?php include ('include/footer.php'); ?>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists