]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/guest/what-register.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / modules / guest / what-register.php
index 1cf1ea0402282e3033609c540011a66ecf6992be..8809d0ed64923338f3f2fccbb3af3b18242a4d3b 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -37,7 +37,7 @@
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       die();
+       exit();
 } // END - if
 
 // Add description as navigation point
@@ -55,7 +55,7 @@ if (!isExtensionActive('register')) {
 //* DEBUG: */ debugOutput('isFormSent=' . intval(isFormSent()) . ',isRegistrationDataComplete=' . intval(isRegistrationDataComplete()) . ',isAdmin=' . intval(isAdmin()));
 if ((isFormSent()) && (isRegistrationDataComplete())) {
        // Do the registration here
-       doRegistration();
+       doUserRegistration();
 
        // Output success registration
        displayMessage('{--REGISTRATION_DONE--}');
@@ -84,19 +84,19 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
                        setPostRequestElement('family', '');
                } // END - if
 
-               if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) {
+               if ((postRequestElement('password1') == '!') && (postRequestElement('password2') == '!')) {
                        registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
-               } elseif (postRequestElement('pass1') == '!') {
+               } elseif (postRequestElement('password1') == '!') {
                        registerOutputFailedMessage('ENTER_PASSWORD1');
-               } elseif (postRequestElement('pass2') == '!') {
+               } elseif (postRequestElement('password2') == '!') {
                        registerOutputFailedMessage('ENTER_PASSWORD2');
                }
 
-               if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === true)) {
+               if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === TRUE)) {
                        registerOutputFailedMessage('GUEST_SHORT_PASS', ': ' . getPassLen());
                } // END - if
 
-               if ((isset($GLOBALS['registration_ip_timeout'])) && ($GLOBALS['registration_ip_timeout'] === true)) {
+               if ((isset($GLOBALS['registration_ip_timeout'])) && ($GLOBALS['registration_ip_timeout'] === TRUE)) {
                        registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
                } // END - if
 
@@ -108,29 +108,23 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
        // Generate birthday selection
        switch (getLanguage()) {
                case 'de': // German date format
-                       $content['birthday_selection'] = addSelectionBox('day', postRequestElement('day')).addSelectionBox('month', postRequestElement('month')).addSelectionBox('year', postRequestElement('year'));
+                       $content['birthday_selection'] = addSelectionBox('da', postRequestElement('day')).addSelectionBox('mo', postRequestElement('month')).addSelectionBox('ye', postRequestElement('year'));
                        break;
 
                default: // Default is the US date format... :)
-                       $content['birthday_selection'] = addSelectionBox('month', postRequestElement('month')).addSelectionBox('day', postRequestElement('day')).addSelectionBox('year', postRequestElement('year'));
+                       $content['birthday_selection'] = addSelectionBox('mo', postRequestElement('month')).addSelectionBox('da', postRequestElement('day')).addSelectionBox('ye', postRequestElement('year'));
                        break;
        } // END - switch
 
-       // Adds maximum receiveable mails list... :)
-       $content['max_receive_list'] = addMaxReceiveList('guest', '', true);
-
        // Shall I display the refid or shall I make it editable?
        if (isDisplayRefidEnabled()) {
                // Load "hide" form template
-               $content['refid_content'] = loadTemplate('guest_register_refid_hide', true);
+               $content['refid_content'] = loadTemplate('guest_register_refid_hide', TRUE);
        } else {
                // Load template to enter it
-               $content['refid_content'] = loadTemplate('guest_register_refid', true);
+               $content['refid_content'] = loadTemplate('guest_register_refid', TRUE);
        }
 
-       // You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)
-       $content['header_content'] = loadTemplate('register_header', true);
-
        // ZIP codes are numerical values
        $content['zip'] = '';
        if ((isPostRequestElementSet('zip')) && (postRequestElement('zip') > 0)) {
@@ -142,23 +136,11 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
                $content[$entry] = SQL_ESCAPE(postRequestElement($entry));
        } // END - foreach
 
-       // The admin may see all
-       $whereStatement = "WHERE `is_active`='Y'";
-       if (isAdmin()) {
-               $whereStatement = '';
-       } // END - if
-
-       // Prepare country selection box
-       $OUT  = '<select name="country_code" class="form_select" size="1">';
-       $OUT .= generateOptionList('countries', 'id', 'descr', postRequestElement('country_code'), 'code', $whereStatement);
-       $OUT .= '</select>';
-       $content['country'] = $OUT;
-
        // Set must-fillout fields
        $content = runFilterChain('register_must_fillout', $content);
 
        // Display registration form
-       loadTemplate('guest_register', false, $content);
+       loadTemplate('guest_register', FALSE, $content);
 }
 
 // [EOF]