// Maybe he wants to confirm an email?
if ($url_mid > 0) {
- $result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND `userid`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `id`, `link_type` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `stats_id`=%s AND `userid`=%s LIMIT 1",
array($url_mid, $url_uid), __FILE__, __LINE__);
$type = 'mailid'; $urlId = $url_mid;
} elseif ($url_bid > 0) {
- $result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND `userid`=%s LIMIT 1",
- array($url_bid, $url_uid), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `id`, link_type` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `bonus_id`=%s AND `userid`=%s LIMIT 1",
+ array($url_bid, $url_uid), __FILE__, __LINE__);
$type = 'bonusid'; $urlId = $url_bid;
}
// @TODO Rewrite this to a filter
switch ($ltype) {
case 'NORMAL':
- $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
+ $result_mailid = SQL_QUERY_ESC("SELECT `pool_id`, `userid`, `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
array($url_mid), __FILE__, __LINE__);
break;
case 'BONUS':
- $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ $result_mailid = SQL_QUERY_ESC("SELECT `id, `id`, `is_notify` FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
array($url_bid), __FILE__, __LINE__);
break;
}
// Export data into constants for the template
- // @TODO Rewrite these constants
- define('_POINTS_VALUE' , translateComma($payment));
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+ $content['points'] = translateComma($payment);
+ $content['banner'] = LOAD_TEMPLATE('mailid_banner', true);
// Only when user extension = v0.1.2: Update mails-confirmed counter
// @TODO Rewrite these blocks to filter
// Shall I exclude the webmaster's own userid from the active-rallye?
if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
// Add points and remember ranking are done in this function....
- BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
+ BONUS_ADD_TURBO_POINTS($payment, $url_uid, $type);
// Set template to mailid_points_done2 which contains a link to the ranking list
$template = 'mailid_points_done2';
if ($locked) $template = 'mailid_points_locked2';
- define('_UID_VALUE' , $url_uid);
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', translateComma($urlId));
+ $content['uid'] = $url_uid;
+ $content['type'] = $type;
+ $content['data'] = translateComma($payment);
} // END - if
} // END - if
} // END - if
// Load total points
- define('__TOTAL_POINTS', translateComma(
- GET_TOTAL_DATA($url_uid, 'user_points', 'points') -
- GET_TOTAL_DATA($url_uid, 'user_data', 'used_points'))
+ $content['total'] = translateComma(
+ GET_TOTAL_DATA($url_uid, 'user_points', 'points') -
+ GET_TOTAL_DATA($url_uid, 'user_data', 'used_points')
);
// Load template
// Remove link from table
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `id`=%s LIMIT 1",
- array(bigintval($lid)), __FILE__, __LINE__);
+ array(bigintval($lid)), __FILE__, __LINE__);
break;
case 'img':
case 'confirm':
if ($code > 0) {
// Export data into constants for the template
- define('_CODE_VALUE', $code);
- define('_UID_VALUE' , $url_uid );
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $urlId);
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+ $content['code'] = $code;
+ $content['uid'] = $url_uid;
+ $content['type'] = $type;
+ $content['data'] = $urlId;
+ $content['banner'] = LOAD_TEMPLATE('mailid_banner', true);
if (getConfig('code_length') > 0) {
// Generate Code
- define('_IMAGE_CODE', generateCaptchaCode($code, $type, $urlId, $url_uid));
+ $content['image'] = generateCaptchaCode($code, $type, $urlId, $url_uid);
$templ = 'mailid_enter_code';
} else {
// Disabled code
- define('__GFX_CODE', $img_code);
+ $content['gfx'] = $img_code;
$templ = 'mailid_confirm_buttom';
}
case '':
// Ok, all data is valid and loaded. Finally let's output the timer... :-)
// Export data into constants for the template
- define('_TIME_VALUE', $time);
- define('_TIM2_VALUE', strlen($time));
- define('_UID_VALUE' , $url_uid );
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $urlId);
- define('_RAND_VALUE', mt_rand(0, 99999));
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+ $content['time'] = $time;
+ $content['tim2'] = strlen($time);
+ $content['uid'] = $url_uid;
+ $content['type'] = $type;
+ $content['data'] = $urlId;
+ $content['rand'] = mt_rand(0, 99999);
+ $content['banner'] = LOAD_TEMPLATE('mailid_banner', true);
// Load template
LOAD_TEMPLATE('mailid_timer');