]> git.mxchange.org Git - mailer.git/blobdiff - mailid_top.php
A lot constants rewritten to array elements
[mailer.git] / mailid_top.php
index 3457613e5a37e2b6888e7e75e3a08c702c5ee3cf..f670abbd9cea94da5632403cf267cb460c305bf7 100644 (file)
@@ -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));
                                                                                        $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');