]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-register.php
Rewrite of all mail templates with user data to new 'tag-like' functionality
[mailer.git] / inc / modules / guest / what-register.php
index 9065ccf701edaa5bc5d6800c9c54b79bdd00d78f..ee7f7de2dc73e9cd608e8f74e62910bd9d95c3fe 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/10/2003 *
- * ===============                              Last change: 11/26/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 10/10/2003 *
+ * ===================                          Last change: 11/26/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-register.php                                *
@@ -140,8 +140,7 @@ if (isFormSent()) {
 
        if ((postRequestElement('email') != '!') && (getConfig('check_double_email') == 'Y')) {
                // Does the email address already exists in our database?
-               $CHK = isEmailTaken(postRequestElement('email'));
-               if ($CHK === true) {
+               if ((!isAdmin()) && (isEmailTaken(postRequestElement('email')))) {
                        setRequestPostElement('email', '?');
                        $isOkay = false;
                } // END - if
@@ -404,7 +403,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        }
 
        if ($shortPass === true) {
-               registerOutputFailedMessage('SHORT_PASS', ": ".getConfig('pass_len'));
+               registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
        } // END - if
 
        if ($ipTimedOut === true) {
@@ -412,7 +411,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        } // END - if
 
        if ((!empty($cats)) && ($cats < getConfig('least_cats'))) {
-               registerOutputFailedMessage(sprintf(getMessage('CATS_LEAST'), getConfig('least_cats')));
+               registerOutputFailedMessage('', sprintf(getMessage('CATS_LEAST'), getConfig('least_cats')));
        } // END - if
 
        // Generate birthday selection
@@ -448,9 +447,12 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        $content['surname']   = SQL_ESCAPE(postRequestElement('surname'));
        $content['family']    = SQL_ESCAPE(postRequestElement('family'));
        $content['street_nr'] = SQL_ESCAPE(postRequestElement('street_nr'));
-       $content['zip']       = bigintval(postRequestElement('zip'));
+       $content['zip']       = '';
+       if (isPostRequestElementSet('zip')) {
+               $content['zip']       = bigintval(postRequestElement('zip'));
+       } // END - if
        $content['city']      = SQL_ESCAPE(postRequestElement('city'));
-       $content['email']      = SQL_ESCAPE(postRequestElement('email'));
+       $content['email']     = SQL_ESCAPE(postRequestElement('email'));
 
        // Prepare country selection box
        $OUT  = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n";