$content['category'] = getCategory($content['cat_id']);
$content['points'] = translateComma($content['points']);
$content['is_notify'] = translateYesNo($content['is_notify']);
- $content['sender'] = getMessage('_ADMIN_SHORT');
+ $content['sender'] = getMessage('USERNAME_ADMIN_SHORT');
$content['time'] = createFancyTime($content['time']);
- $content['userid'] = getUserId();
+ $content['userid'] = getMemberId();
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
$content['category'] = getCategory($content['cat_id']);
$content['points'] = translateComma($content['points']);
$content['time'] = createFancyTime($content['time']);
- $content['userid'] = getUserId();
+ $content['userid'] = getMemberId();
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
}
if (isExtensionActive('bonus')) {
- // Load bonus ID
+ // Load bonus id
$result = SQL_QUERY_ESC("SELECT `stats_id`, `bonus_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `bonus_id` DESC, stats_id DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getMemberId()), __FILE__, __LINE__);
} else {
- // Don't load bonus ID
+ // Don't load bonus id
$result = SQL_QUERY_ESC("SELECT `stats_id`, `stats_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `stats_id` DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getMemberId()), __FILE__, __LINE__);
}
// Mails left for confirmation?
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
while (list($id, $id2, $type) = SQL_FETCHROW($result)) {
// Load data from stats table...
- $cat = ''; $result_data = false;
- switch ($type)
- {
+ $cat = '';
+ $result_data = false;
+ $PROBLEM = getMessage('MEMBER_GENERAL_MAIL_PROBLEM');
+ $DATA = $id . '/' . $id2 . '/' . $type;
+ switch ($type) {
case 'NORMAL':
$result_data = SQL_QUERY_ESC("SELECT
s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender
WHERE
s.id=%s
LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
- $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
+ array(bigintval($id)), __FILE__, __LINE__);
+ $type = 'mailid';
+ $DATA = $id;
+ $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
break;
case 'BONUS':
$result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval($id2)), __FILE__, __LINE__);
- $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
- break;
+ array(bigintval($id2)), __FILE__, __LINE__);
+ $type = 'bonusid';
+ $DATA = $id2;
+ $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+ break;
default: // Unknown type detected!
logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type));
$sender = bigintval($sender);
} elseif ($type == 'bonusid') {
// Is admin
- $sender = getMessage('_ADMIN_SHORT');
+ $sender = getMessage('USERNAME_ADMIN_SHORT');
} else {
// Deleted
$sender = getMessage('EMAIL_STATUS_DELETED');
// Prepare data for template
$content = array(
'sw' => $SW,
- 'userid' => getUserId(),
+ 'userid' => getMemberId(),
'data' => bigintval($DATA),
'type' => $type,
'subject' => $subject,
// Prepare data for template
$content = array(
'sw' => $SW,
- 'data' => $content,
+ 'data' => $DATA,
'probl' => $PROBLEM,
);