Sindbad~EG File Manager

Current Path : /usr/home/beeson/public_html/helpwithmath_old/italian/
Upload File :
Current File : /usr/home/beeson/public_html/helpwithmath_old/italian/CheckSN.php

<?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>Errore. Quel numero seriale � gi� stato registrato. ";
?>
     <img alt="MathXpert logo" src="TransparentMathXpertLogo.gif" height="50" width="118"/></h2>
  <p> Se l'hai ottenuto dal CD, puoi reinstallare il prodotto dal CD originale.  </p>
  <p>Se l'hai ottenuto da un rivenditore, contattalo.  </p>
  <p>Se hai pagato per una copia scaricata dal Web di MathXpert, e stai facendo una restituzione, o se pensi che ci sia un errore, contatta <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