* $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 *
// Some security stuff...
if (!defined('__SECURITY')) {
- die();
+ exit();
} // END - if
// Add description as navigation point
}
$mode = '';
-if (isGetRequestElementSet('mode')) {
+if (isGetRequestElementSet('do')) {
// A "special" mode of the login system was requested
- switch (getRequestElement('mode')) {
+ switch (getRequestElement('do')) {
case 'activate' : $mode = 'activate'; break; // Activation link requested
case 'lost_pass': $mode = 'lost_pass'; break; // Request new password
} // END - switch
if (isGetRequestElementSet('hash')) {
// Lookup sponsor
$result = SQL_QUERY_ESC("SELECT
- `id`,`status`,`gender`,`surname`,`family`,
- `company`,`position`,`tax_ident`,
- `street_nr1`,`street_nr2`,`country`,`zip`,`city`,`email`,`phone`,`fax`,`cell`,
- `points_amount` AS `points`,`last_payment`,`last_currency`
+ `id`, `status`, `gender`, `surname`, `family`,
+ `company`, `position`, `tax_ident`,
+ `street_nr1`, `street_nr2`, `country`, `zip`, `city`, `email`, `phone`, `fax`, `cell`,
+ `points_amount` AS `points`, `last_payment`, `last_currency`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
SQL_FREERESULT($result);
} elseif ($mode == 'activate') {
// Send activation link again
- if (isFormSent()) {
+ if (isFormSent('login')) {
// Check submitted data
- if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok');
+ if (!isPostRequestElementSet('email')) unsetPostRequestElement('login');
}
- if (isFormSent()) {
+ if (isFormSent('login')) {
// Check email
$result = SQL_QUERY_ESC("SELECT
- `id`,`hash`,`status`,`remote_addr`,`gender`,`surname`,`family`,
+ `id`,
+ `hash`,
+ `status`,
+ `remote_addr`,
+ `gender`,
+ `surname`,
+ `family`,
UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
}
} elseif ($mode == 'lost_pass') {
// Send new password
- if (isFormSent()) {
+ if (isFormSent('login')) {
// Check submitted data
- if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok');
+ if (!isPostRequestElementSet('email')) unsetPostRequestElement('login');
} // END - if
- if (isFormSent()) {
+ if (isFormSent('login')) {
// Check email
$result = SQL_QUERY_ESC("SELECT
- `id`,`hash`,`remote_addr`,`gender`,`surname`,`family`,
+ `id`,
+ `hash`,
+ `remote_addr`,
+ `gender`,
+ `surname`,
+ `family`,
UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
// Load form
loadTemplate('guest_sponsor_lost');
}
-} elseif (isFormSent()) {
+} elseif (isFormSent('login')) {
// Check status and login data ...
$result = SQL_QUERY_ESC("SELECT
`status`
(setSession('sponsor_pass', md5(postRequestElement('password')) ))
);
- if ($login === true) {
+ if ($login === TRUE) {
// Cookie setup successfull so we can forward to sponsor area
redirectToUrl('modules.php?module=sponsor');
} else {