]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-sponsor_reg.php
Fix empty delimiter in isSpider()
[mailer.git] / inc / modules / guest / what-sponsor_reg.php
index cd23e6eda3bad9217a1119aca2670f6ab85f9d1e..fc1d82f326e1f34072cd98debac81c9eb6d12c7e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 06/10/2005 *
- * ===============                              Last change: 05/18/2008 *
+ * Mailer v0.2.1-FINAL                                Start: 06/10/2005 *
+ * ===================                          Last change: 05/18/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-sponsor_reg.php                             *
@@ -198,7 +198,7 @@ if (isFormSent()) {
        if (count($FORM_ERRORS) > 0) unsetPostRequestElement('ok');
 }
 
-if ((isFormSent()) && (count($FORM_ERRORS) == 0)) {
+if ((isFormSent()) && (count($FORM_ERRORS) == '0')) {
        // Generate message array
        $messageArray = array(
                'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'),
@@ -227,11 +227,11 @@ WHERE `id`='%s' LIMIT 1",
        // Check the status of the registration process
        switch ($STATUS) {
                case 'added': // Sponsor successfully added with account status = UNCONFIRMED!
-                       // Check for his ID number
+                       // Check for his id number
                        $result = SQL_QUERY_ESC("SELECT `id`, `hash` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `email`='%s' LIMIT 1",
                                array(postRequestElement('email')), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
-                               // ID found so let's load it for the confirmation email
+                               // id found so let's load it for the confirmation email
                                list($id, $hash) = SQL_FETCHROW($result);
 
                                // Prepare data for the email template
@@ -284,7 +284,7 @@ ORDER BY `pay_name`", __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Load all types...
                // @TODO Swap this HTML code to templates
-               $OUT = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"300\" class=\"left2 right2 top2\">\n";
+               $OUT = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"300\" class=\"left right top\">\n";
                $SW = 2;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Prepare content for output
@@ -345,14 +345,8 @@ ORDER BY `pay_name`", __FILE__, __LINE__);
                        $content['refid']       = bigintval(postRequestElement('refid'));
                } // END - if
 
-               // Prepare referal things
-               if (isGetRequestElementSet('refid')) {
-                       // Referal ID transmitted, we don't care here if it is right or not
-                       $content['refid'] = bigintval(getRequestElement('refid'));
-               } else {
-                       // No referal link
-                       $content['refid'] = 0;
-               }
+               // Prepare referal id
+               $content['refid'] = determineReferalId();
 
                // Display registration form
                loadTemplate('guest_sponsor_reg', false, $content);