### WARNING: THIS FILE IS AUTO-GENERATED BY ./DOCS/todo-builder.sh (uid=/user=quix0r) ###
### DO NOT EDIT THIS FILE. ###
./autoreg.php:58:// @TODO Add processing of request here
-./beg.php:171: // @TODO Opps, what is missing here???
+./beg.php:168: // @TODO Opps, what is missing here???
./birthday_confirm.php:93: // @TODO Try to rewrite the following unset()
./inc/cache/config-local.php:124:// @TODO Rewrite the following three constants, somehow...
./inc/classes/cachesystem.class.php:504: // @TODO Add support for more types which break in last else-block
./inc/config-functions.php:136: // @TODO Make this all better... :-/
./inc/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye
-./inc/daily/daily_birthday.php:95: // @TODO 4 is hard-coded here, should we move it out in config?
+./inc/daily/daily_birthday.php:96: // @TODO 4 is hard-coded here, should we move it out in config?
./inc/expression-functions.php:164:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
./inc/expression-functions.php:46: // @TODO is escapeQuotes() enougth for strings with single/double quotes?
./inc/extensions/ext-html_mail.php:136: // @TODO Move these arrays into config
./inc/libs/theme_functions.php:93: // @TODO Can't this be rewritten to an API function?
./inc/libs/user_functions.php:144: // @TODO These two constants are no longer used, maybe we reactivate this code?
./inc/libs/user_functions.php:232:// @TODO Double-check configuration entry here
-./inc/libs/user_functions.php:325: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
-./inc/libs/user_functions.php:354: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
-./inc/libs/user_functions.php:432: // @TODO We should try to rewrite this to fetchUserData() somehow
-./inc/libs/user_functions.php:620: // @TODO Try to rewrite the following unset()
+./inc/libs/user_functions.php:327: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
+./inc/libs/user_functions.php:356: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
+./inc/libs/user_functions.php:623: // @TODO Try to rewrite the following unset()
./inc/libs/yoomedia_functions.php:114: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
./inc/load_config.php:75: // @TODO Rewrite them to avoid this else block
./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file *
./inc/modules/admin/what-usage.php:87: // @TODO This code is double, see loadTemplate() and loadEmailTemplate() in functions.php
./inc/modules/admin/what-usr_online.php:49: // @TODO Add a filter for sponsor
./inc/modules/guest/what-beg.php:51:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
-./inc/modules/guest/what-login.php:121: // @TODO Move this HTML code into a template
+./inc/modules/guest/what-login.php:125: // @TODO Move this HTML code into a template
./inc/modules/guest/what-mediadata.php:180:// @TODO Rewrite all these if-blocks to filters
./inc/modules/guest/what-mediadata.php:67: // @TODO Find a better formular than this one
./inc/modules/guest/what-rallyes.php:89: // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&what=impressum&admin=' . $adminId . '%}">' . $login . '</a>';
./inc/modules/member/what-unconfirmed.php:203: // @TODO This 'userid' cannot be saved because of encapsulated EL code
./inc/modules/order.php:74: // @TODO Unused: 2,4
./inc/monthly/monthly_bonus.php:64: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1220: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1482: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1570: // @TODO Rewrite these lines to a filter
-./inc/mysql-manager.php:1594: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1962: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:2006:// @TODO Fix inconsistency between last_module and getWhat()
+./inc/mysql-manager.php:1223: // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1485: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:1573: // @TODO Rewrite these lines to a filter
+./inc/mysql-manager.php:1597: // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1965: // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:2009:// @TODO Fix inconsistency between last_module and getWhat()
./inc/mysql-manager.php:371: // @TODO Try to rewrite this to one or more functions
./inc/mysql-manager.php:44:// @TODO Can we cache this?
./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1055: // @TODO Deprecate this thing
-./inc/template-functions.php:1066: // @TODO Deprecate this thing
-./inc/template-functions.php:1153: // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1186: // @TODO Add a little more infos here
-./inc/template-functions.php:1497:// @TODO Lame description for this function
-./inc/template-functions.php:1519: // @TODO Move this in a filter
+./inc/template-functions.php:1058: // @TODO Deprecate this thing
+./inc/template-functions.php:1069: // @TODO Deprecate this thing
+./inc/template-functions.php:1156: // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1189: // @TODO Add a little more infos here
+./inc/template-functions.php:1500:// @TODO Lame description for this function
+./inc/template-functions.php:1522: // @TODO Move this in a filter
./inc/template-functions.php:189: * @TODO On some pages this is buggy
./inc/template-functions.php:265: // @TODO Remove this sanity-check if all is fine
-./inc/template-functions.php:583:// @TODO $simple/$constants are deprecated
-./inc/template-functions.php:609: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
+./inc/template-functions.php:586:// @TODO $simple/$constants are deprecated
+./inc/template-functions.php:612: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
./inc/wrapper-functions.php:130:// @TODO Implement $compress
./inc/wrapper-functions.php:137:// @TODO Implement $decompress
-./inc/wrapper-functions.php:507:// @TODO Do some more sanity check here
+./inc/wrapper-functions.php:514:// @TODO Do some more sanity check here
./mailid.php:139: // @TODO Rewrite this to a filter
./mailid.php:96: // @TODO Rewrite this to a filter
./mailid_top.php:103: // @TODO Rewrite this to a filter
$pay = false;
// Validate if it is not a number
- if (isNicknameUsed(getRequestParameter('userid'))) {
- // Is the nickname extension there?
- if (isExtensionActive('nickname')) {
- // Maybe we have found a nickname?
- fetchUserData(getRequestParameter('userid'), 'nickname');
- } else {
- // Nickname entered but nickname is not active
- $errorCode = getCode('EXTENSION_PROBLEM');
- }
+ if ((isExtensionActive('nickname')) && (isNicknameUsed(getRequestParameter('userid')))) {
+ // Maybe we have found a nickname?
+ fetchUserData(getRequestParameter('userid'), 'nickname');
+ } elseif (isNicknameUsed(getRequestParameter('userid'))) {
+ // Nickname entered but nickname is not active
+ $errorCode = getCode('EXTENSION_PROBLEM');
} else {
// Direct userid
fetchUserData(getRequestParameter('userid'));
} // END - if
// Only confirmed members shall receive birthday mails...
-$result_birthday = SQL_QUERY_ESC("SELECT `userid`, `email`, `birth_year`
+$result_birthday = SQL_QUERY_ESC("SELECT
+ `userid`, `email`, `birth_year`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
}
// Send email
- sendEmail($content['email'], '{--MEMBER_HAPPY_BIRTHDAY_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--MEMBER_HAPPY_BIRTHDAY_SUBJECT--}', $message);
// Remember him that he has received a birthday mail
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `birthday_sent`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
// Load email template and send mail away
$message = loadEmailTemplate('member_profile', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--MEMBER_PROFILE_OUTDATED_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--MEMBER_PROFILE_OUTDATED_SUBJECT--}', $message);
// Update profile data
SQL_QUERY_ESC("UPDATE
} // END - if
// Check existence
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`='%s' AND `refid`=%s LIMIT 1",
- array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`=%s AND `refid`=%s LIMIT 1",
+ array(
+ bigintval($userid),
+ bigintval($GLOBALS['refback_level']),
+ bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])
+ ), __FUNCTION__, __LINE__);
// Do we have no entry?
//* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />");
$userid = $old;
// Shall we add this as well?
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`='%s' AND `refid`=%s LIMIT 1",
- array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`=%s AND `refid`=%s LIMIT 1",
+ array(
+ bigintval($userid),
+ (bigintval($GLOBALS['refback_level']) - $minus),
+ bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])
+ ), __FUNCTION__, __LINE__);
// Do we have no entry?
//* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />");
$messageGuest = loadEmailTemplate('guest_register_done', $content, $userid, false);
// Send mail to user (confirmation link!)
- $email = $content['email'];
- sendEmail($content['email'], '{--GUEST_CONFIRM_LINK_SUBJECT--}', $messageGuest);
- $content['email'] = $email;
+ sendEmail($userid, '{--GUEST_CONFIRM_LINK_SUBJECT--}', $messageGuest);
// Send mail to admin
sendAdminNotification('{--ADMIN_NEW_ACCOUNT_SUBJECT--}', 'admin_register_done', $content, $userid);
if (($errorCode == '0') && ($isFound === true)) {
// Get user data array and set userid (e.g. important if we login with nickname)
$content = getUserDataArray();
- if (!empty($content['userid'])) $userid = bigintval($content['userid']);
+ if (!empty($content['userid'])) {
+ $userid = bigintval($content['userid']);
+ } // END - if
} // END - if
// Is there an entry?
- if ((isUserDataValid()) && (getUserData('status') == 'CONFIRMED') && (!empty($content['userid']))) {
+ if (($errorCode == '0') && (isUserDataValid()) && (getUserData('status') == 'CONFIRMED') && (!empty($content['userid']))) {
// Check for old MD5 passwords
if ((strlen(getUserData('password')) == 32) && (md5($passwd) == getUserData('password'))) {
// Just set the hash to the password from DB... :)
// Try to send a new password for the given user account
function doNewUserPassword ($email, $userid) {
- // Init result and error
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'email=' . $email . ',userid=' . $userid . ' - ENTERED!');
+ // Init found-status and error
$errorCode = '';
- $result = false;
+ $accountFound = false;
// Probe userid/nickname
- // @TODO We should try to rewrite this to fetchUserData() somehow
if (!empty($email)) {
// Email entered
- $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `email`='%s' OR `email`='%s' LIMIT 1",
- array($email, str_replace('.', '{DOT}', $email)), __FUNCTION__, __LINE__);
+ $accountFound = fetchUserData($email, 'email');
} elseif ((isExtensionActive('nickname')) && (isNicknameOrUserid($userid))) {
// Nickname entered
- $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' OR `userid`='%s' OR `email`='%s' LIMIT 1",
- array($userid, $userid, $email), __FUNCTION__, __LINE__);
+ $accountFound = fetchUserData($userid, 'nickname');
} elseif ((isValidUserId($userid)) && (empty($email))) {
// Direct userid entered
- $result = SQL_QUERY_ESC("SELECT `userid`, `status` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
- array(bigintval($userid)), __FUNCTION__, __LINE__);
+ $accountFound = fetchUserData($userid);
} else {
// Userid not set!
- logDebugMessage(__FUNCTION__, __LINE__, 'Userid is not set! BUG!');
- $errorCode = getCode('WRONG_ID');
+ debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ',email=' . $email . ': Important variables are empty.');
}
// Any entry found?
- if (SQL_NUMROWS($result) == 1) {
- // This data is valid, so we create a new pass... :-)
- list($userid, $status) = SQL_FETCHROW($result);
-
- if ($status == 'CONFIRMED') {
- // Ooppps, this was missing! ;-) We should update the database...
+ if ($accountFound === true) {
+ // Is the account confirmed
+ if (getUserData('status') == 'CONFIRMED') {
+ // Generate new password
$NEW_PASS = generatePassword();
+
+ // Update database
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `password`='%s' WHERE `userid`=%s LIMIT 1",
- array(generateHash($NEW_PASS), $userid), __FUNCTION__, __LINE__);
+ array(generateHash($NEW_PASS), getUserData('userid')), __FUNCTION__, __LINE__);
// Prepare data and message for email
- $message = loadEmailTemplate('guest_new_password', array('new_pass' => $NEW_PASS, 'nickname' => $userid), $userid);
+ $message = loadEmailTemplate('guest_new_password',
+ array(
+ 'new_pass' => $NEW_PASS,
+ 'nickname' => $userid
+ ), bigintval(getUserData('userid')));
// ... and send it away
- sendEmail($userid, '{--GUEST_NEW_PASSWORD--}', $message);
+ sendEmail(bigintval(getUserData('userid')), '{--GUEST_NEW_PASSWORD--}', $message);
// Output note to user
displayMessage('{--GUEST_NEW_PASSWORD_SEND--}');
} else {
// Account is locked or unconfirmed
- $errorCode = generateErrorCodeFromUserStatus($status);
+ $errorCode = generateErrorCodeFromUserStatus(getUserData('status'));
// Load URL
- redirectToUrl('modules.php?module=index&what=login&login='.$errorCode);
+ redirectToUrl('modules.php?module=index&what=login&login=' . $errorCode);
}
} else {
// id or email is wrong
}
// Return the error code
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'email=' . $email . ',userid=' . $userid . ',errorCode=' . $errorCode . ' - EXIT!');
return $errorCode;
}
$userid = '0';
// Search for an unconfirmed or confirmed account
- $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `refid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `userid`, `refid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
array($hash), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Ok, he want's to confirm now so we load some data
- list($userid, $email, $refid) = SQL_FETCHROW($result);
+ list($userid, $refid) = SQL_FETCHROW($result);
// Fetch user data
if (!fetchUserData($userid)) {
$message = loadEmailTemplate('guest_user_confirmed', $content, bigintval($userid));
// And send him right away the confirmation mail
- sendEmail($email, '{--GUEST_THANX_CONFIRM--}', $message);
+ sendEmail($userid, '{--GUEST_THANX_CONFIRM--}', $message);
// Maybe he got "referaled"?
if (($refid > 0) && ($refid != $userid)) {
// Is the account unconfirmed?
if ($content['status'] == 'UNCONFIRMED') {
// Load email template
- $message = loadEmailTemplate('guest_request_confirm', array('hash' => $content['user_hash']), $content['userid']);
+ $message = loadEmailTemplate('guest_request_confirm', array(), $content['userid']);
// Send email
- sendEmail($email, '{--GUEST_REQUEST_CONFIRM_LINK_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--GUEST_REQUEST_CONFIRM_LINK_SUBJECT--}', $message);
} // END - if
// Create message based on the status
} else {
// Send normal notification mail to the members
$message = loadEmailTemplate('beg_' . $mode . '_notify', $content, $content['userid']);
- sendEmail($content['email'], '{--BEG_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--BEG_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
}
} // END - while
} else {
// Send normal notification mail to the members
$message = loadEmailTemplate('bonus_' . $mode . '_notify', $content, $content['userid']);
- sendEmail($content['email'], '{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--MEMBER_BONUS_RALLYE_' . strtoupper($mode) . '_SUBJECT--}', $message);
}
} // END - while
} // END - if
// Is the raw userid set?
- if (postRequestParameter($userid, $id) > 0) {
+ if (postRequestParameter($useridColumn, $id) > 0) {
// Load email template
if (!empty($subjectPart)) {
$mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content);
}
// Send email out
- sendEmail(postRequestParameter($userid, $id), strtoupper('{--MEMBER_' . $subject . '_' . $table . '_SUBJECT--}'), $mail);
+ sendEmail(postRequestParameter($useridColumn, $id), strtoupper('{--MEMBER_' . $subject . '_' . $table . '_SUBJECT--}'), $mail);
} // END - if
// Generate subject
// Send admin notification out
if (!empty($subjectPart)) {
- sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($userid, $id));
+ sendAdminNotification($subject, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter($useridColumn, $id));
} else {
- sendAdminNotification($subject, 'admin_' . $mode . '_' . $table, $content, postRequestParameter($userid, $id));
+ sendAdminNotification($subject, 'admin_' . $mode . '_' . $table, $content, postRequestParameter($useridColumn, $id));
}
}
if ((isSqlsValid()) && (isSqlsValid())) {
if (strpos($GLOBALS['sqls'][0], 'INSERT') > -1) {
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`=%s LIMIT 1",
array(bigintval(postRequestParameter('level'))), __FILE__, __LINE__);
SQL_FREERESULT($result);
} // END - if
// Prepare mail and send it away
$message = loadEmailTemplate('member_delete_links', SQL_NUMROWS($result), bigintval(getRequestParameter('userid')));
- sendEmail(getUserData('email'), '{--ADMIN_DELETE_LINK_SUBJECT--}', $message);
+ sendEmail(getUserData('userid'), '{--ADMIN_DELETE_LINK_SUBJECT--}', $message);
// Display message
displayMessage('{--ADMIN_LINKS_DELETED--}');
}
// Finally send mail
- sendEmail(getUserData('email'), '{--MEMBER_PAYOUT_ACCEPTED_SUBJECT--}', $message);
+ sendEmail(getUserData('userid'), '{--MEMBER_PAYOUT_ACCEPTED_SUBJECT--}', $message);
} else {
// Something goes wrong... :-(
$content = implode('<br />', $ret);
displayMessage('{--ADMIN_PAYOUT_REJECTED_NOTIFIED--}');
// Finally send mail
- sendEmail(getUserData('email'), '{--MEMBER_PAYOUT_REJECTED_SUBJECT--}', $message);
+ sendEmail(getUserData('userid'), '{--MEMBER_PAYOUT_REJECTED_SUBJECT--}', $message);
} else {
// Prepare content
$content = array(
// Is the refback still active? ;-)
if (isExtensionActive('refback')) {
// Load all refs of this user
- $result_refs = SQL_QUERY_ESC("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`='%s' ORDER BY refid ASC",
+ $result_refs = SQL_QUERY_ESC("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`=%s ORDER BY `refid` ASC",
array($userid, $levels['level']), __FILE__, __LINE__);
//* DEBUG: */ debugOutput($userid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs));
$content['points'] = bigintval(postRequestParameter('points'));
// Load userid
- $result_main = SQL_QUERY("SELECT userid, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
+ $result_main = SQL_QUERY("SELECT `userid`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
__FILE__, __LINE__);
while ($row = SQL_FETCHARRAY($result_main)) {
// Merge both arrays
// Load message and send it away
$message = loadEmailTemplate('member_sub_points', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--ADMIN_SUB_SUBJECT--}', $message);
+ sendEmail($row['userid'], '{--ADMIN_SUB_SUBJECT--}', $message);
} // END - while
// Free memory
// Load email and send it away
$message = loadEmailTemplate('member_sub_points', $content, bigintval(getRequestParameter('userid')));
- sendEmail($content['email'], '{--ADMIN_SUB_SUBJECT--}', $message);
+ sendEmail(getRequestParameter('userid'), '{--ADMIN_SUB_SUBJECT--}', $message);
// Output message
displayMessage('{--ADMIN_POINTS_SUBTRACTED--}');
$message = loadEmailTemplate('member_contct', $content, getRequestParameter('userid'));
// Send contact form out
- sendEmail($content['email'], '{--ADMIN_CONTACT_USER_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--ADMIN_CONTACT_USER_SUBJECT--}', $message);
// Display message
displayMessage('{--ADMIN_USER_CONTACTED--}');
$userid = getMemberId();
} elseif ((isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password')) && (isFormSent())) {
// Set userid and crypt password when login data was submitted
- if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) {
+ if (isNicknameUsed(postRequestParameter('id'))) {
// Nickname entered
$userid = SQL_ESCAPE(postRequestParameter('id'));
} else {
} elseif (isPostRequestParameterSet('new_pass')) {
// New password requested
$userid = '0';
- if (isPostRequestParameterSet('id')) {
+ if (isPostRequestParameterSet('email')) {
+ // Email is set
+ $userid = SQL_ESCAPE(postRequestParameter('email'));
+ } elseif (isPostRequestParameterSet('id')) {
// Do we have nickname or userid?
- if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) {
+ if (isNicknameUsed(postRequestParameter('id'))) {
// Nickname entered
$userid = SQL_ESCAPE(postRequestParameter('id'));
} else {
} // END - if
} else {
// Not logged in
- $userid = '0'; $hash = '';
+ $userid = '0';
+ $hash = '';
}
if (isMember()) {
$content['rowspan'] = ($numDepths * 2 + 15);
// Initialize array elements
-$content['part_points'] = '0.00000';
-$content['part_referals'] = '0';
-$content['part_locked'] = '0.00000';
-$content['part_order'] = '0.00000';
-$content['part_locked_order'] = '0.00000';
+$content['part_points'] = '0.00000';
+$content['part_referals'] = '0';
+$content['part_locked'] = '0.00000';
+$content['part_order'] = '0.00000';
+$content['part_locked_order'] = '0.00000';
$content['counter'] = '0';
$content['points'] = '0.00000';
$content['order_points'] = '0.00000';
// First send email to recipient
$message = loadEmailTemplate('member_transfer_recipient', $content, postRequestParameter('to_userid'));
- sendEmail($content['recipient']['email'], '{--TRANSFER_MEMBER_RECIPIENT_SUBJECT--}' . ': ' . $SENDER, $message);
+ sendEmail($content['recipient']['userid'], '{--TRANSFER_MEMBER_RECIPIENT_SUBJECT--}' . ': ' . $SENDER, $message);
// Second send email to sender
$message = loadEmailTemplate('member_transfer_sender', $content, getMemberId());
- sendEmail($content['sender']['email'], '{--TRANSFER_MEMBER_SENDER_SUBJECT--}' . ': ' . $RECIPIENT, $message);
+ sendEmail($content['sender']['userid'], '{--TRANSFER_MEMBER_SENDER_SUBJECT--}' . ': ' . $RECIPIENT, $message);
// At last send admin mail(s)
$adminSubject = sprintf("%s (%s->%s)", '{--TRANSFER_ADMIN_SUBJECT--}', $SENDER, $RECIPIENT);
// Create new task (we ignore the task id here)
createNewTask(
'{--ADMIN_NEW_QUEUE--}',
- '<pre>'.loadEmailTemplate('admin_order_normal', $content, getMemberId()).'</pre>',
+ '<pre>' . loadEmailTemplate('admin_order_normal', $content, getMemberId()) . '</pre>',
'MEMBER_ORDER',
getMemberId(),
0,
// Load email template and email it away
$message = loadEmailTemplate('member_beg', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--BEG_MONTHLY_RALLYE--}', $message);
+ sendEmail($content['userid'], '{--BEG_MONTHLY_RALLYE--}', $message);
} // END - while
// Reset accounts
// Load email template and email it away
$message = loadEmailTemplate('member_bonus', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--MEMBER_MONTHLY_BONUS_WON_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--MEMBER_MONTHLY_BONUS_WON_SUBJECT--}', $message);
} // END - if
} // END - while
} // END - if
} elseif (!isExtensionActive('cache')) {
// Get referal data
- $result_level = SQL_QUERY_ESC("SELECT `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`='%s' LIMIT 1",
+ $result_level = SQL_QUERY_ESC("SELECT `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`=%s LIMIT 1",
array(bigintval($level)), __FUNCTION__, __LINE__);
// Entry found?
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid.',level='.$GLOBALS['cache_array']['ref_level'][$userid]);
// Update counter
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`='%s' LIMIT 1",
- array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`=%s LIMIT 1",
+ array(
+ bigintval($userid),
+ bigintval($GLOBALS['cache_array']['ref_level'][$userid])
+ ), __FUNCTION__, __LINE__);
// When no entry was updated then we have to create it here
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'updated=' . SQL_AFFECTEDROWS());
// Send mail away
if (isset($DATA['html_msg'])) {
// Send HTML?
- sendEmail(getUserData('email'), $DATA['subject'], $mailText, $DATA['html_msg']);
+ sendEmail(getUserData('userid'), $DATA['subject'], $mailText, $DATA['html_msg']);
} else {
// No HTML mail!
- sendEmail(getUserData('email'), $DATA['subject'], $mailText);
+ sendEmail(getUserData('userid'), $DATA['subject'], $mailText);
}
// Count one up and remove entry from dummy array
$mailText = loadEmailTemplate('member_user_pool_normal', $DATA, bigintval($userid));
// Send mail away
- sendEmail(getUserData('email'), $DATA['subject'], $mailText, $isHtml);
+ sendEmail(getUserData('userid'), $DATA['subject'], $mailText, $isHtml);
// Count sent mails...
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `emails_sent`=`emails_sent`+1 WHERE `userid`=%s LIMIT 1",
$mailText = loadEmailTemplate('member_user_pool_done', $content, $DATA['sender_userid']);
// Send it also waway
- sendEmail(getUserData('email'), '{--MEMBER_SEND_DONE_SUBJECT--}', $mailText);
+ sendEmail(getUserData('userid'), '{--MEMBER_SEND_DONE_SUBJECT--}', $mailText);
} // END - if
// Set status to SEND because we completely send it away
$mailText = loadEmailTemplate('member_user_pool_back', $content, bigintval($userid));
// Send mail out to member
- sendEmail(getUserData('email'), '{--MEMBER_BACK_JACKPOT--}' . ' (' . $userid . ')', $mailText);
+ sendEmail($userid, '{--MEMBER_BACK_JACKPOT--}' . ' (' . $userid . ')', $mailText);
} elseif (isExtensionActive('jackpot')) {
// Add to jackpot
addPointsToJackpot($PB);
// Load mail template
$message = loadEmailTemplate('member_autopurge_inactive', $content, bigintval($content['userid']));
- sendEmail($content['email'], '{--MEMBER_AUTOPURGE_INACTIVE_SUBJECT--}', $message);
+ sendEmail($content['userid'], '{--MEMBER_AUTOPURGE_INACTIVE_SUBJECT--}', $message);
// Update this account
addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ap_notified`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
// Checks if an element in $_GET exists
function isGetRequestParameterSet ($element, $subElement = '') {
if (empty($subElement)) {
- return ((isset($GLOBALS['raw_request']['get'][$element])) && (!empty($GLOBALS['raw_request']['get'][$element])));
+ return ((isset($GLOBALS['raw_request']['get'][$element])) && ('' . ($GLOBALS['raw_request']['get'][$element] . '') != ''));
} else {
- return ((isset($GLOBALS['raw_request']['get'][$element][$subElement])) && (!empty($GLOBALS['raw_request']['get'][$element][$subElement])));
+ return ((isset($GLOBALS['raw_request']['get'][$element][$subElement])) && ('' . ($GLOBALS['raw_request']['get'][$element][$subElement] . '') != ''));
}
}
// Checks if an element in $_POST exists
function isPostRequestParameterSet ($element, $subElement=null) {
if (is_null($subElement)) {
- return ((isset($GLOBALS['raw_request']['post'][$element])) && (isset($GLOBALS['raw_request']['post'][$element])));
+ return ((isset($GLOBALS['raw_request']['post'][$element])) && (('' . $GLOBALS['raw_request']['post'][$element] . '') != ''));
} else {
- return ((isset($GLOBALS['raw_request']['post'][$element][$subElement])) && (isset($GLOBALS['raw_request']['post'][$element][$subElement])));
+ return ((isset($GLOBALS['raw_request']['post'][$element][$subElement])) && (('' . $GLOBALS['raw_request']['post'][$element][$subElement] . '') != ''));
}
}
$count = 0;
// Compile all out
- while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($count < 5)) {
+ while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($count < 7)) {
// Init common variables
$content = array();
$newContent = '';
if ((isValidUserId($userid)) && (is_array($content))) {
// If nickname extension is installed, fetch nickname as well
if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NICKNAME!<br />");
// Load by nickname
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NICKNAME!<br />");
fetchUserData($userid, 'nickname');
+ } elseif (isNicknameUsed($userid)) {
+ // Non-number characters entered but no ext-nickname found
+ debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ': is no id number and ext-nickname is gone.');
} else {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NO-NICK!<br />");
// Load by userid
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NO-NICK!<br />");
fetchUserData($userid);
}
}
// Send email to user if required
- if ((!empty($sub_mem)) && (!empty($message)) && (!empty($content['email']))) {
+ if ((!empty($sub_mem)) && (!empty($message)) && (!empty($content['userid']))) {
// Send member mail
- sendEmail($content['email'], $sub_mem, $message);
+ sendEmail($content['userid'], $sub_mem, $message);
} // END - if
// Send only if no other error has occured
Sie hatten sich zu unserem {?mt_word?} {?MAIN_TITLE?} angemeldet und heute Ihren Bestätigungslink erneut angefordert, jedoch bis jetzt noch nicht Ihre eMail-Adresse bestätigt. Diesen Schritt können Sie jetzt nachholen. Danach können Sie sich im Mitgliedsbereich einloggen.
Hier ist Ihr Bestätigungslink:
-{?URL?}/confirm.php?hash=$content[hash]
+{?URL?}/confirm.php?hash={%user,user_hash=$userid%}
Vielen Dank.