Sindbad~EG File Manager

Current Path : /usr/home/beeson/public_html/helpwithmath/italian/italian/
Upload File :
Current File : /usr/home/beeson/public_html/helpwithmath/italian/italian/download2.php

<?php 
function writeRed($errmsg)
	{ echo 	"<P> <em><font color=\"#FF0000\">";
	  echo $errmsg;
	  echo "</font></em></P>";
	}
 
function validate_email($email)
{  // Create the syntactical validation regular expression
   $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";
   // Presume that the email is invalid
   $valid = 0;
   // Validate the syntax
   if (eregi($regexp, $email))
   { list($username,$domaintld) = split("@",$email);
      // Validate the domain
     if (getmxrr($domaintld,$mxrecords))  // works on PacWeb server, but not on localhost 
         $valid = 1;
   } 
   else 
      $valid = 0;
   return $valid;
}

$ProductType= trim($_POST['ProductType']);
$WhichDisk = trim($_POST['WhichDisk']);
$Email = trim($_POST['Email']);

if(is_null($WhichDisk))
   { $WhichDisk = "7";
   }
if(is_null($ProductType))
   { mail("sales@HelpWithMath.com","Bug in your website","ProductType is null in download2.php");
    // this should never happen      
     header("Location: purchase.php?WhichDisk=$WhichDisk&ProductType=$ProductType");  
   // redirect to purchase;  this page only deals with the trial version
   }
if($ProductType  != "trial" && $productType != "paid") 
   { header("Location: purchase.php?WhichDisk=$WhichDisk&ProductType=$ProductType");  
   }
 
if($ProductType != "trial")  // for some reason if($ProductType == "paid") doesn't work
   { header("Location: download3.php?ProductType=$ProductType"); 
   // to enter a serial number and THEN download if it is allowed.   
   }

if(!is_null($Email) && validate_email($Email))   
   { 
	 header("Location: Install/SaveOrRun.php?Email=$Email&WhichDisk=$WhichDisk");
   }
?>   
<!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>Download MathXpert $WhichAssistant Assistant Trial Version";
?>
	     <img alt="MathXpert logo" src="TransparentMathXpertLogo.gif" height="50" width="118"/>
	</h2>
   <p>

   </p>
  <p>You will need a serial number to install MathXpert.  This serial number will be emailed automatically to the 
      email address you enter below. </p>
  <p> We will not share your email address with anyone else. </p>
   <form action= <?php echo $_SERVER['PHP_SELF']."?state=Edit"?> method="post" enctype="multipart/form-data" name="form1">
   <?php 
   if(!is_null($Email) && $_GET['state'] == "Edit")
        { writeRed("You must enter a valid email address.");
		}
   ?>
   <table width="500" border="0">
     <tr> 
	    <td width="100"> Email address:</td>
        <td width="250"> <input size="20" type="text" name="Email" value=<?php echo $Email ?>></td>
     </tr>
   </table>   
	  <p></p>
	    <input type="hidden" name = "ProductType" value = <?php echo $ProductType ?> >
	    <input type="hidden" name = "WhichDisk" value = <?php echo $WhichDisk ?> >
		<input type="submit" name="Submit" value="Download Now">         
		</p>		
   </form>
  </div>   

<p>
<a href= "index.php?include=antivirus.html">Will my antivirus software interfere with installing MathXpert? </a>
</p>
<p>
<a href="index.php?include=beginners.html" >Click here if you are new to downloading software and uncertain about the process.</a>
</p>

<?php include ('include/footer.php'); ?>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists