X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-register.php;h=1a0b5463d453395417db9f34789e79c7a9f05b2d;hb=49a9663311b732d12ba0c53af2f9eb39a7850fbc;hp=6050874d19826384f1b9f646569a1ed2f6d9b740;hpb=f4fc80e21b9086988ffc3b91d3e43d51f61faf75;p=mailer.git diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 6050874d19..1a0b5463d4 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -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 - 2012 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,17 +37,17 @@ // Some security stuff... if (!defined('__SECURITY')) { - die(); + exit(); } // END - if // Add description as navigation point addYouAreHereLink('guest', __FILE__); if (!isExtensionActive('register')) { - displayMessage(generateExtensionInactiveNotInstalledMessage('register')); + displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=register%}'); return; } elseif (!isExtensionActive('country')) { - displayMessage(generateExtensionInactiveNotInstalledMessage('country')); + displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=country%}'); return; } @@ -55,41 +55,41 @@ 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--}'); } else { // Do this only if form is sent if (isFormSent()) { - if (postRequestParameter('agree') == '!') { + if (postRequestElement('agree') == '!') { registerOutputFailedMessage('HAVE_TO_AGREE'); } // END - if - if (postRequestParameter('email') == '!') { + if (postRequestElement('email') == '!') { registerOutputFailedMessage('ENTER_EMAIL'); - setPostRequestParameter('email', ''); - } elseif (postRequestParameter('email') == '?') { - registerOutputFailedMessage('GUEST_EMAIL_ALREADY_DB'); - setPostRequestParameter('email', ''); + setPostRequestElement('email', ''); + } elseif (postRequestElement('email') == '?') { + registerOutputFailedMessage('GUEST_EMAIL_IS_ALREADY_REGISTERED'); + setPostRequestElement('email', ''); } - if (postRequestParameter('surname') == '!') { + if (postRequestElement('surname') == '!') { registerOutputFailedMessage('ENTER_SURNAME'); - setPostRequestParameter('surname', ''); + setPostRequestElement('surname', ''); } // END - if - if (postRequestParameter('family') == '!') { + if (postRequestElement('family') == '!') { registerOutputFailedMessage('ENTER_FAMILY'); - setPostRequestParameter('family', ''); + setPostRequestElement('family', ''); } // END - if - if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) { + if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) { registerOutputFailedMessage('ENTER_BOTH_PASSWORDS'); - } elseif (postRequestParameter('pass1') == '!') { - registerOutputFailedMessage('ENTER_PASS1'); - } elseif (postRequestParameter('pass2') == '!') { - registerOutputFailedMessage('ENTER_PASS2'); + } elseif (postRequestElement('pass1') == '!') { + registerOutputFailedMessage('ENTER_PASSWORD1'); + } elseif (postRequestElement('pass2') == '!') { + registerOutputFailedMessage('ENTER_PASSWORD2'); } if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === true)) { @@ -108,20 +108,14 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { // Generate birthday selection switch (getLanguage()) { case 'de': // German date format - $content['birthday_selection'] = addSelectionBox('day', postRequestParameter('day')).addSelectionBox('month', postRequestParameter('month')).addSelectionBox('year', postRequestParameter('year')); + $content['birthday_selection'] = addSelectionBox('day', postRequestElement('day')).addSelectionBox('month', postRequestElement('month')).addSelectionBox('year', postRequestElement('year')); break; default: // Default is the US date format... :) - $content['birthday_selection'] = addSelectionBox('month', postRequestParameter('month')).addSelectionBox('day', postRequestParameter('day')).addSelectionBox('year', postRequestParameter('year')); + $content['birthday_selection'] = addSelectionBox('month', postRequestElement('month')).addSelectionBox('day', postRequestElement('day')).addSelectionBox('year', postRequestElement('year')); break; } // END - switch - // Adds a table for the guests with all visible categories - $content['category_selection'] = registerGenerateCategoryTable('guest', true); - - // 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 @@ -136,27 +130,15 @@ if ((isFormSent()) && (isRegistrationDataComplete())) { // ZIP codes are numerical values $content['zip'] = ''; - if ((isPostRequestParameterSet('zip')) && (postRequestParameter('zip') > 0)) { - $content['zip'] = bigintval(postRequestParameter('zip')); + if ((isPostRequestElementSet('zip')) && (postRequestElement('zip') > 0)) { + $content['zip'] = bigintval(postRequestElement('zip')); } // END - if // Other values foreach (array('gender', 'surname', 'family', 'street_nr', 'city', 'email') as $entry) { - $content[$entry] = SQL_ESCAPE(postRequestParameter($entry)); + $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 = ''; - $content['country'] = $OUT; - // Set must-fillout fields $content = runFilterChain('register_must_fillout', $content);