]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_bonus.php
HTML->XHTML preparation (still *A LOT* to convert
[mailer.git] / inc / modules / admin / what-list_bonus.php
index 88fe74fd797b93c05dd78db67282aa1566a716a6..b540d55e8aee3afc45a074456e0a8b4e9104b233 100644 (file)
@@ -40,7 +40,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if ($_CONFIG['bonus_active'] == "Y") {
+if (getConfig('bonus_active') == "Y") {
        // Shall I withdraw now?
        if (isset($_POST['withdraw'])) {
                // Okay, let's prepare...
@@ -54,11 +54,11 @@ if ($_CONFIG['bonus_active'] == "Y") {
        if (GET_EXT_VERSION("bonus") >= "0.6.9") {
                // Add more bonus points here
                $USE = "(0";
-               if ($_CONFIG['bonus_click_yn'] == "Y") $USE .= " + turbo_bonus";
-               if ($_CONFIG['bonus_login_yn'] == "Y") $USE .= " + login_bonus";
-               if ($_CONFIG['bonus_order_yn'] == "Y") $USE .= " + bonus_order";
-               if ($_CONFIG['bonus_stats_yn'] == "Y") $USE .= " + bonus_stats";
-               if ($_CONFIG['bonus_ref_yn']   == "Y") $USE .= " + bonus_ref";
+               if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus";
+               if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus";
+               if (getConfig('bonus_order_yn') == "Y") $USE .= " + bonus_order";
+               if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats";
+               if (getConfig('bonus_ref_yn')   == "Y") $USE .= " + bonus_ref";
                $USE .= ")";
        } else {
                // Old version ???
@@ -70,7 +70,7 @@ if ($_CONFIG['bonus_active'] == "Y") {
        if (EXT_IS_ACTIVE("autopurge")) {
                // Use last online timestamp to keep inactive members away from here
                $LAST   = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
-               $ONLINE = $_CONFIG['ap_inactive_since'];
+               $ONLINE = getConfig('ap_inactive_since');
        }
 
        // Check if at least one is in the active rallye
@@ -89,10 +89,10 @@ ORDER BY points DESC, last_online DESC, userid",
 
                        // Generate array fore the dynamic template
                        $WIN1 = ""; $WIN2 = "";
-                       if ($cnt <= $_CONFIG['bonus_ranks']) {
+                       if ($cnt <= getConfig('bonus_ranks')) {
                                // Maybe he can win his active bonus?
-                               $WIN1 = "<STRONG>";
-                               $WIN2 = "</STRONG>";
+                               $WIN1 = "<strong>";
+                               $WIN2 = "</strong>";
                        }
 
                        // Prepare content
@@ -114,35 +114,28 @@ ORDER BY points DESC, last_online DESC, userid",
                define('__TOTAL', TRANSLATE_COMMA($total));
 
                // Check if we need to display form or not with manuel withdraw
-               if ($_CONFIG['last_month'] == date("m", time()))
-               {
+               if (getConfig('last_month') == date("m", time())) {
                        // Load form
                        define('__BONUS_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_bonus_form", true));
-               }
-                else
-               {
+               } else {
                        // Display message "no manual withdraw possible"
-                       define('__BONUS_WITHDRAW_FORM', "<FONT class=\"admin_failed\">".ADMIN_BONUS_ALREADY_WITHDRAW."</FONT>");
+                       define('__BONUS_WITHDRAW_FORM', "<div class=\"admin_failed\">".ADMIN_BONUS_ALREADY_WITHDRAW."</div>");
                }
 
                // Prepare constant for timemark
                if (EXT_IS_ACTIVE("autopurge")) {
-                       define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $_CONFIG['ap_inactive_since'], "2"));
+                       define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - getConfig('ap_inactive_since'), "2"));
                } else {
                        define('__AUTOPURGE_TIMEOUT', sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "autopurge"));
                }
 
                // Load final template
                LOAD_TEMPLATE("admin_list_bonus");
-       }
-        else
-       {
+       } else {
                // No one has become an "activity bonus"...
                LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BONUS_NO_ACTIVE_RALLYE);
        }
-}
- else
-{
+} else {
        // Aktive-Rallye not activated
        LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BONUS_RALLYE_DEACTIVATED);
 }