X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=mailid_top.php;h=36d762fc6b508c16a193134beee8c0271618238d;hp=951e60d49141ce77bca3588d34d86916bcc7b7c2;hb=40547996bdb16c5d2c507cb7111ae993a3fcebb9;hpb=3f51c40f4fede87228216f9285b745a339e3891d diff --git a/mailid_top.php b/mailid_top.php index 951e60d491..36d762fc6b 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -72,12 +72,12 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // 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; } @@ -89,12 +89,12 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // @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; @@ -220,9 +220,8 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors } // 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 @@ -270,22 +269,22 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // 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 @@ -301,7 +300,7 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors // 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': @@ -311,18 +310,18 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors 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'; } @@ -334,13 +333,13 @@ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors 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');