Beispiel #1
0
     $customerEmail = $_POST['customerEmail'];
     if (!eregi("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})\$", $customerEmail)) {
         if (!empty($errorMessage)) {
             $errorMessage .= '<br />';
         }
         $errorMessage .= 'Please enter a valid e-mail address.';
     }
 } else {
     if (!empty($errorMessage)) {
         $errorMessage .= '<br />';
     }
     $errorMessage .= 'Please enter your e-mail address.';
 }
 if (empty($errorMessage)) {
     // process data.
     $registration = new CustomerRegistration();
     $registration->customer_name = $customerName;
     $registration->customerEmail = $customerEmail;
     $registration->app_id = $app->id;
     $registration->insertOrUpdate();
     if ($registration->ok()) {
         if (!$registration->sendConfirmationMail()) {
             if (!empty($errorMessage)) {
                 $errorMessage .= '<br />';
             }
             $errorMessage .= 'There was a problem in sending the registration e-mail. Please contact <a href="mailto:' . $Config->supportEmail . '?Subject=Download%20Registration%20Mail">' . $Config->supportEmail . '</a> and describe the issue.';
         } else {
             $mailOK = TRUE;
         }
     } else {
         if (!empty($errorMessage)) {
Beispiel #2
0
<?php

require 'includes/master.inc.php';
$Config = Config::getConfig();
$registration = new CustomerRegistration($_REQUEST['id']);
if (!$registration->ok()) {
    die('Invalid customer registration');
}
if (strtolower($registration->customerEmail) == strtolower($_REQUEST['customerEmail'])) {
    // verified
    $registration->email_confirmed = 'YES';
    $registration->update();
    $scriptName = 'download.php?id=' . $registration->app_id;
    $downloadLink = 'http://' . $_SERVER['HTTP_HOST'] . WEB_ROOT . '/' . $scriptName;
    header("Location: {$downloadLink}");
    exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>Invalid parameter</title>
</head>
<body>
You have specified an incorrect download link.  
<?php 
$appID = !empty($_REQUEST['app_id']) ? $_REQUEST['app_id'] : $registration->app_id;
if (!empty($appID)) {
    ?>
	<br />Please <a href="download-register.php?id=<?php 
    echo $appID;
    ?>