$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL('modules.php?module=index');
+ redirectToUrl('modules.php?module=index');
} elseif ((!EXT_IS_ACTIVE('mailid')) && (!IS_ADMIN())) {
- LOAD_URL('modules.php?module=login');
+ redirectToUrl('modules.php?module=login');
}
// Add description as navigation point
// Display bonus mail by loading it's full data
$result_data = SQL_QUERY_ESC("SELECT id, subject, timestamp, cat_id, points, text, is_notify, data_type, time, url
FROM `{!_MYSQL_PREFIX!}_bonus`
-WHERE id=%s LIMIT 1",
+WHERE `id`=%s LIMIT 1",
array(bigintval(REQUEST_GET('bonusid'))), __FILE__, __LINE__);
// Load data
// Translate some data
$content['subject'] = COMPILE_CODE($content['subject']);
$content['text'] = COMPILE_CODE($content['text']);
- $content['timestamp'] = MAKE_DATETIME($content['timestamp'], '2');
- $content['category'] = GET_CATEGORY($content['cat_id']);
- $content['points'] = TRANSLATE_COMMA($content['points']);
- $content['is_notify'] = TRANSLATE_YESNO($content['is_notify']);
- $content['sender'] = _ADMIN_SHORT;
- $content['time'] = CREATE_FANCY_TIME($content['time']);
+ $content['timestamp'] = generateDateTime($content['timestamp'], '2');
+ $content['category'] = getCategory($content['cat_id']);
+ $content['points'] = translateComma($content['points']);
+ $content['is_notify'] = translateYesNo($content['is_notify']);
+ $content['sender'] = getMessage('_ADMIN_SHORT');
+ $content['time'] = createFancyTime($content['time']);
$content['uid'] = getUserId();
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
- MAKE_DATETIME(USER_STATS_GET_TIMESTAMP('bonusid', $content['id']), '2')
+ generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), '2')
);
// Display it depending on mail (data) type
// Translate some data
$content['subject'] = COMPILE_CODE($content['subject']);
$content['text'] = COMPILE_CODE($content['text']);
- $content['timestamp'] = MAKE_DATETIME($content['timestamp'], '2');
- $content['category'] = GET_CATEGORY($content['cat_id']);
- $content['points'] = TRANSLATE_COMMA($content['points']);
- $content['time'] = CREATE_FANCY_TIME($content['time']);
+ $content['timestamp'] = generateDateTime($content['timestamp'], '2');
+ $content['category'] = getCategory($content['cat_id']);
+ $content['points'] = translateComma($content['points']);
+ $content['time'] = createFancyTime($content['time']);
$content['uid'] = getUserId();
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
- MAKE_DATETIME(USER_STATS_GET_TIMESTAMP('mailid', $content['id']), '2')
+ generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
);
// Display it depending on mail (data) type
break;
case 'BONUS':
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
+ $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;
'type' => $type,
'subject' => $subject,
'sender' => $sender,
- 'stamp' => MAKE_DATETIME($timestamp, '2'),
- 'cat' => GET_CATEGORY($cat),
- 'points' => TRANSLATE_COMMA($pay),
+ 'stamp' => generateDateTime($timestamp, '2'),
+ 'cat' => getCategory($cat),
+ 'points' => translateComma($pay),
);
// Load row template
SQL_FREERESULT($result);
// Remember total points
- define('__TOTAL_POINTS', TRANSLATE_COMMA($sum));
+ define('__TOTAL_POINTS', translateComma($sum));
// Remember all generated rows in constant for the template
define('__UNCONFIRMED_ROWS', $OUT);