} // END - if
$mode = '';
-if (isGetRequestElementSet('mode')) {
+if (isGetRequestParameterSet('mode')) {
// A "special" mode of the login system was requested
- switch (getRequestElement('mode')) {
+ switch (getRequestParameter('mode')) {
case 'activate' : $mode = 'activate'; break; // Activation link requested
case 'lost_pass': $mode = 'lost_pass'; break; // Request new password
} // END - switch
} // END - if
// Check if hash for confirmation of email address is given...
-if (isGetRequestElementSet('hash')) {
+if (isGetRequestParameterSet('hash')) {
// Lookup sponsor
$result = SQL_QUERY_ESC("SELECT
`id`, `status`, `gender`, `surname`, `family`,
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
`hash='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL')
-LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__);
+LIMIT 1", array(getRequestParameter('hash')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Sponsor found, load his data...
$SPONSOR = SQL_FETCHARRAY($result);
// Set account to pending
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='PENDING'
WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1",
- array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__);
+ array(bigintval($SPONSOR['id']), getRequestParameter('hash')), __FILE__, __LINE__);
// Check on success
if (SQL_AFFECTEDROWS() == 1) {
// Changed email adress need to be confirmed
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='CONFIRMED'
WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1",
- array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__);
+ array(bigintval($SPONSOR['id']), getRequestParameter('hash')), __FILE__, __LINE__);
// Check on success
if (SQL_AFFECTEDROWS() == 1) {
}
} else {
// No sponsor found
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestElement('hash')));
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestParameter('hash')));
}
// Free memory
// Send activation link again
if (isFormSent()) {
// Check submitted data
- if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok');
+ if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok');
}
if (isFormSent()) {
$result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created
FROM `{?_MYSQL_PREFIX?}_sponsor_data`
WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1",
- array(postRequestElement('email')), __FILE__, __LINE__);
+ array(postRequestParameter('email')), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Confirmed email address
$message_sponsor = loadEmailTemplate('sponsor_email', $SPONSOR);
}
- sendEmail(postRequestElement('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor);
+ sendEmail(postRequestParameter('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor);
// Output message
loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT'));
// Send new password
if (isFormSent()) {
// Check submitted data
- if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok');
+ if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok');
} // END - if
if (isFormSent()) {
$result = SQL_QUERY_ESC("SELECT `id`, `hash`, `remote_addr`, `gender`, `surname`, `family`, `sponsor_created`
FROM `{?_MYSQL_PREFIX?}_sponsor_data`
WHERE `email`='%s' AND `id`='%s' AND `status`='CONFIRMED' LIMIT 1",
- array(postRequestElement('email'), bigintval(postRequestElement('id'))), __FILE__, __LINE__);
+ array(postRequestParameter('email'), bigintval(postRequestParameter('id'))), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Prepare email and send it to the sponsor
$message_sponsor = loadEmailTemplate('sponsor_lost', $DATA);
- sendEmail(postRequestElement('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor);
+ sendEmail(postRequestParameter('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor);
// Update password
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `password`='%s'
// Check status and login data ...
$result = SQL_QUERY_ESC("SELECT status FROM `{?_MYSQL_PREFIX?}_sponsor_data`
WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(postRequestElement('sponsorid')), md5(postRequestElement('pass'))), __FILE__, __LINE__);
+ array(bigintval(postRequestParameter('sponsorid')), md5(postRequestParameter('pass'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Okay, first login data check passed, now has he/she an approved (CONFIRMED) account?
list($status) = SQL_FETCHROW($result);
if ($status == 'CONFIRMED') {
// Is confirmed so both is fine and we can continue with login procedure
- $login = ((setSession('sponsorid' , bigintval(postRequestElement('sponsorid')))) &&
- (setSession('sponsorpass', md5(postRequestElement('pass')) ))
+ $login = ((setSession('sponsorid' , bigintval(postRequestParameter('sponsorid')))) &&
+ (setSession('sponsorpass', md5(postRequestParameter('pass')) ))
);
if ($login === true) {