$ipTimedOut = false;
// Default refid is zero
-setPostRequestElement('refid', 0);
+setPostRequestParameter('refid', 0);
if (determineReferalId() > 0) {
// Test if the refid is valid
if (!fetchUserData(determineReferalId())) {
// Not found so we set your refid!
- setPostRequestElement('refid', getConfig('def_refid'));
+ setPostRequestParameter('refid', getConfig('def_refid'));
setSession('refid', getConfig('def_refid'));
} else {
// Use the refid here
- setPostRequestElement('refid', determineReferalId());
+ setPostRequestParameter('refid', determineReferalId());
}
} // END - if
// First we only check the submitted data then we continue... :)
//
// Did he agree to our Terms Of Usage?
- if (postRequestElement('agree') != 'Y') {
- setPostRequestElement('agree', '!');
+ if (postRequestParameter('agree') != 'Y') {
+ setPostRequestParameter('agree', '!');
$isOkay = false;
} // END - if
// Did he enter a valid email address? (we really don't care about
// that, he has to click on a confirmation link :P )
- if ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email')))) {
- setPostRequestElement('email', '!');
+ if ((!isPostRequestParameterSet('email')) || (!isEmailValid(postRequestParameter('email')))) {
+ setPostRequestParameter('email', '!');
$isOkay = false;
} // END - if
// And what about surname and family's name?
- if (!isPostRequestElementSet('surname')) {
- setPostRequestElement('surname', '!');
+ if (!isPostRequestParameterSet('surname')) {
+ setPostRequestParameter('surname', '!');
$isOkay = false;
} // END - if
- if (!isPostRequestElementSet('family')) {
- setPostRequestElement('family', '!');
+ if (!isPostRequestParameterSet('family')) {
+ setPostRequestParameter('family', '!');
$isOkay = false;
} // END - if
setPostRequestArray($postArray);
// Did he enter his password twice?
- if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) {
- if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) {
- setPostRequestElement('pass1', '!');
- setPostRequestElement('pass2', '!');
+ if (((!isPostRequestParameterSet('pass1')) || (!isPostRequestParameterSet('pass2'))) || ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')))) {
+ if ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2'))) {
+ setPostRequestParameter('pass1', '!');
+ setPostRequestParameter('pass2', '!');
} else {
- if (!isPostRequestElementSet('pass1')) { setPostRequestElement('pass1', '!'); } else { setPostRequestElement('pass1', ''); }
- if (!isPostRequestElementSet('pass2')) { setPostRequestElement('pass2', '!'); } else { setPostRequestElement('pass2', ''); }
+ if (!isPostRequestParameterSet('pass1')) { setPostRequestParameter('pass1', '!'); } else { setPostRequestParameter('pass1', ''); }
+ if (!isPostRequestParameterSet('pass2')) { setPostRequestParameter('pass2', '!'); } else { setPostRequestParameter('pass2', ''); }
}
$isOkay = false;
} // END - if
// Is the password long enouth?
- if ((strlen(postRequestElement('pass1')) < getConfig('pass_len')) && ($isOkay === true)) {
+ if ((strlen(postRequestParameter('pass1')) < getConfig('pass_len')) && ($isOkay === true)) {
$shortPass = true;
$isOkay = false;
} // END - if
// No admin? Admins can always register!
if (!isAdmin()) {
// Do this check only when no admin is logged in
- foreach (postRequestElement('cat') as $id => $answer) {
+ foreach (postRequestParameter('cat') as $id => $answer) {
if ($answer == 'Y') $cats++;
} // END - foreach
} // END - if
} // END - if
- if ((postRequestElement('email') != '!') && (getConfig('check_double_email') == 'Y')) {
+ if ((postRequestParameter('email') != '!') && (getConfig('check_double_email') == 'Y')) {
// Does the email address already exists in our database?
- if ((!isAdmin()) && (isEmailTaken(postRequestElement('email')))) {
- setPostRequestElement('email', '?');
+ if ((!isAdmin()) && (isEmailTaken(postRequestParameter('email')))) {
+ setPostRequestParameter('email', '?');
$isOkay = false;
} // END - if
} // END - if
//* DEBUG: */ print intval(isFormSent()).'/'.intval($isOkay).'/'.intval(isAdmin()).'<br />';
if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) {
// Prepapre month and day of birth
- if (strlen(postRequestElement('day')) == 1) setPostRequestElement('day' , 0 . postRequestElement('day'));
- if (strlen(postRequestElement('month')) == 1) setPostRequestElement('month', 0 . postRequestElement('month'));
+ if (strlen(postRequestParameter('day')) == 1) setPostRequestParameter('day' , 0 . postRequestParameter('day'));
+ if (strlen(postRequestParameter('month')) == 1) setPostRequestParameter('month', 0 . postRequestParameter('month'));
// Get total ...
// ... confirmed, ...
$lockedUsers = countSumTotalData('LOCKED' , 'user_data', 'userid', 'status', true);
// Generate hash which will be inserted into confirmation mail
- $hash = generateHash(sha1($confirmedUsers.getConfig('ENCRYPT_SEPERATOR').$unconfirmedUsers.getConfig('ENCRYPT_SEPERATOR').$lockedUsers.getConfig('ENCRYPT_SEPERATOR').postRequestElement('month') . '-'.postRequestElement('day') . '-'.postRequestElement('year').getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_NAME').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().getConfig('ENCRYPT_SEPERATOR').detectUserAgent() . '/' . getConfig('SITE_KEY') . '/' . getConfig('DATE_KEY') . '/'. getConfig('CACHE_BUSTER')));
+ $hash = generateHash(sha1($confirmedUsers.getConfig('ENCRYPT_SEPERATOR').$unconfirmedUsers.getConfig('ENCRYPT_SEPERATOR').$lockedUsers.getConfig('ENCRYPT_SEPERATOR').postRequestParameter('month') . '-'.postRequestParameter('day') . '-'.postRequestParameter('year').getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_NAME').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().getConfig('ENCRYPT_SEPERATOR').detectUserAgent() . '/' . getConfig('SITE_KEY') . '/' . getConfig('DATE_KEY') . '/'. getConfig('CACHE_BUSTER')));
// Add design when extension sql_patches is v0.2.7 or greater
// @TODO Rewrite these all to a single filter
if (isExtensionActive('country')) {
// Save with new selectable country code
$countryRow = '`country_code`';
- $countryData = bigintval(postRequestElement('country_code'));
+ $countryData = bigintval(postRequestParameter('country_code'));
} else {
// Old way with enterable two-char-code
$countryRow = '`country`';
- $countryData = substr(postRequestElement('cntry'), 0, 2);
+ $countryData = substr(postRequestParameter('cntry'), 0, 2);
}
//////////////////////////////
VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
array(
$countryRow,
- substr(postRequestElement('gender'), 0, 1),
- postRequestElement('surname'),
- postRequestElement('family'),
- postRequestElement('street_nr'),
+ substr(postRequestParameter('gender'), 0, 1),
+ postRequestParameter('surname'),
+ postRequestParameter('family'),
+ postRequestParameter('street_nr'),
$countryData,
- bigintval(postRequestElement('zip')),
- postRequestElement('city'),
- postRequestElement('email'),
- bigintval(postRequestElement('day')),
- bigintval(postRequestElement('month')),
- bigintval(postRequestElement('year')),
- generateHash(postRequestElement('pass1')),
- bigintval(postRequestElement('max_mails')),
- bigintval(postRequestElement('max_mails')),
- bigintval(postRequestElement('refid')),
+ bigintval(postRequestParameter('zip')),
+ postRequestParameter('city'),
+ postRequestParameter('email'),
+ bigintval(postRequestParameter('day')),
+ bigintval(postRequestParameter('month')),
+ bigintval(postRequestParameter('year')),
+ generateHash(postRequestParameter('pass1')),
+ bigintval(postRequestParameter('max_mails')),
+ bigintval(postRequestParameter('max_mails')),
+ bigintval(postRequestParameter('refid')),
$hash,
detectRemoteAddr(),
), __FILE__, __LINE__);
} // END - if
// Write catgories
- if ((is_array(postRequestElement('cat'))) && (count(postRequestElement('cat')))) {
- foreach (postRequestElement('cat') as $cat => $joined) {
+ if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) {
+ foreach (postRequestParameter('cat') as $cat => $joined) {
if ($joined == 'Y') {
// Insert category entry
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES (%s, %s)",
} // END - if
// Rewrite gender
- $gender = translateGender(postRequestElement('gender'));
+ $gender = translateGender(postRequestParameter('gender'));
// ... rewrite a zero referal id to the main title
- if (postRequestElement('refid') == '0') setPostRequestElement('refid', getConfig('MAIN_TITLE'));
+ if (postRequestParameter('refid') == '0') setPostRequestParameter('refid', getConfig('MAIN_TITLE'));
// Is ZIP code set?
- if (isPostRequestElementSet('zip')) {
+ if (isPostRequestParameterSet('zip')) {
// Prepare data array for the email template
// Start with the gender...
$content = array(
'hash' => $hash,
'userid' => $userid,
'gender' => $gender,
- 'surname' => SQL_ESCAPE(postRequestElement('surname')),
- 'family' => SQL_ESCAPE(postRequestElement('family')),
- 'email' => SQL_ESCAPE(postRequestElement('email')),
- 'street' => SQL_ESCAPE(postRequestElement('street_nr')),
- 'city' => SQL_ESCAPE(postRequestElement('city')),
- 'zip' => bigintval(postRequestElement('zip')),
+ 'surname' => SQL_ESCAPE(postRequestParameter('surname')),
+ 'family' => SQL_ESCAPE(postRequestParameter('family')),
+ 'email' => SQL_ESCAPE(postRequestParameter('email')),
+ 'street' => SQL_ESCAPE(postRequestParameter('street_nr')),
+ 'city' => SQL_ESCAPE(postRequestParameter('city')),
+ 'zip' => bigintval(postRequestParameter('zip')),
'country' => $countryData,
- 'refid' => SQL_ESCAPE(postRequestElement('refid')),
- 'pass' => SQL_ESCAPE(postRequestElement('pass1')),
+ 'refid' => SQL_ESCAPE(postRequestParameter('refid')),
+ 'pass' => SQL_ESCAPE(postRequestParameter('pass1')),
);
} else {
// No ZIP code entered
'hash' => $hash,
'userid' => $userid,
'gender' => $gender,
- 'surname' => SQL_ESCAPE(postRequestElement('surname')),
- 'family' => SQL_ESCAPE(postRequestElement('family')),
- 'email' => SQL_ESCAPE(postRequestElement('email')),
- 'street' => SQL_ESCAPE(postRequestElement('street_nr')),
- 'city' => SQL_ESCAPE(postRequestElement('city')),
+ 'surname' => SQL_ESCAPE(postRequestParameter('surname')),
+ 'family' => SQL_ESCAPE(postRequestParameter('family')),
+ 'email' => SQL_ESCAPE(postRequestParameter('email')),
+ 'street' => SQL_ESCAPE(postRequestParameter('street_nr')),
+ 'city' => SQL_ESCAPE(postRequestParameter('city')),
'zip' => '',
'country' => $countryData,
- 'refid' => SQL_ESCAPE(postRequestElement('refid')),
- 'pass' => SQL_ESCAPE(postRequestElement('pass1')),
+ 'refid' => SQL_ESCAPE(postRequestParameter('refid')),
+ 'pass' => SQL_ESCAPE(postRequestParameter('pass1')),
);
}
// Continue with birthday...
switch (getLanguage()) {
case 'de':
- $content['birthday'] = bigintval(postRequestElement('day')) . '.' . bigintval(postRequestElement('month')) . '.' . bigintval(postRequestElement('year'));
+ $content['birthday'] = bigintval(postRequestParameter('day')) . '.' . bigintval(postRequestParameter('month')) . '.' . bigintval(postRequestParameter('year'));
break;
default:
- $content['birthday'] = bigintval(postRequestElement('month')) . '/' . bigintval(postRequestElement('day')) . '/' . bigintval(postRequestElement('year'));
+ $content['birthday'] = bigintval(postRequestParameter('month')) . '/' . bigintval(postRequestParameter('day')) . '/' . bigintval(postRequestParameter('year'));
break;
} // END - switch
// Output success registration
loadTemplate('admin_settings_saved', false, getMessage('REGISTRATION_DONE'));
} else {
- if (postRequestElement('agree') == '!') {
+ if (postRequestParameter('agree') == '!') {
registerOutputFailedMessage('HAVE_TO_AGREE');
} // END - if
- if (postRequestElement('email') == '!') {
+ if (postRequestParameter('email') == '!') {
registerOutputFailedMessage('ENTER_EMAIL');
- setPostRequestElement('email', '');
- } elseif (postRequestElement('email') == '?') {
+ setPostRequestParameter('email', '');
+ } elseif (postRequestParameter('email') == '?') {
registerOutputFailedMessage('EMAIL_ALREADY_DB');
- setPostRequestElement('email', '');
+ setPostRequestParameter('email', '');
}
- if (postRequestElement('surname') == '!') {
+ if (postRequestParameter('surname') == '!') {
registerOutputFailedMessage('ENTER_SURNAME');
- setPostRequestElement('surname', '');
+ setPostRequestParameter('surname', '');
} // END - if
- if (postRequestElement('family') == '!') {
+ if (postRequestParameter('family') == '!') {
registerOutputFailedMessage('ENTER_FAMILY');
- setPostRequestElement('family', '');
+ setPostRequestParameter('family', '');
} // END - if
- if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) {
+ if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
- } elseif (postRequestElement('pass1') == '!') {
+ } elseif (postRequestParameter('pass1') == '!') {
registerOutputFailedMessage('ENTER_PASS1');
- } elseif (postRequestElement('pass2') == '!') {
+ } elseif (postRequestParameter('pass2') == '!') {
registerOutputFailedMessage('ENTER_PASS2');
}
// 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('day', postRequestParameter('day')).addSelectionBox('month', postRequestParameter('month')).addSelectionBox('year', postRequestParameter('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('month', postRequestParameter('month')).addSelectionBox('day', postRequestParameter('day')).addSelectionBox('year', postRequestParameter('year'));
break;
}
$content['header_content'] = loadTemplate('register_header', true);
// Other values
- $content['surname'] = SQL_ESCAPE(postRequestElement('surname'));
- $content['family'] = SQL_ESCAPE(postRequestElement('family'));
- $content['street_nr'] = SQL_ESCAPE(postRequestElement('street_nr'));
+ $content['surname'] = SQL_ESCAPE(postRequestParameter('surname'));
+ $content['family'] = SQL_ESCAPE(postRequestParameter('family'));
+ $content['street_nr'] = SQL_ESCAPE(postRequestParameter('street_nr'));
$content['zip'] = '';
- if (isPostRequestElementSet('zip')) {
- $content['zip'] = bigintval(postRequestElement('zip'));
+ if (isPostRequestParameterSet('zip')) {
+ $content['zip'] = bigintval(postRequestParameter('zip'));
} // END - if
- $content['city'] = SQL_ESCAPE(postRequestElement('city'));
- $content['email'] = SQL_ESCAPE(postRequestElement('email'));
+ $content['city'] = SQL_ESCAPE(postRequestParameter('city'));
+ $content['email'] = SQL_ESCAPE(postRequestParameter('email'));
// Prepare country selection box
$OUT = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n";
$whereStatement = "WHERE `is_active`='Y'";
if (isAdmin()) $whereStatement = '';
- $OUT .= generateOptionList('countries', 'id', 'descr', postRequestElement('country_code'), 'code', $whereStatement);
+ $OUT .= generateOptionList('countries', 'id', 'descr', postRequestParameter('country_code'), 'code', $whereStatement);
$OUT .= "</select>";
$content['country'] = $OUT;