X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-register.php;h=01773d9b814bed13e12931bcf76744c885974122;hb=8d2c9b91eb82ea74fac58b2541982f760d0f77fc;hp=827231b4996958e2015ba68c06b20b6ad8e81d07;hpb=fc07ca1ff0407536a14a6d04555ba54c5f3e719d;p=mailer.git
diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php
index 827231b499..01773d9b81 100644
--- a/inc/modules/guest/what-register.php
+++ b/inc/modules/guest/what-register.php
@@ -14,10 +14,9 @@
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -53,54 +52,57 @@ if (!isExtensionActive('register')) {
}
// Is the form sent and all went fine?
-//* DEBUG: */ print intval(isFormSent()) . '/' . intval(isRegistrationDataComplete()) . '/' . intval(isAdmin()) . '
';
+//* DEBUG: */ debugOutput('isFormSent=' . intval(isFormSent()) . ',isRegistrationDataComplete=' . intval(isRegistrationDataComplete()) . ',isAdmin=' . intval(isAdmin()));
if ((isFormSent()) && (isRegistrationDataComplete())) {
// Do the registration here
doRegistration();
// Output success registration
- loadTemplate('admin_settings_saved', false, getMessage('REGISTRATION_DONE'));
+ loadTemplate('admin_settings_saved', false, '{--REGISTRATION_DONE--}');
} else {
- if (postRequestParameter('agree') == '!') {
- registerOutputFailedMessage('HAVE_TO_AGREE');
- } // END - if
-
- if (postRequestParameter('email') == '!') {
- registerOutputFailedMessage('ENTER_EMAIL');
- setPostRequestParameter('email', '');
- } elseif (postRequestParameter('email') == '?') {
- registerOutputFailedMessage('EMAIL_ALREADY_DB');
- setPostRequestParameter('email', '');
- }
-
- if (postRequestParameter('surname') == '!') {
- registerOutputFailedMessage('ENTER_SURNAME');
- setPostRequestParameter('surname', '');
- } // END - if
-
- if (postRequestParameter('family') == '!') {
- registerOutputFailedMessage('ENTER_FAMILY');
- setPostRequestParameter('family', '');
- } // END - if
-
- if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
- registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
- } elseif (postRequestParameter('pass1') == '!') {
- registerOutputFailedMessage('ENTER_PASS1');
- } elseif (postRequestParameter('pass2') == '!') {
- registerOutputFailedMessage('ENTER_PASS2');
- }
-
- if ($GLOBALS['registration_short_password'] === true) {
- registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
- } // END - if
-
- if ($GLOBALS['registration_ip_timeout'] === true) {
- registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
- } // END - if
-
- if ((!empty($GLOBALS['register_selected_cats'])) && ($GLOBALS['register_selected_cats'] < getConfig('least_cats'))) {
- registerOutputFailedMessage('', getMessage('CATS_LEAST'));
+ // Do this only if form is sent
+ if (isFormSent()) {
+ if (postRequestParameter('agree') == '!') {
+ registerOutputFailedMessage('HAVE_TO_AGREE');
+ } // END - if
+
+ if (postRequestParameter('email') == '!') {
+ registerOutputFailedMessage('ENTER_EMAIL');
+ setPostRequestParameter('email', '');
+ } elseif (postRequestParameter('email') == '?') {
+ registerOutputFailedMessage('GUEST_EMAIL_ALREADY_DB');
+ setPostRequestParameter('email', '');
+ }
+
+ if (postRequestParameter('surname') == '!') {
+ registerOutputFailedMessage('ENTER_SURNAME');
+ setPostRequestParameter('surname', '');
+ } // END - if
+
+ if (postRequestParameter('family') == '!') {
+ registerOutputFailedMessage('ENTER_FAMILY');
+ setPostRequestParameter('family', '');
+ } // END - if
+
+ if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
+ registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
+ } elseif (postRequestParameter('pass1') == '!') {
+ registerOutputFailedMessage('ENTER_PASS1');
+ } elseif (postRequestParameter('pass2') == '!') {
+ registerOutputFailedMessage('ENTER_PASS2');
+ }
+
+ if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === true)) {
+ registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
+ } // END - if
+
+ if ((isset($GLOBALS['registration_ip_timeout'])) && ($GLOBALS['registration_ip_timeout'] === true)) {
+ registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
+ } // END - if
+
+ if ((!empty($GLOBALS['register_selected_cats'])) && ($GLOBALS['register_selected_cats'] < getConfig('least_cats'))) {
+ registerOutputFailedMessage('', '{--CATS_LEAST--}');
+ } // END - if
} // END - if
// Generate birthday selection
@@ -123,10 +125,10 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
// Shall I display the refid or shall I make it editable?
if (getConfig('display_refid') == 'Y') {
// Load "hide" form template
- $content['refid_content'] = loadTemplate('guest_register_refid_hide', true, determineReferalId());
+ $content['refid_content'] = loadTemplate('guest_register_refid_hide', true);
} else {
// Load template to enter it
- $content['refid_content'] = loadTemplate('guest_register_refid', true, determineReferalId());
+ $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. :-)
@@ -143,12 +145,14 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
$content['city'] = SQL_ESCAPE(postRequestParameter('city'));
$content['email'] = SQL_ESCAPE(postRequestParameter('email'));
- // Prepare country selection box
- $OUT = "';
$content['country'] = $OUT;
// Set must-fillout fields