wernis extension is now alpha code (only listing in admin area is missing), naming...
authorRoland Häder <roland@mxchange.org>
Sun, 17 Feb 2008 23:21:24 +0000 (23:21 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 17 Feb 2008 23:21:24 +0000 (23:21 +0000)
192 files changed:
.gitattributes
admin.php
agb.php
beg.php
birthday_confirm.php
click.php
confirm.php
doubler.php
inc/autopurge.php
inc/databases.php
inc/db/lib-mysql3.php
inc/doubler_send.php
inc/extensions.php
inc/extensions/ext-active.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-beg.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-cache.php
inc/extensions/ext-doubler.php
inc/extensions/ext-holiday.php
inc/extensions/ext-maintenance.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-order.php
inc/extensions/ext-other.php
inc/extensions/ext-register.php
inc/extensions/ext-rewrite.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-top10.php
inc/extensions/ext-transfer.php
inc/extensions/ext-user.php
inc/extensions/ext-wernis.php
inc/footer.php
inc/functions.php
inc/gen_sql_patches.php
inc/header.php
inc/language.php
inc/language/wernis_de.php
inc/libs/admins_functions.php
inc/libs/bonus_functions.php
inc/libs/doubler_functions.php
inc/libs/payout_functions.php
inc/libs/rallye_functions.php
inc/libs/register_functions.php
inc/libs/rewrite_functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/libs/wernis_functions.php
inc/load_cache.php
inc/load_extensions.php
inc/mails/beg_mails.php
inc/mails/birthday_mails.php
inc/mails/bonus_mails.php
inc/modules/admin.php
inc/modules/admin/action-logout.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-autopurge.php
inc/modules/admin/what-cache_stats.php
inc/modules/admin/what-config_active.php
inc/modules/admin/what-config_admin.php
inc/modules/admin/what-config_autopurge.php
inc/modules/admin/what-config_beg.php
inc/modules/admin/what-config_birthday.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-config_cache.php
inc/modules/admin/what-config_doubler.php
inc/modules/admin/what-config_extensions.php
inc/modules/admin/what-config_holiday.php
inc/modules/admin/what-config_home.php
inc/modules/admin/what-config_mediadata.php
inc/modules/admin/what-config_newsletter.php
inc/modules/admin/what-config_order.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-config_refid.php
inc/modules/admin/what-config_reg.php
inc/modules/admin/what-config_register2.php
inc/modules/admin/what-config_rewrite.php
inc/modules/admin/what-config_secure.php
inc/modules/admin/what-config_stats.php
inc/modules/admin/what-config_title.php
inc/modules/admin/what-config_top10.php
inc/modules/admin/what-config_transfer.php
inc/modules/admin/what-config_user.php
inc/modules/admin/what-config_wernis.php
inc/modules/admin/what-del_user.php
inc/modules/admin/what-email_archiv.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_autopurge.php
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_bonus.php
inc/modules/admin/what-list_norefs.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-maintenance.php
inc/modules/admin/what-send_bonus.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-updates.php
inc/modules/admin/what-user_online.php
inc/modules/admin/what-usr_online.php
inc/modules/chk_login.php
inc/modules/frametester.php
inc/modules/guest/action-online.php
inc/modules/guest/action-themes.php
inc/modules/guest/what-active.php
inc/modules/guest/what-beg.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-doubler.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-register.php
inc/modules/guest/what-stats.php
inc/modules/guest/what-top10.php
inc/modules/index.php
inc/modules/loader.php
inc/modules/login.php
inc/modules/member/action-account.php
inc/modules/member/action-bank.php
inc/modules/member/action-extras.php
inc/modules/member/action-logout.php
inc/modules/member/action-main.php
inc/modules/member/action-order.php
inc/modules/member/action-rals.php
inc/modules/member/action-stats.php
inc/modules/member/action-themes.php
inc/modules/member/what-bank_create.php
inc/modules/member/what-bank_deposit.php
inc/modules/member/what-bank_infos.php
inc/modules/member/what-bank_output.php
inc/modules/member/what-bank_withdraw.php
inc/modules/member/what-beg.php
inc/modules/member/what-beg2.php
inc/modules/member/what-bonus.php
inc/modules/member/what-categories.php
inc/modules/member/what-doubler.php
inc/modules/member/what-guest.php
inc/modules/member/what-holiday.php
inc/modules/member/what-html_mail.php
inc/modules/member/what-logout.php
inc/modules/member/what-mydata.php
inc/modules/member/what-newsletter.php
inc/modules/member/what-nickname.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/modules/member/what-points.php
inc/modules/member/what-rallyes.php
inc/modules/member/what-reflinks.php
inc/modules/member/what-stats.php
inc/modules/member/what-support.php
inc/modules/member/what-themes.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/modules/member/what-welcome.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/monthly/monthly_newsletter.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/patch-system.php
inc/pool-update.php
inc/profile-updte.php
inc/reset/reset_daily.php
inc/reset/reset_holiday.php
inc/session.php
inc/stats_bonus.php
inc/stylesheet.php
inc/theme-manager.php
index.php
install.php
login.php
mailid.php
mailid_top.php
modules.php
ref.php
show_bonus.php
templates/de/html/admin/admin_config_wernis.tpl
templates/de/html/member/member_payout_form.tpl
templates/de/html/member/member_wernis.tpl [deleted file]
templates/de/html/member/member_wernis_form.tpl [deleted file]
templates/de/html/member/member_wernis_mode_choose.tpl
templates/de/html/member/member_wernis_mode_list.tpl [new file with mode: 0644]
templates/de/html/member/member_wernis_mode_list_row.tpl [new file with mode: 0644]
templates/de/html/member/member_wernis_mode_pay.tpl [new file with mode: 0644]
templates/de/html/member/member_wernis_mode_withdraw.tpl [new file with mode: 0644]
templates/de/html/member/member_wernis_row.tpl [deleted file]

index 0c72454..5e28c45 100644 (file)
@@ -1140,10 +1140,11 @@ templates/de/html/member/member_unconfirmed_table.tpl -text
 templates/de/html/member/member_welcome.tpl -text
 templates/de/html/member/member_welcome_footer.tpl -text
 templates/de/html/member/member_welcome_header.tpl -text
-templates/de/html/member/member_wernis.tpl -text
-templates/de/html/member/member_wernis_form.tpl -text
 templates/de/html/member/member_wernis_mode_choose.tpl -text
-templates/de/html/member/member_wernis_row.tpl -text
+templates/de/html/member/member_wernis_mode_list.tpl -text
+templates/de/html/member/member_wernis_mode_list_row.tpl -text
+templates/de/html/member/member_wernis_mode_pay.tpl -text
+templates/de/html/member/member_wernis_mode_withdraw.tpl -text
 templates/de/html/message.tpl -text
 templates/de/html/metadata.tpl -text
 templates/de/html/online_now.tpl -text
index 7fcb0e8..8c26089 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -48,13 +48,13 @@ require ("inc/config.php");
 if (defined('mxchange_installed') && (mxchange_installed))
 {
        // Simply redirect... :-)
-       LOAD_URL(URL."/modules.php?module=admin&amp;action=login");
+       LOAD_URL("modules.php?module=admin&amp;action=login");
        // Redirection should be done here
 }
  else
 {
        // You have to configure first!
-       LOAD_URL(URL."/install.php");
+       LOAD_URL("install.php");
 }
 
 // Really all done here... ;-)
diff --git a/agb.php b/agb.php
index 4c878bc..a321428 100644 (file)
--- a/agb.php
+++ b/agb.php
@@ -48,13 +48,13 @@ require ("inc/config.php");
 if (defined('mxchange_installed') && (mxchange_installed))
 {
        // Simply redirect... :-)
-       LOAD_URL(URL."/modules.php?module=index&amp;what=agb");
+       LOAD_URL("modules.php?module=index&amp;what=agb");
        // Redirection should be done here
 }
  else
 {
        // You have to configure first!
-       LOAD_URL(URL."/install.php");
+       LOAD_URL("install.php");
 }
 // Really all done here... ;-)
 ?>
diff --git a/beg.php b/beg.php
index b7bb846..712a362 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -94,13 +94,13 @@ if (defined('mxchange_installed') && (mxchange_installed)) {
                                // Multiply configured values with 100000 and divide with 100000 so we can also handle small values
                                // If we need more number behind the decimal dot then we just need to increase all these three
                                // numbers matching to the numbers behind the decimal dot. Simple! ;-)
-                               $POINTS = rand(($CONFIG['beg_points'] * 100000), ($CONFIG['beg_points_max'] * 100000)) / 100000;
+                               $points = rand(($_CONFIG['beg_points'] * 100000), ($_CONFIG['beg_points_max'] * 100000)) / 100000;
 
                                // Set nickname / userid for the template(s
                                define('__BEG_UID'   , $_GET['uid']);
                                define('__BEG_CLICKS', ($clicks + 1));
                                define('__BEG_BANNER', LOAD_TEMPLATE("beg_banner", true));
-                               define('__BEG_POINTS', TRANSLATE_COMMA($POINTS));
+                               define('__BEG_POINTS', TRANSLATE_COMMA($points));
                        } else {
                                // Other status
                                $uid = "0";
@@ -110,15 +110,15 @@ if (defined('mxchange_installed') && (mxchange_installed)) {
                // Free memory
                SQL_FREERESULT($result);
 
-               if (($uid > 0) && ($CONFIG['beg_uid'] != $uid)) {
+               if (($uid > 0) && ($_CONFIG['beg_uid'] != $uid)) {
                        // Update counter
                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_clicks=beg_clicks+1 WHERE userid=%d AND status='CONFIRMED' LIMIT 1",
                         array($uid), __FILE__, __LINE__);
 
                        // Check for last entry for userid w/o IP number
-                       $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > ".(time() - $CONFIG['beg_timeout'])." OR (timeout > ".(time() - $CONFIG['beg_uid_timeout'])." AND userid=%d)) AND remote_ip='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > ".(time() - $_CONFIG['beg_timeout'])." OR (timeout > ".(time() - $_CONFIG['beg_uid_timeout'])." AND userid=%d)) AND remote_ip='%s' LIMIT 1",
                         array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__);
-                       if ((SQL_NUMROWS($result) == 0) && ($POINTS > 0) && (!$login)) {
+                       if ((SQL_NUMROWS($result) == 0) && ($points > 0) && (!$login)) {
                                // Free memory
                                SQL_FREERESULT($result);
 
@@ -132,28 +132,29 @@ if (defined('mxchange_installed') && (mxchange_installed)) {
 
                                // Set mode depending on how many mails the member has to confirm
                                $locked = false;
-                               if (($ref_payout > 0) && ($CONFIG['allow_direct_pay'] == 'N')) $locked = true;
+                               if (($ref_payout > 0) && ($_CONFIG['allow_direct_pay'] == 'N')) $locked = true;
 
                                // Is begging rallye active?
-                               if ($CONFIG['beg_rallye'] == 'Y') {
+                               if ($_CONFIG['beg_rallye'] == 'Y') {
                                        // Add points to rallye account
                                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=beg_points+%s WHERE userid=%d LIMIT 1",
-                                        array($POINTS, $uid), __FILE__, __LINE__);
+                                        array($points, $uid), __FILE__, __LINE__);
                                } else {
                                        // Add points to account
-                                       ADD_POINTS_REFSYSTEM($uid, $POINTS, false, "0", $locked, strtolower($CONFIG['beg_mode']));
+                                       $DEPTH = 0;
+                                       ADD_POINTS_REFSYSTEM($uid, $points, false, "0", $locked, strtolower($_CONFIG['beg_mode']));
                                }
 
                                // Subtract begged points from member account if the admin has selected one
-                               if ($CONFIG['beg_uid'] > 0) {
+                               if ($_CONFIG['beg_uid'] > 0) {
                                        // Subtract from this account
                                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1",
-                                        array($POINTS, bigintval($CONFIG['beg_uid'])), __FILE__, __LINE__);
+                                        array($points, bigintval($_CONFIG['beg_uid'])), __FILE__, __LINE__);
 
                                        // Update mediadata as well
                                        if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
                                                // Update database
-                                               MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS);
+                                               MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
                                        }
                                }
 
@@ -201,21 +202,21 @@ if (defined('mxchange_installed') && (mxchange_installed)) {
 
                        // Free memory
                        SQL_FREERESULT($result);
-               } elseif ($uid == $CONFIG['beg_uid']) {
+               } elseif ($uid == $_CONFIG['beg_uid']) {
                        // Webmaster's ID cannot beg for points!
                        $msg = CODE_BEG_SAME_AS_OWN;
                }
 
                // Reload to index module
                die("-".$msg."-");
-               if ((!empty($msg)) && (!empty($msg))) LOAD_URL(URL."/modules.php?module=index&msg=".$msg);
+               if ((!empty($msg)) && (!empty($msg))) LOAD_URL("modules.php?module=index&msg=".$msg);
        } else {
                // No userid entered
-               LOAD_URL(URL."/modules.php?module=index");
+               LOAD_URL("modules.php?module=index");
        }
 } else {
        // You have to configure first!
-       LOAD_URL(URL."/install.php");
+       LOAD_URL("install.php");
 }
 
 // Really all done here... ;-)
index 2772953..cd22365 100644 (file)
@@ -71,10 +71,11 @@ WHERE b.userid=%d AND b.chk_value='%s' LIMIT 1",
                {
                        // Set mode depending on how many mails the member has to confirm
                        $locked = false;
-                       if (($ref_payout > 0) && ($CONFIG['allow_direct_pay'] == 'N')) $locked = true;
+                       if (($ref_payout > 0) && ($_CONFIG['allow_direct_pay'] == 'N')) $locked = true;
 
                        // Add points to account
-                       ADD_POINTS_REFSYSTEM($uid, $GIFT, false, "0", $locked, strtolower($CONFIG['birthday_mode']));
+                       $DEPTH = 0;
+                       ADD_POINTS_REFSYSTEM($uid, $GIFT, false, "0", $locked, strtolower($_CONFIG['birthday_mode']));
 
                        // Remove entry from table
                        $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%d LIMIT 1",
@@ -132,7 +133,7 @@ WHERE b.userid=%d AND b.chk_value='%s' LIMIT 1",
  else
 {
        // You have to configure first!
-       LOAD_URL(URL."/install.php");
+       LOAD_URL("install.php");
 }
 // Really all done here... ;-)
 ?>
index 1601300..016ba77 100644 (file)
--- a/click.php
+++ b/click.php
@@ -50,9 +50,9 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b
        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%d LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__);
        if (SQL_AFFECTEDROWS($link) == 1) {
                if (!empty($_GET['user'])) {
-                       LOAD_URL(URL."/ref.php?refid=".bigintval($_GET['user']));
+                       LOAD_URL("ref.php?refid=".bigintval($_GET['user']));
                } else {
-                       LOAD_URL(URL."/shop_reseller.php?reseller=".bigintval($_GET['user']));
+                       LOAD_URL("shop_reseller.php?reseller=".bigintval($_GET['user']));
                }
        }
        exit();
index 4216529..6e44e25 100644 (file)
@@ -66,7 +66,7 @@ if (defined('mxchange_installed') && (mxchange_installed) && (admin_registered))
  else
 {
        // You have to configure first!
-       LOAD_URL(URL."/install.php");
+       LOAD_URL("install.php");
 }
 // Really all done here... ;-)
 ?>
index 9d3a443..2146415 100644 (file)
@@ -77,7 +77,7 @@ if (defined('mxchange_installed') && (mxchange_installed))
        $uid = 0;
 
        // If no account was found set default refid and status to CONFIRMED
-       if (empty($GLOBALS['refid'])) { $GLOBALS['refid'] = $CONFIG['def_refid']; $status = "CONFIRMED"; }
+       if (empty($GLOBALS['refid'])) { $GLOBALS['refid'] = $_CONFIG['def_refid']; $status = "CONFIRMED"; }
 
        // Begin with doubler script...
        if (isset($_POST['ok']))
@@ -114,7 +114,7 @@ if (defined('mxchange_installed') && (mxchange_installed))
                        $_POST['points'] = bigintval(round(str_replace(",", ".", $_POST['points'])));
 
                        // Probe for enough points
-                       $probe_points = (($_POST['points'] >= $CONFIG['doubler_min']) && ($_POST['points'] <= $CONFIG['doubler_max']));
+                       $probe_points = (($_POST['points'] >= $_CONFIG['doubler_min']) && ($_POST['points'] <= $_CONFIG['doubler_max']));
 
                        // Check all together
                        if ((!empty($uid)) && ($password == generateHash($_POST['pass'], substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points))
@@ -123,10 +123,10 @@ if (defined('mxchange_installed') && (mxchange_installed))
                                $DOUBLER_UID = $uid;
 
                                // Calulcate points
-                               $POINTS = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");
+                               $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");
 
                                // So let's continue with probing his points amount
-                               if (($POINTS - $CONFIG['doubler_left'] - $_POST['points'] * $CONFIG['doubler_charge']) >= 0)
+                               if (($points - $_CONFIG['doubler_left'] - $_POST['points'] * $_CONFIG['doubler_charge']) >= 0)
                                {
                                        // Enough points are left so let's continue with the doubling process
                                        // Create doubling "account" width *DOUBLED* points
@@ -145,10 +145,10 @@ if (defined('mxchange_installed') && (mxchange_installed))
                                        }
 
                                        // Add points to "total payed" including charge
-                                       $points = $_POST['points'] - $_POST['points'] * $CONFIG['doubler_charge'];
+                                       $points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge'];
                                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config='0' LIMIT 1",
                                         array($points), __FILE__, __LINE__);
-                                       $CONFIG['doubler_points'] += $points;
+                                       $_CONFIG['doubler_points'] += $points;
 
                                        // Destroy cache
                                        if (GET_EXT_VERSION("cache") >= "0.1.2")
@@ -161,14 +161,14 @@ if (defined('mxchange_installed') && (mxchange_installed))
                                        {
                                                // Okay add a refid line and apply refid percents
                                                $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s', '0', '%s', '".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N', 'Y')",
-                                                array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $CONFIG['doubler_ref'])), __FILE__, __LINE__);
+                                                array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $_CONFIG['doubler_ref'])), __FILE__, __LINE__);
 
                                                // And that's why we dont't want to you more than one referral level of doubler-points. ^^^
                                        }
 
                                        // Update usage counter
                                        $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config='0' LIMIT 1", __FILE__, __LINE__);
-                                       $CONFIG['doubler_counter']++;
+                                       $_CONFIG['doubler_counter']++;
 
                                        // Set constant
                                        define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, $_POST['userid']));
@@ -195,12 +195,12 @@ if (defined('mxchange_installed') && (mxchange_installed))
                                // Account is locked by admin / holiday!
                                define('__ERROR_MSG', DOUBLER_FORM_STATUS_LOCKED);
                        }
-                        elseif ($_POST['points'] < $CONFIG['doubler_min'])
+                        elseif ($_POST['points'] < $_CONFIG['doubler_min'])
                        {
                                // Not enougth points entered
                                define('__ERROR_MSG', DOUBLER_FORM_POINTS_MIN);
                        }
-                        elseif ($_POST['points'] > $CONFIG['doubler_max'])
+                        elseif ($_POST['points'] > $_CONFIG['doubler_max'])
                        {
                                // Too much points entered
                                define('__ERROR_MSG', DOUBLER_FORM_POINTS_MAX);
@@ -238,7 +238,7 @@ if (defined('mxchange_installed') && (mxchange_installed))
        if (!defined('__ERROR_MSG'))   define('__ERROR_MSG'  , "");
 
        // Shall I check for points immediately?
-       if ($CONFIG['doubler_send_mode'] == "DIRECT") require(PATH."inc/doubler_send.php");
+       if ($_CONFIG['doubler_send_mode'] == "DIRECT") require(PATH."inc/doubler_send.php");
 
        // Output header
        include(PATH."inc/header.php");
@@ -263,15 +263,15 @@ if (defined('mxchange_installed') && (mxchange_installed))
         else
        {
                // Transfer default refid to constant
-               define('__REFID', $CONFIG['def_refid']);
+               define('__REFID', $_CONFIG['def_refid']);
        }
 
        // Percent values etc.
-       define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100));
-       define('__REF_VALUE'   , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100));
-       define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points']));
-       define('__MIN_VALUE'   , TRANSLATE_COMMA($CONFIG['doubler_min']));
-       define('__MAX_VALUE'   , TRANSLATE_COMMA($CONFIG['doubler_max']));
+       define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100));
+       define('__REF_VALUE'   , TRANSLATE_COMMA($_CONFIG['doubler_ref'] * 100));
+       define('__TOTAL_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_points']));
+       define('__MIN_VALUE'   , TRANSLATE_COMMA($_CONFIG['doubler_min']));
+       define('__MAX_VALUE'   , TRANSLATE_COMMA($_CONFIG['doubler_max']));
 
        // Text "Enter login"
        if (EXT_IS_ACTIVE("nickname"))
@@ -286,7 +286,7 @@ if (defined('mxchange_installed') && (mxchange_installed))
        }
 
        // Which mail-send-mode did the admin setup?
-       switch ($CONFIG['doubler_send_mode'])
+       switch ($_CONFIG['doubler_send_mode'])
        {
        case "DIRECT":
                define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
@@ -301,10 +301,10 @@ if (defined('mxchange_installed') && (mxchange_installed))
        define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", 'Y', 'N', "DESC"));
 
        // Generate timemark
-       define('__TIMEOUT_MARK', CREATE_FANCY_TIME($CONFIG['doubler_timeout']));
+       define('__TIMEOUT_MARK', CREATE_FANCY_TIME($_CONFIG['doubler_timeout']));
 
        // Usage counter
-       define('__DOUBLER_COUNTER', $CONFIG['doubler_counter']);
+       define('__DOUBLER_COUNTER', $_CONFIG['doubler_counter']);
 
        // Points left to doubler
        define('__LEFT_VALUE', TRANSLATE_COMMA(DOUBLER_GET_TOTAL_POINTS_LEFT()));
@@ -318,7 +318,7 @@ if (defined('mxchange_installed') && (mxchange_installed))
  else
 {
        // You have to configure first!
-       LOAD_URL(URL."/install.php");
+       LOAD_URL("install.php");
 }
 
 // Really all done here... ;-)
index aa393cf..2d280c4 100644 (file)
@@ -38,16 +38,16 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
        require($INC);
 }
 
-if (($CONFIG['auto_purge_active'] == 'Y') && ($CONFIG['auto_purge'] > 0))
+if (($_CONFIG['auto_purge_active'] == 'Y') && ($_CONFIG['auto_purge'] > 0))
 {
        // First calculate the timestamp
        if (function_exists('CREATE_TIME_SELECTIONS'))
        {
-               $PURGE = time() - $CONFIG['auto_purge'];
+               $PURGE = time() - $_CONFIG['auto_purge'];
        }
         else
        {
-               $PURGE = time() - $CONFIG['auto_purge'] * 24 * 60 * 60;
+               $PURGE = time() - $_CONFIG['auto_purge'] * 24 * 60 * 60;
        }
 
        // Init variables
@@ -162,10 +162,10 @@ WHERE s.timestamp_ordered <= %s ORDER BY s.userid",
 }
 
 // Shall I look for inactive accounts and autopurge inactive accounts?
-if ($CONFIG['ap_inactive'] == 'Y')
+if ($_CONFIG['ap_inactive'] == 'Y')
 {
        // Ok, let's have a look...
-       $since = bigintval(time() - $CONFIG['ap_in_since']);
+       $since = bigintval(time() - $_CONFIG['ap_in_since']);
        $EXCLUDE_LIST = " AND d.userid != c.def_refid";
 
        // Check for more extensions
@@ -190,8 +190,8 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
        {
                // Prepare variables and constants...
                $UIDs = "";
-               define('__INACTIVE_SINCE', ($CONFIG['ap_in_since'] / 60 / 60));
-               define('__INACTIVE_TIME' , ($CONFIG['ap_in_time']  / 60 / 60));
+               define('__INACTIVE_SINCE', ($_CONFIG['ap_in_since'] / 60 / 60));
+               define('__INACTIVE_TIME' , ($_CONFIG['ap_in_time']  / 60 / 60));
 
                // Mark found accounts as inactive and send an email
                while(list($uid, $email, $last) = SQL_FETCHROW($result_inactive))
@@ -231,7 +231,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
 
        // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
        // here for e.g. excluding holiday users
-       $time = bigintval(time() - $CONFIG['ap_in_time']);
+       $time = bigintval(time() - $_CONFIG['ap_in_time']);
        $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online
 FROM "._MYSQL_PREFIX."_user_data AS d, "._MYSQL_PREFIX."_config AS c
 WHERE status='CONFIRMED' AND joined < %s AND last_online< %s AND ap_notified < %s
@@ -260,7 +260,7 @@ ORDER BY userid",
                $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
 
                // Send mail notification to admin
-               if ($CONFIG['ap_un_mail'] == 'Y')
+               if ($_CONFIG['ap_un_mail'] == 'Y')
                {
                        if (GET_EXT_VERSION("admins") >= "0.4.1")
                        {
@@ -279,17 +279,17 @@ ORDER BY userid",
 }
 
 // Shall I auto-purge unconfirmed accounts?
-if ($CONFIG['ap_unconfirmed'] == 'Y')
+if ($_CONFIG['ap_unconfirmed'] == 'Y')
 {
        // Init variables and find unconfirmed accounts which I shall auto-purge
-       $time = bigintval(time() - $CONFIG['ap_un_time']);
+       $time = bigintval(time() - $_CONFIG['ap_un_time']);
        $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' AND joined < %s ORDER BY userid",
         array($time), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_uncon) > 0)
        {
                // Prepare variable...
                $UIDs = "";
-               define('__UNCONFIRMED_TIME' , ($CONFIG['ap_un_time']  / 60 / 60));
+               define('__UNCONFIRMED_TIME' , ($_CONFIG['ap_un_time']  / 60 / 60));
 
                // Delete inactive accounts
                while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon))
@@ -308,7 +308,7 @@ if ($CONFIG['ap_unconfirmed'] == 'Y')
                $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
 
                // Send mail notification to admin
-               if ($CONFIG['ap_un_mail'] == 'Y')
+               if ($_CONFIG['ap_un_mail'] == 'Y')
                {
                        if (GET_EXT_VERSION("admins") >= "0.4.1")
                        {
@@ -327,15 +327,15 @@ if ($CONFIG['ap_unconfirmed'] == 'Y')
 }
 
 // Check version (must be > 0.0)
-if ((GET_EXT_VERSION("task") > "0.0") && ($CONFIG['ap_tasks'] == 'Y'))
+if ((GET_EXT_VERSION("task") > "0.0") && ($_CONFIG['ap_tasks'] == 'Y'))
 {
        // Purge deleted tasks (no notification to admin)
-       $since = bigintval(time() - $CONFIG['ap_tasks_time']);
+       $since = bigintval(time() - $_CONFIG['ap_tasks_time']);
        $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE status='DELETED' AND task_created <= %s",
         array($since), __FILE__, __LINE__);
        $DELETED = SQL_AFFECTEDROWS();
 
-       if (($DELETED > 0) && ($CONFIG['ap_tasks_mail'] == 'Y'))
+       if (($DELETED > 0) && ($_CONFIG['ap_tasks_mail'] == 'Y'))
        {
                // Send out email to admin
                if (GET_EXT_VERSION("admins") >= "0.4.1")
@@ -351,10 +351,10 @@ if ((GET_EXT_VERSION("task") > "0.0") && ($CONFIG['ap_tasks'] == 'Y'))
 }
 
 // Search for mails from deleted members?
-if ($CONFIG['ap_del_mails'])
+if ($_CONFIG['ap_del_mails'])
 {
        // Okay, let's check for them...
-       $since = bigintval(time() - $CONFIG['ap_dm_timeout']);
+       $since = bigintval(time() - $_CONFIG['ap_dm_timeout']);
        $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender",
         array($since), __FILE__, __LINE__);
 
@@ -377,7 +377,7 @@ if ($CONFIG['ap_del_mails'])
                                $DELETED += SQL_AFFECTEDROWS();
 
                                // Reset query (to prevent possible errors) ...
-                               $since = bigintval(time() - $CONFIG['ap_dm_timeout']);
+                               $since = bigintval(time() - $_CONFIG['ap_dm_timeout']);
                                $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender",
                                 array($since), __FILE__, __LINE__);
                        }
@@ -388,7 +388,7 @@ if ($CONFIG['ap_del_mails'])
        SQL_FREERESULT($result_mails);
 
        // Now let's check for stats entries as well
-       $since = bigintval(time() - $CONFIG['ap_dm_timeout']);
+       $since = bigintval(time() - $_CONFIG['ap_dm_timeout']);
        $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender",
         array($since), __FILE__, __LINE__);
 
@@ -407,7 +407,7 @@ if ($CONFIG['ap_del_mails'])
                                $DELETED += SQL_AFFECTEDROWS();
 
                                // Reset query (to prevent possible errors) ...
-                               $since = bigintval(time() - $CONFIG['ap_dm_timeout']);
+                               $since = bigintval(time() - $_CONFIG['ap_dm_timeout']);
                                $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_user_stats WHERE data_type='DELETED' AND timestamp_send <= %s ORDER BY sender",
                                 array($since), __FILE__, __LINE__);
                        }
@@ -418,7 +418,7 @@ if ($CONFIG['ap_del_mails'])
        SQL_FREERESULT($result_mails);
 
        // Do we have deleted mails and the admin want's to receive a notification
-       if (($DELETED > 0) && ($CONFIG['ap_dm_notify'] == 'Y'))
+       if (($DELETED > 0) && ($_CONFIG['ap_dm_notify'] == 'Y'))
        {
                // Send out email to admin
                if (GET_EXT_VERSION("admins") >= "0.4.1")
index fb6ab7e..602ef5a 100644 (file)
@@ -123,7 +123,7 @@ define('CURR_PATCH_LEVEL', "514");
 define('_PRIME', 591623);
 
 // Calculate with the prime number (for code generation)
-define('_ADD', (_PRIME * _PRIME / (pi() * $CONFIG['code_length'] + 1)));
+define('_ADD', (_PRIME * _PRIME / (pi() * $_CONFIG['code_length'] + 1)));
 
 //
 ?>
index 03e2d73..0fb1a62 100644 (file)
@@ -41,7 +41,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 // SQL queries
 function SQL_QUERY($sql_string, $F, $L)
 {
-       global $link, $CSS, $CONFIG, $OK;
+       global $link, $CSS, $_CONFIG, $OK;
 
        // Run SQL command
        $result = @mysql_query($sql_string, $link)
@@ -50,8 +50,8 @@ function SQL_QUERY($sql_string, $F, $L)
 ".$sql_string);
 
         // Count this query
-        if (!isset($CONFIG['sql_count'])) $CONFIG['sql_count'] = 0;
-        $CONFIG['sql_count']++;
+        if (!isset($_CONFIG['sql_count'])) $_CONFIG['sql_count'] = 0;
+        $_CONFIG['sql_count']++;
 
         // Debug output
         //* DEBUG: */ print "Query=<em>".$sql_string."</em>, affected=<b>".SQL_AFFECTEDROWS()."</b>, numrows=<b>".SQL_NUMROWS($result)."</b><br />\n";
@@ -72,15 +72,15 @@ function SQL_QUERY($sql_string, $F, $L)
        }
 
        // Count DB hits
-       if (!isset($CONFIG['db_hits']))
+       if (!isset($_CONFIG['db_hits']))
        {
                // Count in dummy variable
-               $CONFIG['db_hits'] = 0;
+               $_CONFIG['db_hits'] = 0;
        }
         else
        {
                // Count to config array
-               $CONFIG['db_hits']++;
+               $_CONFIG['db_hits']++;
        }
        return $result;
 }
@@ -177,12 +177,12 @@ function SQL_SELECT_DB($DB, $link, $F, $L)
 // SQL close link
 function SQL_CLOSE($link, $F, $L)
 {
-       global $CONFIG, $CACHE, $CFG_CACHE;
-       if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($CONFIG['db_hits'])) && (isset($CONFIG['cache_hits'])) && (is_object($CACHE)))
+       global $_CONFIG, $CACHE, $CFG_CACHE;
+       if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($_CONFIG['db_hits'])) && (isset($_CONFIG['cache_hits'])) && (is_object($CACHE)))
        {
                // Update counter for db/cache
                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET db_hits=%d, cache_hits=%d WHERE config='0' LIMIT 1",
-                       array(bigintval($CONFIG['db_hits']), bigintval($CONFIG['cache_hits'])), __FILE__, __LINE__);
+                       array(bigintval($_CONFIG['db_hits']), bigintval($_CONFIG['cache_hits'])), __FILE__, __LINE__);
 
                // Update cache here
                if (GET_EXT_VERSION("cache") >= "0.1.2")
@@ -190,8 +190,8 @@ function SQL_CLOSE($link, $F, $L)
                        if ($CACHE->cache_file("config", true))
                        {
                                // Replace data
-                               $CACHE->cache_replace("cache_hits", $CONFIG['cache_hits'], "0", $CFG_CACHE);
-                               $CACHE->cache_replace("db_hits"   , $CONFIG['db_hits']   , "0", $CFG_CACHE);
+                               $CACHE->cache_replace("cache_hits", $_CONFIG['cache_hits'], "0", $CFG_CACHE);
+                               $CACHE->cache_replace("db_hits"   , $_CONFIG['db_hits']   , "0", $CFG_CACHE);
                        }
                }
        }
index cffd353..7e38020 100644 (file)
@@ -56,7 +56,7 @@ unset($_COOKIE['DOUBLER_UID']);
 if (empty($DOUBLER_UID)) $DOUBLER_UID = "0";
 
 // Check for doubles which we can pay out
-$min = bigintval($CONFIG['doubler_min'] * 2);
+$min = bigintval($_CONFIG['doubler_min'] * 2);
 $result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
 FROM "._MYSQL_PREFIX."_doubler AS d
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
@@ -71,13 +71,13 @@ LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
 ON d.userid=u.userid
 WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N'
 ORDER BY d.timemark
-LIMIT %d", array($DOUBLER_POINTS, $min, $CONFIG['doubler_max_sent']), __FILE__, __LINE__);
+LIMIT %d", array($DOUBLER_POINTS, $min, $_CONFIG['doubler_max_sent']), __FILE__, __LINE__);
 
-if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) || ((SQL_NUMROWS($result_main) == $CONFIG['doubler_group_sent']) && ($CONFIG['doubler_sent_all'] == 'N')))
+if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == 'Y')) || ((SQL_NUMROWS($result_main) == $_CONFIG['doubler_group_sent']) && ($_CONFIG['doubler_sent_all'] == 'N')))
 {
        // Switch to matching SQL resource
        $result_load = $result_main;
-       if ((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) $result_load = $result_total;
+       if ((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == 'Y')) $result_load = $result_total;
 
        // At least one account was found
        while(list($id, $uid, $points, $ip, $time) = SQL_FETCHROW($result_load))
@@ -109,7 +109,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) |
                        }
 
                        // Exclude webmaster from doubling...
-                       if ($uid != $CONFIG['doubler_uid'])
+                       if ($uid != $_CONFIG['doubler_uid'])
                        {
                                // Add points
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth=0 LIMIT 1",
@@ -129,7 +129,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) |
 
                        $OK = false;
                        // Check for jackpot inclusion in doubling process
-                       if (($jackpot > 0) && ($jackpot >= $points) && ($CONFIG['doubler_jackpot'] == 'Y'))
+                       if (($jackpot > 0) && ($jackpot >= $points) && ($_CONFIG['doubler_jackpot'] == 'Y'))
                        {
                                // Subtract points from jackpot
                                SUB_JACKPOT($points);
@@ -140,11 +140,11 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) |
                        }
 
                        // Exclude also webmaster's ID in taking points from webmaster's account
-                       if (($user > 0) && ($user >= $points) && (!$OK) && ($CONFIG['doubler_uid'] > 0) && ($uid != $CONFIG['doubler_uid']))
+                       if (($user > 0) && ($user >= $points) && (!$OK) && ($_CONFIG['doubler_uid'] > 0) && ($uid != $_CONFIG['doubler_uid']))
                        {
                                // Add points to used points
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='' LIMIT 1",
-                                array($points, $CONFIG['doubler_uid']), __FILE__, __LINE__);
+                                array($points, $_CONFIG['doubler_uid']), __FILE__, __LINE__);
 
                                // Update mediadata as well
                                if (GET_EXT_VERSION("mediadata") >= "0.0.4")
@@ -172,7 +172,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) |
                        }
 
                        // Update variables to prevent errors
-                       $CONFIG['doubler_used'] += $points;
+                       $_CONFIG['doubler_used'] += $points;
                        $DOUBLER_POINTS -= $points;
 
                        // Prepare array
index 7f43bba..6aee0ca 100644 (file)
@@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 //
 function EXTENSION_REGISTER($ext_name, $id, $dry_run=false)
 {
-       global $NOTES, $CONFIG, $INC_POOL;
+       global $NOTES, $_CONFIG, $INC_POOL;
        // We want to register an extension and registration status is by default "failed" (= false)
        $EXT_LOAD_MODE = "register"; $ret = false; $SQLs = array();
        $INC_POOL = array();
@@ -65,7 +65,7 @@ function EXTENSION_REGISTER($ext_name, $id, $dry_run=false)
                foreach ($EXT_VER_HISTORY as $EXT_VER)
                {
                        require($file);
-                       if (((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
+                       if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
                        {
                                if (!empty($UPDATE_NOTES))
                                {
@@ -265,7 +265,7 @@ function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE)
 //
 function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false)
 {
-       global $EXTENSIONS, $CONFIG;
+       global $EXTENSIONS, $_CONFIG;
 
        // Extensions are all inactive during installation
        if ((!mxchange_installed) || (mxchange_installing) || (empty($ext_name))) return false;
@@ -283,7 +283,7 @@ function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false)
                $active = $EXTENSIONS['ext_active'][$ext_name];
 
                // Count cache hits
-               if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++;
+               if (isset($_CONFIG['cache_hits'])) $_CONFIG['cache_hits']++;
        }
         else
        {
@@ -321,7 +321,7 @@ function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false)
 }
 // Get version from extensions
 function GET_EXT_VERSION ($ext_name) {
-       global $EXTENSIONS, $CONFIG, $CACHE;
+       global $EXTENSIONS, $_CONFIG, $CACHE;
        $ret = false;
 
        // Extensions are all inactive during installation
@@ -333,7 +333,7 @@ function GET_EXT_VERSION ($ext_name) {
                $ret = $EXTENSIONS['ext_version'][$ext_name];
 
                // Count cache hits
-               if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; else $CONFIG['cache_hits'] = 1;
+               if (isset($_CONFIG['cache_hits'])) $_CONFIG['cache_hits']++; else $_CONFIG['cache_hits'] = 1;
        } elseif (!is_object($CACHE)) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
@@ -350,7 +350,7 @@ function GET_EXT_VERSION ($ext_name) {
 function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
 {
        // This shall never do a non-admin user!
-       global $CACHE, $CONFIG, $NOTES; $SQLs = array();
+       global $CACHE, $_CONFIG, $NOTES; $SQLs = array();
        if ((!IS_ADMIN()) || (empty($ext))) return false;
 
        // Load extension in update mode
@@ -382,7 +382,7 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
                        include(PATH."inc/extensions/".$file);
 
                        // Add notes
-                       if ($CONFIG['verbose_sql'] == 'Y')
+                       if ($_CONFIG['verbose_sql'] == 'Y')
                        {
                                $EXT_VER = $EXT_VER_HISTORY[$idx];
                                if (!empty($UPDATE_NOTES))
@@ -464,11 +464,11 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false)
 //
 function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed="", $switch=false, $WIDTH="480")
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        $S = false; $SW = 2; $i = 1;
        $OUT = "";
-       if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == 'Y'))
+       if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y'))
        {
                $OUT  = "<DIV align=\"center\">
 <TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"".$WIDTH."\" align=\"center\"".$dashed.">
@@ -495,7 +495,7 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $
                }
        }
 
-       if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == 'Y'))
+       if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y'))
        {
                // No addional SQL commands to run
                $OUT .= "<TR>
@@ -516,14 +516,14 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $
 function GET_EXT_NAME($id)
 {
        $ret = "";
-       global $EXTENSIONS, $CONFIG;
+       global $EXTENSIONS, $_CONFIG;
        if (!empty($EXTENSIONS['ext_id'][$id]))
        {
                // Load from cache
                $ret = $EXTENSIONS['ext_id'][$id];
 
                // Count cache hits
-               $CONFIG['cache_hits']++;
+               $_CONFIG['cache_hits']++;
        }
         else
        {
@@ -539,14 +539,14 @@ function GET_EXT_NAME($id)
 function GET_EXT_ID($name)
 {
        $ret = "0";
-       global $EXTENSIONS, $CONFIG;
+       global $EXTENSIONS, $_CONFIG;
        if ((isset($EXTENSIONS['ext_id'])) && (is_array($EXTENSIONS['ext_id'])))
        {
                // Load from cache
                $ret = array_search($name, $EXTENSIONS['ext_id']);
 
                // Count cache hits
-               $CONFIG['cache_hits']++;
+               $_CONFIG['cache_hits']++;
        }
         else
        {
index d85309c..9aac290 100644 (file)
@@ -123,7 +123,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today
+       $_CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today
        unset($DUMMY);
        break;
 }
index ea4952d..d2ea552 100644 (file)
@@ -258,20 +258,20 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       // Transfer all to the $CONFIG array...
-       $CONFIG['ap_inactive']    = $DUMMY['autopurge_inactive'];    // Autopurge inactive accounts (yes/no)
-       $CONFIG['ap_unconfirmed'] = $DUMMY['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no)
-       $CONFIG['ap_tasks']       = $DUMMY['autopurge_tasks'];       // Autopurge out-dated tasks (yes/no)
-       $CONFIG['ap_in_mail']     = $DUMMY['ap_in_notify'];          // Send email to admin when purging inactive accounts (yes/no)
-       $CONFIG['ap_un_mail']     = $DUMMY['ap_un_notify'];          // Send email to admin when purging unconfirmed accounts (yes/no)
-       $CONFIG['ap_tasks_mail']  = $DUMMY['ap_tasks_notify'];       // Send email to admin when purging out-dated tasks (yes/no)
-       $CONFIG['ap_in_since']    = $DUMMY['ap_inactive_since'];     // Timeout for confirmed accounts when they become inactive (seconds)
-       $CONFIG['ap_in_time']     = $DUMMY['ap_inactive_time'];      // Timeout for inactive accounts when they are automatically deleted (seconds)
-       $CONFIG['ap_un_time']     = $DUMMY['ap_unconfirmed_time'];   // Timeout for unconfirmed accounts when they are automatically deleted (seconds)
-       $CONFIG['ap_tasks_time']  = $DUMMY['ap_tasks_time'];         // Timeout for out-dated tasks
-       $CONFIG['ap_del_mails']   = $DUMMY['ap_del_mails'];          // Autopurge mails from deleted users?
-       $CONFIG['ap_dm_notify']   = $DUMMY['ap_dm_notify'];          // Send email to admin when purging mails from deleted users (yes/no)
-       $CONFIG['ap_dm_timeout']  = $DUMMY['ap_dm_timeout'];         // Timeout for mails from deleted users
+       // Transfer all to the $_CONFIG array...
+       $_CONFIG['ap_inactive']    = $DUMMY['autopurge_inactive'];    // Autopurge inactive accounts (yes/no)
+       $_CONFIG['ap_unconfirmed'] = $DUMMY['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no)
+       $_CONFIG['ap_tasks']       = $DUMMY['autopurge_tasks'];       // Autopurge out-dated tasks (yes/no)
+       $_CONFIG['ap_in_mail']     = $DUMMY['ap_in_notify'];          // Send email to admin when purging inactive accounts (yes/no)
+       $_CONFIG['ap_un_mail']     = $DUMMY['ap_un_notify'];          // Send email to admin when purging unconfirmed accounts (yes/no)
+       $_CONFIG['ap_tasks_mail']  = $DUMMY['ap_tasks_notify'];       // Send email to admin when purging out-dated tasks (yes/no)
+       $_CONFIG['ap_in_since']    = $DUMMY['ap_inactive_since'];     // Timeout for confirmed accounts when they become inactive (seconds)
+       $_CONFIG['ap_in_time']     = $DUMMY['ap_inactive_time'];      // Timeout for inactive accounts when they are automatically deleted (seconds)
+       $_CONFIG['ap_un_time']     = $DUMMY['ap_unconfirmed_time'];   // Timeout for unconfirmed accounts when they are automatically deleted (seconds)
+       $_CONFIG['ap_tasks_time']  = $DUMMY['ap_tasks_time'];         // Timeout for out-dated tasks
+       $_CONFIG['ap_del_mails']   = $DUMMY['ap_del_mails'];          // Autopurge mails from deleted users?
+       $_CONFIG['ap_dm_notify']   = $DUMMY['ap_dm_notify'];          // Send email to admin when purging mails from deleted users (yes/no)
+       $_CONFIG['ap_dm_timeout']  = $DUMMY['ap_dm_timeout'];         // Timeout for mails from deleted users
 
        // Save some RAM...
        unset($DUMMY);
index cc1763b..2da0c3f 100644 (file)
@@ -260,34 +260,34 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['beg_timeout']        = $DUMMY['beg_timeout'];        // Global timeout
-       $CONFIG['beg_uid_timeout']    = $DUMMY['beg_uid_timeout'];    // Timeout for one userid
-       $CONFIG['beg_ip_timeout']     = $DUMMY['beg_ip_timeout'];     // Timeout for one IP number
-       $CONFIG['beg_points']         = $DUMMY['beg_points'];         // Minimum beggable points
-       $CONFIG['beg_points_max']     = $DUMMY['beg_points_max'];     // Maximum beggable points
-       $CONFIG['beg_uid']            = $DUMMY['beg_uid'];            // Account to subtract begged points from
-       $CONFIG['beg_mode']           = $DUMMY['beg_mode'];           // Payment mode: direct or over referral system?
-       $CONFIG['beg_month']          = $DUMMY['beg_month'];          // Current month
-       $CONFIG['beg_ranks']          = $DUMMY['beg_ranks'];          // Maximum member who will win
-       $CONFIG['beg_active']         = $DUMMY['beg_active'];         // Only active members can win?
-       $CONFIG['beg_rallye']         = $DUMMY['beg_rallye'];         // Is the begging rallye activated?
-       $CONFIG['beg_ral_en_notify']  = $DUMMY['beg_ral_en_notify'];  // Notify members on enabled rallye?
-       $CONFIG['beg_ral_di_notify']  = $DUMMY['beg_ral_di_notify'];  // Notify members on disabled rallye?
-       $CONFIG['beg_notify_bonus']   = $DUMMY['beg_notify_bonus'];   // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification!
-       $CONFIG['beg_new_mem_notify'] = $DUMMY['beg_new_mem_notify']; // Notify members on disabled rallye?
-       $CONFIG['beg_notify_wait']    = $DUMMY['beg_notify_wait'];    // Time to wait in seconds for bonus mails
-       $CONFIG['beg_include_own']    = $DUMMY['beg_include_own'];    // Include webmaster's own userid in rallye?
+       $_CONFIG['beg_timeout']        = $DUMMY['beg_timeout'];        // Global timeout
+       $_CONFIG['beg_uid_timeout']    = $DUMMY['beg_uid_timeout'];    // Timeout for one userid
+       $_CONFIG['beg_ip_timeout']     = $DUMMY['beg_ip_timeout'];     // Timeout for one IP number
+       $_CONFIG['beg_points']         = $DUMMY['beg_points'];         // Minimum beggable points
+       $_CONFIG['beg_points_max']     = $DUMMY['beg_points_max'];     // Maximum beggable points
+       $_CONFIG['beg_uid']            = $DUMMY['beg_uid'];            // Account to subtract begged points from
+       $_CONFIG['beg_mode']           = $DUMMY['beg_mode'];           // Payment mode: direct or over referral system?
+       $_CONFIG['beg_month']          = $DUMMY['beg_month'];          // Current month
+       $_CONFIG['beg_ranks']          = $DUMMY['beg_ranks'];          // Maximum member who will win
+       $_CONFIG['beg_active']         = $DUMMY['beg_active'];         // Only active members can win?
+       $_CONFIG['beg_rallye']         = $DUMMY['beg_rallye'];         // Is the begging rallye activated?
+       $_CONFIG['beg_ral_en_notify']  = $DUMMY['beg_ral_en_notify'];  // Notify members on enabled rallye?
+       $_CONFIG['beg_ral_di_notify']  = $DUMMY['beg_ral_di_notify'];  // Notify members on disabled rallye?
+       $_CONFIG['beg_notify_bonus']   = $DUMMY['beg_notify_bonus'];   // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification!
+       $_CONFIG['beg_new_mem_notify'] = $DUMMY['beg_new_mem_notify']; // Notify members on disabled rallye?
+       $_CONFIG['beg_notify_wait']    = $DUMMY['beg_notify_wait'];    // Time to wait in seconds for bonus mails
+       $_CONFIG['beg_include_own']    = $DUMMY['beg_include_own'];    // Include webmaster's own userid in rallye?
        unset($DUMMY);
 
        // Remove old entries
-       $OLD = $CONFIG['beg_timeout'];
-       if ($CONFIG['beg_uid_timeout'] > $OLD) $OLD = $CONFIG['beg_uid_timeout'];
+       $OLD = $_CONFIG['beg_timeout'];
+       if ($_CONFIG['beg_uid_timeout'] > $OLD) $OLD = $_CONFIG['beg_uid_timeout'];
        $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_beg_ips WHERE timeout < ".(time() - $OLD - 60*60), __FILE__, __LINE__);
 
        if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
        {
                // Daily reset was run so let's check if begging rallye is active
-               if ($CONFIG['beg_rallye'] == 'Y')
+               if ($_CONFIG['beg_rallye'] == 'Y')
                {
                        // Check for our winers
                        $INC_POOL[] = PATH."inc/monthly/monthly_beg.php";
@@ -300,7 +300,7 @@ default: // Do stuff when extension is loaded
        }
 
        // Check for beg rallye is active and send mails out
-       if (($CONFIG['beg_rallye'] == 'Y') && ($CONFIG['beg_new_mem_notify'] == 'Y'))
+       if (($_CONFIG['beg_rallye'] == 'Y') && ($_CONFIG['beg_new_mem_notify'] == 'Y'))
        {
                // Include file for sending out mails
                $INC_POOL[] = PATH."inc/mails/beg_mails.php";
index 42cf1e4..b28aab7 100644 (file)
@@ -186,14 +186,14 @@ default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
 
        // Copy config to main array
-       $CONFIG['birthday_points'] = $DUMMY['birthday_points'];
-       $CONFIG['birthday_mode']   = $DUMMY['birthday_mode'];
-       $CONFIG['birthday_active'] = $DUMMY['birthday_active'];
+       $_CONFIG['birthday_points'] = $DUMMY['birthday_points'];
+       $_CONFIG['birthday_mode']   = $DUMMY['birthday_mode'];
+       $_CONFIG['birthday_active'] = $DUMMY['birthday_active'];
 
        // Save some RAM...
        unset($DUMMY);
 
-       if ((defined('__DAILY_RESET')) && ($CONFIG['birthday_points'] > 0))
+       if ((defined('__DAILY_RESET')) && ($_CONFIG['birthday_points'] > 0))
        {
                // Daily reset was run and we shall pay points so we start checking for members who
                // has a birthday for today
index db04202..14f17fa 100644 (file)
@@ -541,40 +541,40 @@ WHERE last_online < ".$mark." ORDER BY userid";
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['login_bonus']          = $DUMMY['login_bonus'];          // Bonus points for successfull logins
-       $CONFIG['turbo_bonus']          = $DUMMY['turbo_bonus'];          // Bonus points for the fastest clicker, No. 1
-       $CONFIG['bonus_rates']          = $DUMMY['turbo_rates'];          // Points for clicker no. 2 to x
-       $CONFIG['bonus_ranks']          = $DUMMY['bonus_ranks'];          // Total ranks who can win
-       $CONFIG['login_timeout']        = $DUMMY['login_timeout'];        // Time in seconds between two logins
-       $CONFIG['bonus_month']          = $DUMMY['last_bonus_month'];     // Last month where click-bonus are "paid"
-       $CONFIG['bonus_mode']           = $DUMMY['bonus_mode'];           // Mode for adding points for login/click bonus
-       $CONFIG['bonus_uid']            = $DUMMY['bonus_uid'];            // Member account to take points from
-       $CONFIG['bonus_lines']          = $DUMMY['bonus_lines'];          // Number of lines to display in show_bonus.php
-       $CONFIG['bonus_timeout']        = $DUMMY['bonus_timeout'];        // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo
-       $CONFIG['bonus_order']          = $DUMMY['bonus_order'];          // Bonus points for ordering mails
-       $CONFIG['bonus_ref']            = $DUMMY['bonus_ref'];            // Bonus points for "making" a referral
-       $CONFIG['bonus_stats']          = $DUMMY['bonus_stats'];          // Bonus points for 100% clickrate in mail stats
-       $CONFIG['bonus_active']         = $DUMMY['bonus_active'];         // De/activate bonus active rallye
-       $CONFIG['bonus_order_yn']       = $DUMMY['bonus_order_yn'];       // Include order bonus in analysis?
-       $CONFIG['bonus_ref_yn']         = $DUMMY['bonus_ref_yn'];         // Include referral bonus in analysis?
-       $CONFIG['bonus_stats_yn']       = $DUMMY['bonus_stats_yn'];       // Include statistics bonus in analysis?
-       $CONFIG['bonus_login_yn']       = $DUMMY['bonus_login_yn'];       // Include login bonus in analysis?
-       $CONFIG['bonus_click_yn']       = $DUMMY['bonus_click_yn'];       // Include "mailid" bonus in analysis?
-       $CONFIG['bonus_en_notify']      = $DUMMY['bonus_en_notify'];      // Notify members about enabled active rallye?
-       $CONFIG['bonus_di_notify']      = $DUMMY['bonus_di_notify'];      // Notify members about disabled active rallye?
-       $CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye?
-       $CONFIG['bonus_notify_points']  = $DUMMY['bonus_notify_points'];  // Bonus points for the enable-notification mail? 0 = disable!
-       $CONFIG['bonus_notify_wait']    = $DUMMY['bonus_notify_wait'];    // Time to wait in seconds for bonus mails
-       $CONFIG['bonus_include_own']    = $DUMMY['bonus_include_own'];    // Include webmaster's own userid in active rallye?
+       $_CONFIG['login_bonus']          = $DUMMY['login_bonus'];          // Bonus points for successfull logins
+       $_CONFIG['turbo_bonus']          = $DUMMY['turbo_bonus'];          // Bonus points for the fastest clicker, No. 1
+       $_CONFIG['bonus_rates']          = $DUMMY['turbo_rates'];          // Points for clicker no. 2 to x
+       $_CONFIG['bonus_ranks']          = $DUMMY['bonus_ranks'];          // Total ranks who can win
+       $_CONFIG['login_timeout']        = $DUMMY['login_timeout'];        // Time in seconds between two logins
+       $_CONFIG['bonus_month']          = $DUMMY['last_bonus_month'];     // Last month where click-bonus are "paid"
+       $_CONFIG['bonus_mode']           = $DUMMY['bonus_mode'];           // Mode for adding points for login/click bonus
+       $_CONFIG['bonus_uid']            = $DUMMY['bonus_uid'];            // Member account to take points from
+       $_CONFIG['bonus_lines']          = $DUMMY['bonus_lines'];          // Number of lines to display in show_bonus.php
+       $_CONFIG['bonus_timeout']        = $DUMMY['bonus_timeout'];        // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo
+       $_CONFIG['bonus_order']          = $DUMMY['bonus_order'];          // Bonus points for ordering mails
+       $_CONFIG['bonus_ref']            = $DUMMY['bonus_ref'];            // Bonus points for "making" a referral
+       $_CONFIG['bonus_stats']          = $DUMMY['bonus_stats'];          // Bonus points for 100% clickrate in mail stats
+       $_CONFIG['bonus_active']         = $DUMMY['bonus_active'];         // De/activate bonus active rallye
+       $_CONFIG['bonus_order_yn']       = $DUMMY['bonus_order_yn'];       // Include order bonus in analysis?
+       $_CONFIG['bonus_ref_yn']         = $DUMMY['bonus_ref_yn'];         // Include referral bonus in analysis?
+       $_CONFIG['bonus_stats_yn']       = $DUMMY['bonus_stats_yn'];       // Include statistics bonus in analysis?
+       $_CONFIG['bonus_login_yn']       = $DUMMY['bonus_login_yn'];       // Include login bonus in analysis?
+       $_CONFIG['bonus_click_yn']       = $DUMMY['bonus_click_yn'];       // Include "mailid" bonus in analysis?
+       $_CONFIG['bonus_en_notify']      = $DUMMY['bonus_en_notify'];      // Notify members about enabled active rallye?
+       $_CONFIG['bonus_di_notify']      = $DUMMY['bonus_di_notify'];      // Notify members about disabled active rallye?
+       $_CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye?
+       $_CONFIG['bonus_notify_points']  = $DUMMY['bonus_notify_points'];  // Bonus points for the enable-notification mail? 0 = disable!
+       $_CONFIG['bonus_notify_wait']    = $DUMMY['bonus_notify_wait'];    // Time to wait in seconds for bonus mails
+       $_CONFIG['bonus_include_own']    = $DUMMY['bonus_include_own'];    // Include webmaster's own userid in active rallye?
        unset($DUMMY);
 
        if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
        {
                // Daily reset was run so let's check if active rallye is activated
-               if ($CONFIG['bonus_active'] == 'Y')
+               if ($_CONFIG['bonus_active'] == 'Y')
                {
                        // Run active rallye
-                       if($CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php";
+                       if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php";
                        $INC_POOL[] = PATH."inc/monthly/monthly_bonus.php";
                }
                 else
@@ -585,7 +585,7 @@ default: // Do stuff when extension is loaded
        }
 
        // Check for bonus rallye is active and send mails out
-       if (($CONFIG['bonus_active'] == 'Y') && ($CONFIG['bonus_new_mem_notify'] == 'Y'))
+       if (($_CONFIG['bonus_active'] == 'Y') && ($_CONFIG['bonus_new_mem_notify'] == 'Y'))
        {
                // Include file for sending out mails
                $INC_POOL[] = PATH."inc/mails/bonus_mails.php";
index 7921f89..99d4cd4 100644 (file)
@@ -187,25 +187,25 @@ default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
 
        // Load config and destroy dummy array
-       $CONFIG['cache_update']   = $DUMMY['cache_update'];   // Last time the cache files are been re-created
-       $CONFIG['cache_path']     = $DUMMY['cache_path'];     // Relative path for the cache files to 'inc/'
-       $CONFIG['cache_tested']   = $DUMMY['cache_tested'];   // Says if cache path is tested or not
-       $CONFIG['db_hits']        = $DUMMY['db_hits'];        // Counted hits on the database (all!)
-       $CONFIG['cache_hits']     = $DUMMY['cache_hits'];     // Counted hits on the cache arrays in memory
-       $CONFIG['cache_admins']   = $DUMMY['cache_admins'];   // Is the table '_admins' cacheable?
-       $CONFIG['cache_acls']     = $DUMMY['cache_acls'];     // Is the table '_admins_acls' cacheable?
-       $CONFIG['cache_exts']     = $DUMMY['cache_exts'];     // Is the table '_extensions' cacheable?
-       $CONFIG['cache_config']   = $DUMMY['cache_config'];   // Is the table '_config' cacheable?
-       $CONFIG['cache_modreg']   = $DUMMY['cache_modreg'];   // Is the table '_mod_reg' cacheable?
-       $CONFIG['cache_refdepth'] = $DUMMY['cache_refdepth']; // Is the table '_refdepths' cacheable?
-       $CONFIG['cache_refsys']   = $DUMMY['cache_refsys'];   // Is the table '_refsystem' cacheable?
+       $_CONFIG['cache_update']   = $DUMMY['cache_update'];   // Last time the cache files are been re-created
+       $_CONFIG['cache_path']     = $DUMMY['cache_path'];     // Relative path for the cache files to 'inc/'
+       $_CONFIG['cache_tested']   = $DUMMY['cache_tested'];   // Says if cache path is tested or not
+       $_CONFIG['db_hits']        = $DUMMY['db_hits'];        // Counted hits on the database (all!)
+       $_CONFIG['cache_hits']     = $DUMMY['cache_hits'];     // Counted hits on the cache arrays in memory
+       $_CONFIG['cache_admins']   = $DUMMY['cache_admins'];   // Is the table '_admins' cacheable?
+       $_CONFIG['cache_acls']     = $DUMMY['cache_acls'];     // Is the table '_admins_acls' cacheable?
+       $_CONFIG['cache_exts']     = $DUMMY['cache_exts'];     // Is the table '_extensions' cacheable?
+       $_CONFIG['cache_config']   = $DUMMY['cache_config'];   // Is the table '_config' cacheable?
+       $_CONFIG['cache_modreg']   = $DUMMY['cache_modreg'];   // Is the table '_mod_reg' cacheable?
+       $_CONFIG['cache_refdepth'] = $DUMMY['cache_refdepth']; // Is the table '_refdepths' cacheable?
+       $_CONFIG['cache_refsys']   = $DUMMY['cache_refsys'];   // Is the table '_refsystem' cacheable?
        unset($DUMMY);
 
        // Create instance on class
        if ($CACHE_FILE != "init")
        {
                // Initialize cache system only when it's needed
-               $CACHE = new mxchange_cache($CONFIG['cache_update'], PATH."inc/".$CONFIG['cache_path'], $CONFIG['cache_tested']);
+               $CACHE = new mxchange_cache($_CONFIG['cache_update'], PATH."inc/".$_CONFIG['cache_path'], $_CONFIG['cache_tested']);
                if ($CACHE->ret != "done")
                {
                        // Failed to initialize cache sustem
index 6cb45a1..58402cb 100644 (file)
@@ -240,28 +240,28 @@ WHERE d.completed='N'";
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['doubler_charge']      = $DUMMY['doubler_charge'];
-       $CONFIG['doubler_jackpot']     = $DUMMY['doubler_jackpot'];
-       $CONFIG['doubler_own']         = $DUMMY['doubler_own'];
-       $CONFIG['doubler_uid']         = $DUMMY['doubler_uid'];
-       $CONFIG['doubler_points']      = $DUMMY['doubler_points'];
-       $CONFIG['doubler_used']        = $DUMMY['doubler_used'];
-       $CONFIG['doubler_send_mode']   = $DUMMY['doubler_send_mode'];
-       $CONFIG['doubler_timeout']     = $DUMMY['doubler_timeout'];
-       $CONFIG['doubler_display_new'] = $DUMMY['doubler_display_new'];
-       $CONFIG['doubler_display_pay'] = $DUMMY['doubler_display_pay'];
-       $CONFIG['doubler_display_old'] = $DUMMY['doubler_display_old'];
-       $CONFIG['doubler_ref']         = $DUMMY['doubler_ref'];
-       $CONFIG['doubler_min']         = $DUMMY['doubler_min'];
-       $CONFIG['doubler_max']         = $DUMMY['doubler_max'];
-       $CONFIG['doubler_left']        = $DUMMY['doubler_left'];
-       $CONFIG['doubler_counter']     = $DUMMY['doubler_counter'];
-       $CONFIG['doubler_max_sent']    = $DUMMY['doubler_max_sent'];
-       $CONFIG['doubler_group_sent']  = $DUMMY['doubler_group_sent'];
-       $CONFIG['doubler_sent_all']    = $DUMMY['doubler_sent_all'];
+       $_CONFIG['doubler_charge']      = $DUMMY['doubler_charge'];
+       $_CONFIG['doubler_jackpot']     = $DUMMY['doubler_jackpot'];
+       $_CONFIG['doubler_own']         = $DUMMY['doubler_own'];
+       $_CONFIG['doubler_uid']         = $DUMMY['doubler_uid'];
+       $_CONFIG['doubler_points']      = $DUMMY['doubler_points'];
+       $_CONFIG['doubler_used']        = $DUMMY['doubler_used'];
+       $_CONFIG['doubler_send_mode']   = $DUMMY['doubler_send_mode'];
+       $_CONFIG['doubler_timeout']     = $DUMMY['doubler_timeout'];
+       $_CONFIG['doubler_display_new'] = $DUMMY['doubler_display_new'];
+       $_CONFIG['doubler_display_pay'] = $DUMMY['doubler_display_pay'];
+       $_CONFIG['doubler_display_old'] = $DUMMY['doubler_display_old'];
+       $_CONFIG['doubler_ref']         = $DUMMY['doubler_ref'];
+       $_CONFIG['doubler_min']         = $DUMMY['doubler_min'];
+       $_CONFIG['doubler_max']         = $DUMMY['doubler_max'];
+       $_CONFIG['doubler_left']        = $DUMMY['doubler_left'];
+       $_CONFIG['doubler_counter']     = $DUMMY['doubler_counter'];
+       $_CONFIG['doubler_max_sent']    = $DUMMY['doubler_max_sent'];
+       $_CONFIG['doubler_group_sent']  = $DUMMY['doubler_group_sent'];
+       $_CONFIG['doubler_sent_all']    = $DUMMY['doubler_sent_all'];
        unset($DUMMY);
 
-       if ((defined('__DAILY_RESET')) && ($CONFIG['doubler_send_mode'] == "RESET"))
+       if ((defined('__DAILY_RESET')) && ($_CONFIG['doubler_send_mode'] == "RESET"))
        {
                // So let's check for points
                $INC_POOL[] = PATH."inc/doubler_send.php";
index 12b1483..121d196 100644 (file)
@@ -226,13 +226,13 @@ case "update": // Update an extension
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
        // Copy data to config array
-       $CONFIG['holiday_max']  = $DUMMY['holiday_max'];  // Maximum days for holiday
-       $CONFIG['holiday_lock'] = $DUMMY['holiday_lock']; // Lock deactivation in member area for X seconds
-       $CONFIG['holiday_mode'] = $DUMMY['holiday_mode']; // Mode for activating holiday
+       $_CONFIG['holiday_max']  = $DUMMY['holiday_max'];  // Maximum days for holiday
+       $_CONFIG['holiday_lock'] = $DUMMY['holiday_lock']; // Lock deactivation in member area for X seconds
+       $_CONFIG['holiday_mode'] = $DUMMY['holiday_mode']; // Mode for activating holiday
        unset($DUMMY);
 
        // Do we have a daily-reset-run?
-       if (((defined('__DAILY_RESET')) && ($CONFIG['holiday_mode'] == "RESET")) || ($CONFIG['holiday_mode'] == "DIRECT"))
+       if (((defined('__DAILY_RESET')) && ($_CONFIG['holiday_mode'] == "RESET")) || ($_CONFIG['holiday_mode'] == "DIRECT"))
        {
                // Ok, let's check for finished holidays and unlock those accounts
                $INC_POOL[] = PATH."inc/reset/reset_holiday.php";
index defda69..0640332 100644 (file)
@@ -111,7 +111,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['maintenance'] = $DUMMY['maintenance'];
+       $_CONFIG['maintenance'] = $DUMMY['maintenance'];
        unset($DUMMY);
        break;
 }
index f8fa3e0..0ba2e0c 100644 (file)
@@ -130,8 +130,8 @@ Bitte stellen Sie diesen derzeit manuell unter <A href=\"".URL."/modules.php?mod
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['mt_start'] = $DUMMY['mt_start'];
-       $CONFIG['mt_stage'] = $DUMMY['mt_stage'];
+       $_CONFIG['mt_start'] = $DUMMY['mt_start'];
+       $_CONFIG['mt_stage'] = $DUMMY['mt_stage'];
        unset($DUMMY);
        break;
 }
index 16d6b25..60b6942 100644 (file)
@@ -151,8 +151,8 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['nl_charge']   = $DUMMY['nl_charge'];   // Charge for your members to switch off the newsletter
-       $CONFIG['nl_month']    = $DUMMY['nl_month'];    // Last month of check interval
+       $_CONFIG['nl_charge']   = $DUMMY['nl_charge'];   // Charge for your members to switch off the newsletter
+       $_CONFIG['nl_month']    = $DUMMY['nl_month'];    // Last month of check interval
        unset($DUMMY);
 
        // URL ends which are used to indentify the end of an URL or email link
index 85fc69e..9efb4e9 100644 (file)
@@ -290,10 +290,10 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['order_min']    = $DUMMY['order_min'];      // Order at least X mails
-       $CONFIG['order_max']    = $DUMMY['order_max_full']; // Ordering mode: as much as possible or as much as the user want's to receive
-       $CONFIG['order_select'] = $DUMMY['order_select'];   // Sorting mode for selecting users while looking some up for mail delivery
-       $CONFIG['order_mode']   = $DUMMY['order_mode'];     // Ascending or descending sort order for above
+       $_CONFIG['order_min']    = $DUMMY['order_min'];      // Order at least X mails
+       $_CONFIG['order_max']    = $DUMMY['order_max_full']; // Ordering mode: as much as possible or as much as the user want's to receive
+       $_CONFIG['order_select'] = $DUMMY['order_select'];   // Sorting mode for selecting users while looking some up for mail delivery
+       $_CONFIG['order_mode']   = $DUMMY['order_mode'];     // Ascending or descending sort order for above
        unset($DUMMY);
 
        // Do daily reset only when installed and extension version is at least 0.1.1
index ed46bc7..c3b1848 100644 (file)
@@ -179,8 +179,8 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['max_comma']  = $DUMMY['max_comma'];  // Maximum numbers behind commata
-       $CONFIG['reject_url'] = $DUMMY['reject_url']; // Default rejection URL
+       $_CONFIG['max_comma']  = $DUMMY['max_comma'];  // Maximum numbers behind commata
+       $_CONFIG['reject_url'] = $DUMMY['reject_url']; // Default rejection URL
        define('__CURRENCY', $DUMMY['currency']);     // This is the currency for fees! They shall normally remain in real money currencies...
        unset($DUMMY);
        break;
index 060a8d7..25efaa1 100644 (file)
@@ -325,7 +325,7 @@ PRIMARY KEY(id)
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
        // Copy data to config array
-       $CONFIG['register_default'] = $DUMMY['register_default']; // Is Yes/No the default selection in category selection?
+       $_CONFIG['register_default'] = $DUMMY['register_default']; // Is Yes/No the default selection in category selection?
        unset($DUMMY);
        break;
 }
index da08ee9..1af60af 100644 (file)
@@ -137,7 +137,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['rewrite_skipped_mods'] = $DUMMY['rewrite_skip'];
+       $_CONFIG['rewrite_skipped_mods'] = $DUMMY['rewrite_skip'];
        unset($DUMMY);
        break;
 }
index c2c69b4..3000330 100644 (file)
@@ -529,42 +529,42 @@ default: // Do stuff when extension is loaded
 
        // When the sql_patches is not installed we cannot load it's configuration... *sigh*
        if (GET_EXT_VERSION("sql_patches") != "") {
-               $CONFIG['ext_autopurge']     = $DUMMY['ext_autopurge'];
-               $CONFIG['mails_page']        = $DUMMY['mails_page'];
-               $CONFIG['index_home']        = $DUMMY['index_home'];
-               $CONFIG['verbose_sql']       = $DUMMY['verbose_sql'];
-               $CONFIG['middot']            = $DUMMY['menu_blur_spacer'];
-               $CONFIG['reg_points_mode']   = $DUMMY['reg_points_mode'];
-               $CONFIG['index_delay']       = $DUMMY['index_delay'];
-               $CONFIG['index_cookie']      = $DUMMY['index_cookie'];
-               $CONFIG['def_refid']         = $DUMMY['def_refid'];
-               $CONFIG['refid_target']      = $DUMMY['refid_target'];
-               $CONFIG['default_theme']     = $DUMMY['default_theme'];
-               $CONFIG['title_decoration']  = $DUMMY['enable_title_deco'];
-               $CONFIG['title_mod_show']    = $DUMMY['enable_mod_title'];
-               $CONFIG['title_what_show']   = $DUMMY['enable_what_title'];
-               $CONFIG['title_left']        = $DUMMY['title_left'];
-               $CONFIG['title_middle']      = $DUMMY['title_middle'];
-               $CONFIG['title_right']       = $DUMMY['title_right'];
-               $CONFIG['mad_counter']       = $DUMMY['mad_count'];
-               $CONFIG['last_mad']          = $DUMMY['mad_timestamp'];
-               $CONFIG['css_php']           = $DUMMY['css_php'];
-               $CONFIG['guest_menu']        = $DUMMY['guest_menu'];
-               $CONFIG['member_menu']       = $DUMMY['member_menu'];
-               $CONFIG['youre_here']        = $DUMMY['youre_here'];
-               $CONFIG['img_type']          = $DUMMY['img_type'];
-               $CONFIG['stats_limit']       = $DUMMY['stats_limit'];
-               $CONFIG['admin_menu']        = $DUMMY['admin_menu'];
-               $CONFIG['admin_menu_sorter'] = $DUMMY['admin_menu_sorter'];
-               $CONFIG['salt_length']       = $DUMMY['salt_length'];
-               $CONFIG['pass_scramble']     = trim($DUMMY['pass_scramble']);
-               $CONFIG['file_hash']         = trim($DUMMY['file_hash']);
-               $CONFIG['master_salt']       = trim($DUMMY['master_salt']);
-               $CONFIG['secret_key']        = "";
-               $CONFIG['show_timings']      = $DUMMY['show_timings'];
+               $_CONFIG['ext_autopurge']     = $DUMMY['ext_autopurge'];
+               $_CONFIG['mails_page']        = $DUMMY['mails_page'];
+               $_CONFIG['index_home']        = $DUMMY['index_home'];
+               $_CONFIG['verbose_sql']       = $DUMMY['verbose_sql'];
+               $_CONFIG['middot']            = $DUMMY['menu_blur_spacer'];
+               $_CONFIG['reg_points_mode']   = $DUMMY['reg_points_mode'];
+               $_CONFIG['index_delay']       = $DUMMY['index_delay'];
+               $_CONFIG['index_cookie']      = $DUMMY['index_cookie'];
+               $_CONFIG['def_refid']         = $DUMMY['def_refid'];
+               $_CONFIG['refid_target']      = $DUMMY['refid_target'];
+               $_CONFIG['default_theme']     = $DUMMY['default_theme'];
+               $_CONFIG['title_decoration']  = $DUMMY['enable_title_deco'];
+               $_CONFIG['title_mod_show']    = $DUMMY['enable_mod_title'];
+               $_CONFIG['title_what_show']   = $DUMMY['enable_what_title'];
+               $_CONFIG['title_left']        = $DUMMY['title_left'];
+               $_CONFIG['title_middle']      = $DUMMY['title_middle'];
+               $_CONFIG['title_right']       = $DUMMY['title_right'];
+               $_CONFIG['mad_counter']       = $DUMMY['mad_count'];
+               $_CONFIG['last_mad']          = $DUMMY['mad_timestamp'];
+               $_CONFIG['css_php']           = $DUMMY['css_php'];
+               $_CONFIG['guest_menu']        = $DUMMY['guest_menu'];
+               $_CONFIG['member_menu']       = $DUMMY['member_menu'];
+               $_CONFIG['youre_here']        = $DUMMY['youre_here'];
+               $_CONFIG['img_type']          = $DUMMY['img_type'];
+               $_CONFIG['stats_limit']       = $DUMMY['stats_limit'];
+               $_CONFIG['admin_menu']        = $DUMMY['admin_menu'];
+               $_CONFIG['admin_menu_sorter'] = $DUMMY['admin_menu_sorter'];
+               $_CONFIG['salt_length']       = $DUMMY['salt_length'];
+               $_CONFIG['pass_scramble']     = trim($DUMMY['pass_scramble']);
+               $_CONFIG['file_hash']         = trim($DUMMY['file_hash']);
+               $_CONFIG['master_salt']       = trim($DUMMY['master_salt']);
+               $_CONFIG['secret_key']        = "";
+               $_CONFIG['show_timings']      = $DUMMY['show_timings'];
 
                // Read key from secret file
-               if ((empty($CONFIG['file_hash'])) || (empty($CONFIG['master_salt'])) || (empty($CONFIG['pass_scramble'])))
+               if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble'])))
                {
                        // Maybe need setup of secret key!
                        require_once(PATH."inc/gen_sql_patches.php");
@@ -580,12 +580,12 @@ default: // Do stuff when extension is loaded
                }
 
                // Test again
-               if ((!empty($CONFIG['file_hash'])) && (!empty($CONFIG['master_salt'])) && (!empty($CONFIG['pass_scramble'])))
+               if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble'])))
                {
                        // File hash fas generated so we can also file the secret file... hopefully.
-                       if ((file_exists(PATH."inc/.secret/.".$CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$CONFIG['file_hash'])))
+                       if ((file_exists(PATH."inc/.secret/.".$_CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$_CONFIG['file_hash'])))
                        {
-                               $CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$CONFIG['file_hash']));
+                               $_CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$_CONFIG['file_hash']));
                        }
                         else
                        {
@@ -602,11 +602,11 @@ default: // Do stuff when extension is loaded
                define('_MAX'    , $DUMMY['rand_no']);
        } else {
                // Set some lame ;-) default settings
-               $CONFIG['def_refid'] = 0;
-               $CONFIG['title_decoration'] = 'N';
-               $CONFIG['title_mod_show']   = 'Y';
-               $CONFIG['title_middle']     = "-";
-               //$CONFIG['verbose_sql']      = 'N';
+               $_CONFIG['def_refid'] = 0;
+               $_CONFIG['title_decoration'] = 'N';
+               $_CONFIG['title_mod_show']   = 'Y';
+               $_CONFIG['title_middle']     = "-";
+               //$_CONFIG['verbose_sql']      = 'N';
                define('MT_WORD' , DEFAULT_MT_WORD );
                define('MT_WORD2', DEFAULT_MT_WORD2);
                define('POINTS'  , DEFAULT_POINTS);
index 4264841..4c01f92 100644 (file)
@@ -143,7 +143,7 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['top10_max'] = $DUMMY['top10_max'];
+       $_CONFIG['top10_max'] = $DUMMY['top10_max'];
        unset($DUMMY);
        break;
 }
index 3f7e073..9f8f073 100644 (file)
@@ -285,23 +285,23 @@ case "update": // Update an extension
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
        // Maximum of listed transfers for out- and in-transfers
-       $CONFIG['transfer_max']     = $DUMMY['transfer_max'];
+       $_CONFIG['transfer_max']     = $DUMMY['transfer_max'];
        // Age in seconds
-       $CONFIG['transfer_age']     = $DUMMY['transfer_age'];
+       $_CONFIG['transfer_age']     = $DUMMY['transfer_age'];
        // Lock timeout for member settings
-       $CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout'];
+       $_CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout'];
        // Balance after points transfer
-       $CONFIG['transfer_balance'] = $DUMMY['transfer_balance'];
+       $_CONFIG['transfer_balance'] = $DUMMY['transfer_balance'];
        // Length of touring code
-       $CONFIG['transfer_code']    = $DUMMY['transfer_code'];
+       $_CONFIG['transfer_code']    = $DUMMY['transfer_code'];
        // Length of touring code
-       $CONFIG['ap_transfer']      = $DUMMY['ap_transfer'];
+       $_CONFIG['ap_transfer']      = $DUMMY['ap_transfer'];
        unset($DUMMY);
 
-       if ((defined('__DAILY_RESET')) && ($CONFIG['ap_transfer'] == 'Y'))
+       if ((defined('__DAILY_RESET')) && ($_CONFIG['ap_transfer'] == 'Y'))
        {
                // Automatically remove outdated or not displayed transactions
-               TRANSFER_AUTPPURGE($CONFIG['transfer_max'], $CONFIG['transfer_age']);
+               TRANSFER_AUTPPURGE($_CONFIG['transfer_max'], $_CONFIG['transfer_age']);
        }
        break;
 }
index 6ef846c..54cfda5 100644 (file)
@@ -215,8 +215,8 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['user_limit'] = $DUMMY['user_limit'];
-       $CONFIG['user_alpha'] = $DUMMY['user_alpha'];
+       $_CONFIG['user_limit'] = $DUMMY['user_limit'];
+       $_CONFIG['user_alpha'] = $DUMMY['user_alpha'];
        unset($DUMMY);
        break;
 }
index e8cb4a1..e33f6ec 100644 (file)
@@ -66,6 +66,8 @@ PRIMARY KEY(id)
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id bigint(20) not null default '0'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 varchar(32) not null default ''";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url varchar(255) not null default 'http://www.wds66.com/api/'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_refid varchar(6) not null default ''";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD wernis_userid varchar(6) not null default ''";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', '', '{!POINTS!}-Management', 'Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'config_wernis', 'WDS66-API-Einstellungen', 'Konfiguration zur WDS66-API einstellen.', 1)";
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'list_wernis', '{!POINTS!}-Anfragen auflisten', 'Listet alle {!POINTS!}-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
@@ -101,10 +103,11 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $CONFIG['wernis_min_amount'] = $DUMMY['wernis_min_amount'];
-       $CONFIG['wernis_api_id']     = $DUMMY['wernis_api_id'];
-       $CONFIG['wernis_api_md5']    = $DUMMY['wernis_api_md5'];
-       $CONFIG['wernis_api_url']    = $DUMMY['wernis_api_url'];
+       $_CONFIG['wernis_min_amount'] = $DUMMY['wernis_min_amount'];
+       $_CONFIG['wernis_api_id']     = $DUMMY['wernis_api_id'];
+       $_CONFIG['wernis_api_md5']    = $DUMMY['wernis_api_md5'];
+       $_CONFIG['wernis_api_url']    = $DUMMY['wernis_api_url'];
+       $_CONFIG['wernis_refid']      = $DUMMY['wernis_refid'];
        unset($DUMMY);
        break;
 }
index 390d446..5f520f2 100644 (file)
@@ -53,7 +53,7 @@ if (($footer != "1") && ($footer != "2") && ($CSS != "1")) {
        }
 
        // Shall we display the parsing time and number of queries?
-       if ((isset($CONFIG['show_timings'])) && ($CONFIG['show_timings'] == "Y")) {
+       if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == "Y")) {
                // Then display it here
                DISPLAY_PARSING_TIME_FOOTER();
        }
index 62c7b75..4fcb932 100644 (file)
@@ -101,7 +101,7 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
                        // That's why you don't need any \n at the end of your HTML code... :-)
                        if (_OB_CACHING == "on") {
                                // Output into PHP's internal buffer
-                               echo $HTML;
+                               OUTPUT_RAW($HTML);
 
                                // That's why you don't need any \n at the end of your HTML code... :-)
                                if ($NEW_LINE) echo "\n";
@@ -116,10 +116,10 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
 
                case "direct":
                        // If we are switching from render to direct output rendered code
-                       if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { echo $OUTPUT; $OUTPUT = ""; }
+                       if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ""; }
 
                        // The same as above... ^
-                       echo $HTML;
+                       OUTPUT_RAW($HTML);
                        if ($NEW_LINE) echo "\n";
                        break;
 
@@ -146,8 +146,7 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
                }
 
                // Output code here, DO NOT REMOVE! ;-)
-               echo $OUTPUT;
-               flush();
+               OUTPUT_RAW($OUTPUT);
        } elseif ((OUTPUT_MODE == "render") && (!empty($OUTPUT))) {
                // Rewrite links when rewrite extension is active
                if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
@@ -161,11 +160,24 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
                }
 
                // Output code here, DO NOT REMOVE! ;-)
-               echo $OUTPUT;
-               flush();
+               OUTPUT_RAW($OUTPUT);
        }
 }
 
+// Output the raw HTML code
+function OUTPUT_RAW ($HTML) {
+       if ((mxchange_installed) && (basename($_SERVER['PHP_SELF']) != "install.php")) {
+               // Not in install-mode so strip slashes away
+               echo stripslashes($HTML);
+       } else {
+               // Output directly in install-mode
+               echo $HTML;
+       }
+
+       // Flush the output
+       flush();
+}
+
 // Add a fatal error message to the queue array
 function ADD_FATAL ($message, $extra="")
 {
@@ -182,11 +194,11 @@ function ADD_FATAL ($message, $extra="")
 // Load a template file and return it's content (only it's name; do not use ' or ")
 function LOAD_TEMPLATE($template, $return=false, $content="") {
        // Add more variables which you want to use in your template files
-       global $DATA, $CONFIG, $username;
+       global $DATA, $_CONFIG, $username;
 
        // Count the template load
-       if (!isset($CONFIG['num_templates'])) $CONFIG['num_templates'] = 0;
-       $CONFIG['num_templates']++;
+       if (!isset($_CONFIG['num_templates'])) $_CONFIG['num_templates'] = 0;
+       $_CONFIG['num_templates']++;
 
        // Init some data
        $ACTION = SQL_ESCAPE($GLOBALS['action']);
@@ -429,8 +441,8 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) {
 
 // Generate a password in a specified length or use default password length
 function GEN_PASS($LEN = 0) {
-       global $CONFIG;
-       if ($LEN == 0) $LEN = $CONFIG['pass_len'];
+       global $_CONFIG;
+       if ($LEN == 0) $LEN = $_CONFIG['pass_len'];
 
        // Initialize array with all allowed chars
        $ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/");
@@ -491,10 +503,10 @@ function MAKE_DATETIME($time, $mode="0")
 // Translates the american decimal dot into a german comma
 function TRANSLATE_COMMA($dotted, $cut=true)
 {
-       global $CONFIG;
+       global $_CONFIG;
        // Default is 3 you can change this in admin area "Misc -> Misc Options"
-       if (empty($CONFIG['max_comma'])) $CONFIG['max_comma'] = "3";
-       if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $CONFIG['max_comma']);
+       if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3";
+       if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $_CONFIG['max_comma']);
        if ($cut) {
                // Remove trailing zeros
                $dot = str_replace(".", "x", $dotted);
@@ -518,16 +530,16 @@ function TRANSLATE_COMMA($dotted, $cut=true)
                if ($pos > 0) {
                        if ($cut) {
                                // Cut x numbers behind comma
-                               $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1)));
+                               $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $_CONFIG['max_comma'] + 1)));
                        } else {
                                // Replace comma with dot
                                $dotted = str_replace(".", ",", $dotted);
                        }
                } elseif (!$cut) {
                        if (empty($pos)) {
-                               $dotted = "0,".str_repeat("0", $CONFIG['max_comma']);
+                               $dotted = "0,".str_repeat("0", $_CONFIG['max_comma']);
                        } else {
-                               $dotted .= ",".str_repeat("0", $CONFIG['max_comma']);
+                               $dotted .= ",".str_repeat("0", $_CONFIG['max_comma']);
                        }
                }
                break;
@@ -535,9 +547,9 @@ function TRANSLATE_COMMA($dotted, $cut=true)
        default:
                if (!$cut) {
                        if ($pos > 0) {
-                               $dotted = substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1));
+                               $dotted = substr($dotted, 0, ($pos + $_CONFIG['max_comma'] + 1));
                        } else {
-                               $dotted .= ".".str_repeat("0", $CONFIG['max_comma']);
+                               $dotted .= ".".str_repeat("0", $_CONFIG['max_comma']);
                        }
                }
                break;
@@ -664,13 +676,13 @@ function GET_LANGUAGE()
 //
 function SET_LANGUAGE($lang)
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Accept only first 2 chars!
        $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2);
 
        // Set cookie
-       @setcookie("mx_lang", $lang, (time() + $CONFIG['online_timeout']), COOKIE_PATH);
+       @setcookie("mx_lang", $lang, (time() + $_CONFIG['online_timeout']), COOKIE_PATH);
 
        // Set array
        $_COOKIE['mx_lang'] = $lang;
@@ -678,7 +690,7 @@ function SET_LANGUAGE($lang)
 //
 function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
 {
-       global $DATA, $CONFIG, $REPLACER;
+       global $DATA, $_CONFIG, $REPLACER;
 
        // Keept for backward-compatiblity (please replace these variables against our new {--CONST--} syntax!)
        $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER;
@@ -699,7 +711,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
        }
 
        // Expiration in a nice output format
-       if ($CONFIG['auto_purge'] == 0)
+       if ($_CONFIG['auto_purge'] == 0)
        {
                // Will never expire!
                $EXPIRATION = MAIL_WILL_NEVER_EXPIRE;
@@ -707,19 +719,19 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
         elseif (function_exists('CREATE_FANCY_TIME'))
        {
                // Create nice date string
-               $EXPIRATION = CREATE_FANCY_TIME($CONFIG['auto_purge']);
+               $EXPIRATION = CREATE_FANCY_TIME($_CONFIG['auto_purge']);
        }
         else
        {
                // Display days only
-               $EXPIRATION = round($CONFIG['auto_purge']/60/60/24)." "._DAYS;
+               $EXPIRATION = round($_CONFIG['auto_purge']/60/60/24)." "._DAYS;
        }
        switch ($template)
        {
        case "bonus-mail": // Load data for the bonus mail
                $BONUSID    = $DATA[0];
                $content    = $DATA[2];
-               $POINTS     = TRANSLATE_COMMA($DATA[4]);
+               $points     = TRANSLATE_COMMA($DATA[4]);
                $TIME       = $DATA[5];
                $TARGET_URL = $DATA[8];
                $CATEGORY   = GET_CATEGORY($DATA[9]);
@@ -734,7 +746,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
 
        case "order-admin":
        case "order-member":
-               $BLOCKS     = $CONFIG['max_send'];
+               $BLOCKS     = $_CONFIG['max_send'];
                $SUBJECT    = $DATA[0];
                $content    = $DATA[1];
                $PAYMENT    = GET_PAYMENT($DATA[3]);
@@ -756,13 +768,13 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
                break;
 
        case "confirm-member":
-               $POINTS     = $CONFIG['points_register'];
+               $points     = $_CONFIG['points_register'];
                break;
 
        case "confirm-referral":
                $PERCENT    = $DATA[0];
                $LEVEL      = $DATA[1];
-               $POINTS     = $DATA[2];
+               $points     = $DATA[2];
                $REFID      = $DATA[3];
                break;
 
@@ -771,7 +783,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
                $CATEGORY   = GET_CATEGORY($DATA[9]);
                $TIME       = GET_PAY_POINTS($DATA[5], "time");
                $TARGET_URL = $DATA[7];
-               $POINTS     = TRANSLATE_COMMA(GET_PAY_POINTS($DATA[5], "payment"));
+               $points     = TRANSLATE_COMMA(GET_PAY_POINTS($DATA[5], "payment"));
                // Warning! This ID has changed from 10 to 11!
                $MAILID     = $DATA[11];
 
@@ -791,11 +803,11 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0")
 
        case "back-admin":
        case "back-member":
-               $POINTS     = TRANSLATE_COMMA($DATA[10]);
+               $points     = TRANSLATE_COMMA($DATA[10]);
                break;
 
        case "add-points":
-               $POINTS = $_POST['points'];
+               $points = $_POST['points'];
                break;
 
        case "guest_request_confirm":
@@ -929,6 +941,12 @@ function MAKE_TIME($H, $M, $S, $stamp)
 }
 //
 function LOAD_URL($URL, $addUrlData=true) {
+       // Check if http(s):// is there
+       if ((substr($URL, 0, 7) != "http://") && (substr($URL, 0, 8) != "https://")) {
+               // Make all URLs full-qualified
+               $URL = URL."/".$URL;
+       }
+
        // Compile out URI codes
        $URL = COMPILE_CODE($URL);
 
@@ -1191,13 +1209,13 @@ function TRANSLATE_YESNO($yn)
 //
 function GEN_RANDOM_CODE($length, $code, $uid, $DATA="")
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Build server string
        $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php");
 
        // Build key string
-       $keys   = SITE_KEY.":".DATE_KEY.":".$CONFIG['secret_key'].":".$CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $CONFIG['patch_ctime']).":".$CONFIG['master_salt'];
+       $keys   = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $_CONFIG['patch_ctime']).":".$_CONFIG['master_salt'];
 
        // Build string from misc data
        $data   = $code.":".$uid.":".$DATA;
@@ -1214,13 +1232,13 @@ function GEN_RANDOM_CODE($length, $code, $uid, $DATA="")
        $a = $code + _ADD - 1;
 
        // Generate hash with master salt from modula of number with the prime number and other data
-       $saltedHash = generateHash(($a % _PRIME).":".$server.":".$keys.":".$data.":".date("d-m-Y (l-F-T)", time()).":".$a, $CONFIG['master_salt']);
+       $saltedHash = generateHash(($a % _PRIME).":".$server.":".$keys.":".$data.":".date("d-m-Y (l-F-T)", time()).":".$a, $_CONFIG['master_salt']);
 
        // Create number from hash
-       $rcode = hexdec(substr($saltedHash, strlen($CONFIG['master_salt']), 9)) / abs(_MAX - $a + sqrt(_ADD)) / pi();
+       $rcode = hexdec(substr($saltedHash, strlen($_CONFIG['master_salt']), 9)) / abs(_MAX - $a + sqrt(_ADD)) / pi();
 
        // At least 10 numbers shall be secure enought!
-       $len = $CONFIG['code_length'];
+       $len = $_CONFIG['code_length'];
        if ($len == 0) $len = 10;
 
        // Cut off requested counts of number
@@ -1238,8 +1256,8 @@ function bigintval($num)
 // Insert the code in $img_code into jpeg or PNG image
 function GENERATE_IMAGE($img_code, $header=true)
 {
-       global $CONFIG;
-       if ((strlen($img_code) > 6) || (empty($img_code)) || ($CONFIG['code_length'] == 0))
+       global $_CONFIG;
+       if ((strlen($img_code) > 6) || (empty($img_code)) || ($_CONFIG['code_length'] == 0))
        {
                // Stop execution of function here because of over-sized code length
                return;
@@ -1250,7 +1268,7 @@ function GENERATE_IMAGE($img_code, $header=true)
                return "<IMG src=\"".URL."/img.php?code=".$img_code."\">\n";
        }
 
-       switch ($CONFIG['img_type'])
+       switch ($_CONFIG['img_type'])
        {
        case "jpg":
                // Loads JPEG image
@@ -1290,10 +1308,10 @@ function GENERATE_IMAGE($img_code, $header=true)
        imagestring($image, 5, 14, 2, $img_code, $text_color);
 
        // Return to browser
-       header ("Content-Type: image/".$CONFIG['img_type']);
+       header ("Content-Type: image/".$_CONFIG['img_type']);
 
        // Output image with matching image factory
-       switch ($CONFIG['img_type'])
+       switch ($_CONFIG['img_type'])
        {
                case "jpg": imagejpeg($image); break;
                case "png": imagepng($image);  break;
@@ -1815,7 +1833,7 @@ function CREATE_EMAIL_LINK($email, $table="admins") {
 }
 // Generate a hash for extra-security for all passwords
 function generateHash($plainText, $salt = "") {
-       global $CONFIG, $_SERVER;
+       global $_CONFIG, $_SERVER;
 
        // Is the required extension "sql_patches" there?
        if ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == "")) {
@@ -1829,7 +1847,7 @@ function generateHash($plainText, $salt = "") {
                $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php");
 
                // Build key string
-               $keys   = SITE_KEY.":".DATE_KEY.":".$CONFIG['secret_key'].":".$CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $CONFIG['patch_ctime']).":".$CONFIG['master_salt'];
+               $keys   = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $_CONFIG['patch_ctime']).":".$_CONFIG['master_salt'];
 
                // Additional data
                $data = $plainText.":".uniqid(rand(), true).":".time();
@@ -1846,12 +1864,12 @@ function generateHash($plainText, $salt = "") {
                //* DEBUG: */ echo "Descrambled=".$sha1b." (".strlen($sha1b).")<br>";
 
                // Generate the password salt string
-               $salt = substr($sha1, 0, $CONFIG['salt_length']);
+               $salt = substr($sha1, 0, $_CONFIG['salt_length']);
                //* DEBUG: */ echo $salt." (".strlen($salt).")<br />";
        }
         else
        {
-               $salt = substr($salt, 0, $CONFIG['salt_length']);
+               $salt = substr($salt, 0, $_CONFIG['salt_length']);
        }
 
        // Return hash
@@ -1859,7 +1877,7 @@ function generateHash($plainText, $salt = "") {
 }
 //
 function scrambleString($str) {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Init
        $scrambled = "";
@@ -1870,7 +1888,7 @@ function scrambleString($str) {
                return $str;
        } elseif (strlen($str) == 40) {
                // From database
-               $scrambleNums = explode(":", $CONFIG['pass_scramble']);
+               $scrambleNums = explode(":", $_CONFIG['pass_scramble']);
        } else {
                // Generate new numbers
                $scrambleNums = explode(":", genScrambleString(strlen($str)));
@@ -1893,12 +1911,12 @@ function scrambleString($str) {
 //
 function descrambleString($str)
 {
-       global $CONFIG;
+       global $_CONFIG;
        // Scramble only 40 chars long strings
        if (strlen($str) != 40) return $str;
 
        // Load numbers from config
-       $scrambleNums = explode(":", $CONFIG['pass_scramble']);
+       $scrambleNums = explode(":", $_CONFIG['pass_scramble']);
 
        // Validate numbers
        if (count($scrambleNums) != 40) return $str;
@@ -1944,7 +1962,7 @@ function genScrambleString($len) {
 // normally be stored in cookies
 function ADD_URL_DATA($URL)
 {
-       global $_GET, $CONFIG;
+       global $_CONFIG;
        $ADD = "";
 
        // Determine URL binder
@@ -1956,9 +1974,9 @@ function ADD_URL_DATA($URL)
                if ((!empty($_GET['refid'])) && (strpos($URL, "refid=") == 0)) {
                        // Cookie found in URL
                        $ADD .= $BIND."refid=".bigintval($_GET['refid']);
-               } elseif ((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['def_refid'] > 0)) {
+               } elseif ((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['def_refid'] > 0)) {
                        // Not found! So let's set default here
-                       $ADD .= $BIND."refid=".$CONFIG['def_refid'];
+                       $ADD .= $BIND."refid=".$_CONFIG['def_refid'];
                }
 
                // Is there already added data? Then change the binder
@@ -1979,16 +1997,16 @@ function ADD_URL_DATA($URL)
 }
 //
 function generatePassString($passHash) {
-       global $CONFIG;
+       global $_CONFIG;
        $ret = "*FAILED*";
 
        // Is a secret key and master salt already initialized?
-       if ((!empty($CONFIG['secret_key'])) && (!empty($CONFIG['master_salt']))) {
+       if ((!empty($_CONFIG['secret_key'])) && (!empty($_CONFIG['master_salt']))) {
                // Only calculate when the secret key is generated
                $newHash = ""; $start = 9;
                for ($idx = 0; $idx < 10; $idx++) {
                        $part1 = hexdec(substr($passHash, $start, 4));
-                       $part2 = hexdec(substr($CONFIG['secret_key'], $start, 4));
+                       $part2 = hexdec(substr($_CONFIG['secret_key'], $start, 4));
                        $mod = dechex($idx);
                        if ($part1 > $part2) {
                                $mod = dechex(sqrt(($part1 - $part2) * _PRIME / pi()));
@@ -2002,7 +2020,7 @@ function generatePassString($passHash) {
                        $newHash .= $mod;
                }
                //* DEBUG: */ die($passHash."<br>".$newHash." (".strlen($newHash).")");
-               $ret = generateHash($newHash, $CONFIG['master_salt']);
+               $ret = generateHash($newHash, $_CONFIG['master_salt']);
        }
 
        // Return result
@@ -2037,7 +2055,7 @@ function mxchange_die ($msg) {
 
 // Display parsing time and number of SQL queries in footer
 function DISPLAY_PARSING_TIME_FOOTER() {
-       global $startTime, $CONFIG;
+       global $startTime, $_CONFIG;
        $endTime = microtime(true);
 
        // Is the timer started?
@@ -2056,8 +2074,8 @@ function DISPLAY_PARSING_TIME_FOOTER() {
        // Prepare output
        $content = array(
                'runtime'               => $runTime,
-               'numSQLs'               => ($CONFIG['sql_count'] + 1),
-               'numTemplates'  => ($CONFIG['num_templates'] + 1)
+               'numSQLs'               => ($_CONFIG['sql_count'] + 1),
+               'numTemplates'  => ($_CONFIG['num_templates'] + 1)
        );
 
        // Load the template
index 9a77b2d..e5584c7 100644 (file)
@@ -42,7 +42,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 if (GET_EXT_VERSION("sql_patches") < "0.3.6") return false;
 
 // Check if there is no scrambling string
-if (empty($CONFIG['pass_scramble']))
+if (empty($_CONFIG['pass_scramble']))
 {
         // Generate 40 chars long scramble string
         $scrambleString = genScrambleString(40);
@@ -52,12 +52,12 @@ if (empty($CONFIG['pass_scramble']))
          array($scrambleString), __FILE__, __LINE__);
 
         // Also remember it in config
-        $CONFIG['pass_scramble'] = $scrambleString;
+        $_CONFIG['pass_scramble'] = $scrambleString;
         unset($scrambleString);
 }
 
 // Check if there is no master salt string
-if (empty($CONFIG['master_salt']))
+if (empty($_CONFIG['master_salt']))
 {
         // Generate the master salt which is the first chars minus 40 chars of this random hash
         // We do an extra scrambling here...
@@ -68,11 +68,11 @@ if (empty($CONFIG['master_salt']))
          array($masterSalt), __FILE__, __LINE__);
 
         // Also remember it in config
-        $CONFIG['master_salt'] = $masterSalt;
+        $_CONFIG['master_salt'] = $masterSalt;
         unset($masterSalt);
 }
 
-if (empty($CONFIG['file_hash']))
+if (empty($_CONFIG['file_hash']))
 {
         // Create filename from hashed random string
         $file_hash = generateHash(GEN_PASS(rand(128, 256)));
@@ -116,8 +116,8 @@ if (empty($CONFIG['file_hash']))
                 }
 
                 // Also update configuration
-                $CONFIG['secret_key'] = $secretKey; unset($secretKey);
-                $CONFIG['file_hash']  = $file_hash; unset($file_hash);
+                $_CONFIG['secret_key'] = $secretKey; unset($secretKey);
+                $_CONFIG['file_hash']  = $file_hash; unset($file_hash);
         }
 }
 
index 422219d..cee6e09 100644 (file)
@@ -49,21 +49,21 @@ if (($header != "1") && ($header != "2")) {
                $TITLE = "";
 
                // Add title decorations? (left)
-               if ((count($CONFIG) > 1) && (is_resource($link)) && ($db) !== false) {
-                       if (($CONFIG['title_decoration'] == 'Y') && (trim(!empty($CONFIG['title_left'])))) $TITLE .= trim($CONFIG['title_left'])." ";
+               if ((count($_CONFIG) > 1) && (is_resource($link)) && ($db) !== false) {
+                       if (($_CONFIG['title_decoration'] == 'Y') && (trim(!empty($_CONFIG['title_left'])))) $TITLE .= trim($_CONFIG['title_left'])." ";
                        $TITLE .= MAIN_TITLE;
 
                        // Add title of module? (middle decoration will also be added!)
-                       if (($CONFIG['title_mod_show'] == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim($CONFIG['title_middle'])." ".ADD_MODULE_TITLE($GLOBALS['module']);
+                       if (($_CONFIG['title_mod_show'] == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".ADD_MODULE_TITLE($GLOBALS['module']);
 
                        // Add title from what file
                        $MODE = "";
                        if ($GLOBALS['module'] == "login") $MODE = "member";
                         elseif ($GLOBALS['module'] == "index") $MODE = "guest";
-                       if ((!empty($MODE)) && (isset($CONFIG['title_what_show'])) && ($CONFIG['title_what_show'] == 'Y')) $TITLE .= " ".trim($CONFIG['title_middle'])." ".GET_MOD_DESCR($MODE, $GLOBALS['what']);
+                       if ((!empty($MODE)) && (isset($_CONFIG['title_what_show'])) && ($_CONFIG['title_what_show'] == 'Y')) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".GET_MOD_DESCR($MODE, $GLOBALS['what']);
 
                        // Add title decorations? (right)
-                       if (($CONFIG['title_decoration'] == 'Y') && (!empty($CONFIG['title_right']))) $TITLE .= " ".trim($CONFIG['title_right']);
+                       if (($_CONFIG['title_decoration'] == 'Y') && (!empty($_CONFIG['title_right']))) $TITLE .= " ".trim($_CONFIG['title_right']);
 
                        // Remember title in constant for the template
                        define('__PAGE_TITLE', html_entity_decode($TITLE));
index 4790793..89f7bba 100644 (file)
@@ -45,7 +45,7 @@ $file = sprintf(PATH."inc/language/%s.php", $mx_lang);
 if (!file_exists($file))
 {
        // Switch to default (DO NOT CHANGE!!!)
-       @setcookie("mx_lang", "de", (time() + $CONFIG['online_timeout']), COOKIE_PATH);
+       @setcookie("mx_lang", "de", (time() + $_CONFIG['online_timeout']), COOKIE_PATH);
        $mx_lang = "de";
        $file = sprintf(PATH."inc/language/%s.php", $mx_lang);
 }
index 5ba4027..a44a05c 100644 (file)
@@ -45,10 +45,19 @@ define('WERNIS_ADMIN_MIN_AMOUNT', "Minimumguthaben von {!POINTS!} f&uuml;r Ausza
 define('WERNIS_ADMIN_API_ID', "WDS66-API-ID (api_id=x)");
 define('WERNIS_ADMIN_API_MD5', "WDS66-API-Key (api_md5=xxxxx; 32-stellig)");
 define('WERNIS_ADMIN_API_URL', "Basis-URL der API-Skripte");
-define('WERNIS_ADMIN_CONFIG_NOTE', "<A href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</A> k&ouml;nnen Sie schon f&uuml;r <strong>5,00&euro;</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> {!POINTS!}-Account dennoch n&ouml;tig!)");
-define('MEMBER_WERNIS_MODE_CHOOSE', "M&ouml;chten Sie {!POINTS!} zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder {!POINTS!} hier einzahlen?");
-define('MEMBER_WERNIS_MODE_WITHDRAW', "{!POINTS!} einzahlen");
+define('WERNIS_ADMIN_REFID', "Ihre Referral-ID bei WDS66-Portal (= Ihr Username!)");
+define('WERNIS_ADMIN_CONFIG_NOTE', "<A href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</A> k&ouml;nnen Sie schon f&uuml;r <strong>5,00&euro;</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> {!POINTS!}-Account dennoch n&ouml;tig!) <strong>Geben Sie immer Ihren Usernamen von WDS66-Hauptaccount ein und &uuml;berpr&uuml;fen Sie diesen mehrmals! Er wird zum &Uuml;berweisen von {!POINTS!}/Wernis ben&ouml;tigt.");
+define('MEMBER_WERNIS_MODE_CHOOSE', "M&ouml;chten Sie {!POINTS!} zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder Wernis hier einzahlen?");
+define('MEMBER_WERNIS_MODE_CHOOSE2', "Hier klicken um neue &Uuml;berweisung zu starten...");
+define('MEMBER_WERNIS_MODE_WITHDRAW', "Wernis einzahlen");
 define('MEMBER_WERNIS_MODE_PAYOUT', "{!POINTS!} auszahlen");
+define('WERNIS_STATUS_UNKNWOWN', "Wernis-Typ <u>%s</u> unbekannt.");
+define('WERNIS_STATUS_WITHDRAW', "Einzahlung von WDS66");
+define('WERNIS_STATUS_PAYOUT', "Auszahlung an WDS66");
+define('WERNIS_TIMESTAMP', "Buchungszeitmarke");
+define('WERNIS_ACCOUNT', "WDS66-Hauptaccount");
+define('WERNIS_TOTAL_WERNIS', "Gesamt &uuml;berwiesen");
+define('WERNIS_MEMBER_LIST_WERNIS', "&Uuml;berweisungsliste von/an WDS66-Hauptaccount");
 
 // API messages
 define('WERNIS_API_REQUEST_DATA_INVALID', "Interner Fehler: Abfragedaten sind defekt!");
@@ -56,10 +65,45 @@ define('WERNIS_API_REQUEST_DATA_MISSING', "Interner Fehler: Abfragedaten sind ni
 define('WERNIS_API_REQUEST_ERROR', "Abfragefehler: <u>%s</u>");
 define('WERNIS_API_REQUEST_FAILED', "Unbekannter Fehler <u>%s</u> von API erhalten! Bitte im [<A href=\"http://forum.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Forum\">Forum melden</A>], den Fehlercode nennen und wie es dazu gekommen ist.");
 define('WERNIS_API_REQUEST_FAILED_AUTH', "Authorisierung an API fehlgeschlagen! Bitte API-ID und Key &uuml;berpr&uuml;fen. [<A href=\"http://www.wds66.com/modules.php?module=export\" target=\"_blank\" title=\"Direkt zum WDS66-Exportaccount\">Hier</A>] direkt zum Export-Account. Sie ben&ouml;tigen Ihren Usernamen und Passwort!");
+define('WERNIS_API_REQUEST_FAILED_USER', "Useraccount nicht gefunden oder Wernis-Passwort ist ung&uuml;ltig!");
+define('WERNIS_API_REQUEST_FAILED_OWN', "&Uuml;berweisung an eigenes Account nicht m&ouml;glich.");
+define('WERNIS_API_REQUEST_FAILED_AMOUNT', "Konto weist nicht gen&uuml;gend Deckung auf.");
+define('WERNIS_API_REQUEST_FAILED_API_AMOUNT', "API-Konto weist nicht gen&uuml;gend Deckung auf.");
+define('WERNIS_API_PURPOSE_WITHDRAW', "Einzahlung auf {!TITLE!} ({!URL!})");
+define('WERNIS_API_PURPOSE_PAYOUT', "Auszahlung von {!TITLE!} ({!URL!})");
 
 // Error messages
 define('WERNIS_ERROR_STATUS', "Fehler-Status <u>%s</u> erhalten.");
 define('WERNIS_UNKNOWN_ERROR', "Unbekannter Fehler aufgetreten!");
 
+// Member messages
+define('WERNIS_MEMBER_NO_ACCOUNT', "Noch kein WDS66-Account? Hier entlang!");
+define('WERNIS_MEMBER_API_DATA_MISSING', "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten m&uuml;ssen.");
+define('WERNIS_MEMBER_MIN_AMOUNT_PAYOUT', "Sie haben nicht gen&uuml;gend {!POINTS!} zum Auszahlen! Mindestens: <u>%s</u> {!POINTS!}.");
+define('WERNIS_MEMBER_WITHDRAW_TITLE', "Wernis bei {!TITLE!} einzahlen:");
+define('WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT', "{!POINTS!} hier im Account:");
+define('WERNIS_MEMBER_WITHDRAW_MIN_POINTS', "Mindest einzuzahlendes Wernis-Guthaben:");
+define('WERNIS_MEMBER_WITHDRAW_SUBMIT', "{!POINTS!} jetzt einzahlen");
+define('WERNIS_MEMBER_WITHDRAW_NOTE', "Ihr Wernis-Passwort wird bei {!TITLE!} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Betr&auml;ge eingeben! Ihr WDS66-Konto sollte ausreichend Deckung aufweisen!");
+define('WERNIS_MEMBER_PAYOUT_TITLE', "Wernis auf Ihr WDS66-Hauptaccount auszahlen");
+define('WERNIS_MEMBER_PAYOUT_POINTS', "Auszahlf&auml;higes {!POINTS!}-Guthaben");
+define('WERNIS_MEMBER_PAYOUT_MIN_POINTS', "Mindestens auszuzahlendes {!POINTS!}-Guthaben");
+define('WERNIS_MEMBER_PAYOUT_SUBMIT', "Auszahlung durchf&uuml;hren");
+define('WERNIS_MEMBER_PAYOUT_NOTE', "Ihr Wernis-Passwort wird bei {!TITLE!} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Betr&auml;ge eingeben! &Uuml;berpr&uuml;fen Sie vor dem Absenden Ihren WDS66-Usernamen.");
+define('WERNIS_MEMBER_WDS66_ID', "Username bei WDS66-Portal: [<A href=\"http://www.wds66.com/modules.php?module=psw_verg\" target=\"_blank\">Vergessen?</A>]");
+define('WERNIS_MEMBER_WDS66_PASSWORD', "Wernis-Passwort (nicht Accountpasswort!): [<A href=\"http://www.wds66.com/modules.php?module=psw_verg\" target=\"_blank\">Vergessen?</A>]");
+define('WERNIS_MEMBER_WDS66_AMOUNT', "Zu &uuml;berweisenden Betrag eingeben:");
+define('WERNIS_MEMBER_MODE_INVALID', "Ung&uuml;ltiger Modus <u>%s</u> erkannt! Bitte links im Men&uuml; fortfahren.");
+define('WERNIS_MEMBER_EMPTY_USERNAME', "Sie haben Ihren WDS66-Usernamen nicht eingegeben.");
+define('WERNIS_MEMBER_EMPTY_PASSWORD', "Sieh haben kein Wernis-Passwort eingegeben.");
+define('WERNIS_MEMBER_EMPTY_AMOUNT', "Sie haben keine zu &uuml;berweisende Betrag angegeben.");
+define('WERNIS_MEMBER_INVALID_USERNAME', "Bitte nur Zahlen f&uuml;r den WDS66-Usernamen eingeben!");
+define('WERNIS_MEMBER_INVALID_AMOUNT', "Bitte nur Zahlen f&uuml;r den zu &uuml;berweisenden Betrag eingeben!");
+define('WERNIS_MEMBER_AMOUNT_SMALLER_MIN', "Bitte geben Sie mindestens <u>%s</u> {!POINTS!} an!");
+define('WERNIS_MEMBER_WITHDRAW_FAILED', "Die Einzahlung hat nicht geklappt! R&uuml;ckmeldung f&uuml;r den Support: <em>%s</em>.");
+define('WERNIS_MEMBER_WITHDRAW_DONE', "Einzahlung auf Ihr {!TITLE!} Konto erfolgreich abgeschlossen. :-)");
+define('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED', "Sie k&ouml;nnen nicht <u>%s</u> {!POINTS!} auszahlen, da Sie nur <u>%s</u> &uuml;brig haben.");
+define('WERNIS_MEMBER_STATUS', "&Uuml;berweisungsart");
+
 //
 ?>
index eb79a8c..b9ce4dd 100644 (file)
@@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 //
 function ADMINS_CHECK_ACL($act, $wht)
 {
-       global $ADMINS, $ADMINS_ACLS, $CONFIG, $CACHE;
+       global $ADMINS, $ADMINS_ACLS, $_CONFIG, $CACHE;
        // If action is login or logout allow allways!
        $default = "allow";
        if (($act == "login") || ($act == "logout")) return true;
@@ -54,7 +54,7 @@ function ADMINS_CHECK_ACL($act, $wht)
                $default = $ADMINS['def_acl'][$_COOKIE['admin_login']];
 
                // Count cache hits
-               $CONFIG['cache_hits']++;
+               $_CONFIG['cache_hits']++;
        } elseif (!is_object($CACHE)) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT default_acl FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1",
@@ -109,7 +109,7 @@ function ADMINS_CHECK_ACL($act, $wht)
                                        if ($lines == 1)
                                        {
                                                // Count cache hits
-                                               $CONFIG['cache_hits']++;
+                                               $_CONFIG['cache_hits']++;
                                                break;
                                        }
                                }
index 95ff13f..c52b7a9 100644 (file)
@@ -40,10 +40,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 // This function must be run *BEFORE* a link is removed from table 'mxchange_user_links' !
 function BONUS_ADD_TURBO_POINTS($mid, $uid, $type)
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Shall we add bonus points?
-       if ($CONFIG['bonus_active'] == 'N') return;
+       if ($_CONFIG['bonus_active'] == 'N') return;
 
        // Select SQL command
        $SQL = "";
@@ -69,12 +69,12 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type)
        {
                // First rank!
                $rank = 1;
-               $points = $CONFIG['turbo_bonus'];
+               $points = $_CONFIG['turbo_bonus'];
        }
         else
        {
                // Anything else so let's explode all entered rank points
-               $test = explode(";", $CONFIG['bonus_rates']);
+               $test = explode(";", $_CONFIG['bonus_rates']);
                if (!empty($test[$rank - 2]))
                {
                        // Level found
@@ -95,16 +95,16 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type)
        $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus_turbo (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '".$rank."', '".$points."', UNIX_TIMESTAMP())",
         array(bigintval($uid), bigintval($mail), bigintval($bonus)), __FILE__, __LINE__);
 
-       if ((GET_EXT_VERSION("bonus") >= "0.3.5") && ($CONFIG['bonus_mode'] != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
+       if ((GET_EXT_VERSION("bonus") >= "0.3.5") && ($_CONFIG['bonus_mode'] != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
 }
 //
 function BONUS_MAKE_RANK_ROWS($data, $type, $uid)
 {
-       global $CONFIG;
+       global $_CONFIG;
        $self = false; $OUT = "";
 
        // How many ranks do we have?
-       $ranks = sizeof(explode(";", $CONFIG['bonus_rates'])) + 1;
+       $ranks = sizeof(explode(";", $_CONFIG['bonus_rates'])) + 1;
 
        // Load current user's data
        $result = SQL_QUERY_ESC("SELECT level, points, timemark FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s AND userid=%d LIMIT 1",
@@ -128,7 +128,7 @@ function BONUS_MAKE_RANK_ROWS($data, $type, $uid)
 
        // Load rankings
        $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s ORDER BY level LIMIT %s",
-        array($type, $data, $CONFIG['bonus_lines']), __FILE__, __LINE__);
+        array($type, $data, $_CONFIG['bonus_lines']), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0)
        {
                // Start generating the ranking list
@@ -183,44 +183,44 @@ function BONUS_MAKE_RANK_ROWS($data, $type, $uid)
 //
 function BONUS_POINTS_HANDLER($MODE)
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Shall we add bonus points?
-       if ($CONFIG['bonus_active'] == 'N') return;
+       if ($_CONFIG['bonus_active'] == 'N') return;
 
        // Switch to jackpot-mode when no UID is supplied but userid-mode is selected
-       if (($CONFIG['bonus_mode'] == "UID") && ($CONFIG['bonus_uid'] == "0")) $CONFIG['bonus_mode'] = "JACKPOT";
+       if (($_CONFIG['bonus_mode'] == "UID") && ($_CONFIG['bonus_uid'] == "0")) $_CONFIG['bonus_mode'] = "JACKPOT";
 
        if ($MODE == "login_bonus")
        {
                // Login bonus detected
-               $POINTS = $CONFIG['login_bonus'];
+               $points = $_CONFIG['login_bonus'];
        }
         else
        {
                // Direct points supplied
-               $POINTS = $MODE;
+               $points = $MODE;
        }
 
        // Subtract points from...
-       switch ($CONFIG['bonus_mode'])
+       switch ($_CONFIG['bonus_mode'])
        {
        case "JACKPOT": // ... jackpot
-               if ((SUB_JACKPOT($POINTS) == -1) && ($CONFIG['bonus_uid'] > 0))
+               if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0))
                {
                        // Check points amount first...
-                       $TOTAL = GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_data", "used_points");
-                       if ($TOTAL >= $POINTS)
+                       $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points");
+                       if ($TOTAL >= $points)
                        {
                                // Subtract points from userid's account
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1",
-                                array(bigintval($POINTS), bigintval($CONFIG['bonus_uid'])), __FILE__, __LINE__);
+                                array(bigintval($points), bigintval($_CONFIG['bonus_uid'])), __FILE__, __LINE__);
 
                                // Update mediadata as well
                                if (GET_EXT_VERSION("mediadata") >= "0.0.4")
                                {
                                        // Update database
-                                       MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS);
+                                       MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
                                }
                        }
                }
@@ -228,24 +228,24 @@ function BONUS_POINTS_HANDLER($MODE)
 
        case "UID": // ... userid's account
                // Check his amount first
-               $TOTAL = GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_data", "used_points");
-               if ($TOTAL >= $POINTS)
+               $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points");
+               if ($TOTAL >= $points)
                {
                        // Subtract points from userid's account
                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1",
-                        array(bigintval($POINTS), bigintval($CONFIG['bonus_uid'])),  __FILE__, __LINE__);
+                        array(bigintval($points), bigintval($_CONFIG['bonus_uid'])),  __FILE__, __LINE__);
 
                        // Update mediadata as well
                        if (GET_EXT_VERSION("mediadata") >= "0.0.4")
                        {
                                // Update database
-                               MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS);
+                               MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
                        }
                }
                 else
                {
                        // Try to subtract from jackpot
-                       $DUMMY = SUB_JACKPOT($POINTS);
+                       $DUMMY = SUB_JACKPOT($points);
                }
                break;
        }
@@ -253,9 +253,9 @@ function BONUS_POINTS_HANDLER($MODE)
 //
 function BONUS_PURGE_EXPIRED_TURBO_BONUS()
 {
-       global $CONFIG;
+       global $_CONFIG;
        // Remove entries
-       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < ".(time() - $CONFIG['bonus_timeout']), __FILE__, __LINE__);
+       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < ".(time() - $_CONFIG['bonus_timeout']), __FILE__, __LINE__);
        $DELETED = SQL_AFFECTEDROWS($result);
        if ($DELETED > 0)
        {
index d6d3d23..e437c51 100644 (file)
@@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 //
 function DOUBLER_GENERATE_TABLE($uid="0", $done='N', $ref='N', $sort="ASC")
 {
-       global $CONFIG;
+       global $_CONFIG;
        if (empty($cnt)) $cnt = "0";
        $ADD = ""; $DT_MODE = "0";
        if ($uid > 0)
@@ -60,17 +60,17 @@ function DOUBLER_GENERATE_TABLE($uid="0", $done='N', $ref='N', $sort="ASC")
        if (($done == 'Y') && ($sort == "ASC"))
        {
                // Already payed out points (latest payouts first)
-               $limit = $CONFIG['doubler_display_old'];
+               $limit = $_CONFIG['doubler_display_old'];
        }
         elseif ($sort == "ASC")
        {
                // List entries which will receive their payout soon
-               $limit = $CONFIG['doubler_display_pay'];
+               $limit = $_CONFIG['doubler_display_pay'];
        }
         elseif ($sort == "DESC")
        {
                // Newest entries
-               $limit = $CONFIG['doubler_display_new'];
+               $limit = $_CONFIG['doubler_display_new'];
        }
 
        // List entries
@@ -126,17 +126,17 @@ LIMIT ".$limit, __FILE__, __LINE__);
 //
 function DOUBLER_GET_TOTAL_POINTS_LEFT()
 {
-       global $CONFIG;
+       global $_CONFIG;
        // Initialize variables
        $points = "0";
 
-       if ($CONFIG['doubler_own'] == 'Y')
+       if ($_CONFIG['doubler_own'] == 'Y')
        {
                // Take points from doubler's own account
-               $points += $CONFIG['doubler_points'] - $CONFIG['doubler_used'];
+               $points += $_CONFIG['doubler_points'] - $_CONFIG['doubler_used'];
        }
 
-       if ($CONFIG['doubler_jackpot'] == 'Y')
+       if ($_CONFIG['doubler_jackpot'] == 'Y')
        {
                // Load jackpot
                $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);
@@ -146,10 +146,10 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT()
                if (!empty($jackpot)) $points += $jackpot;
        }
 
-       if ($CONFIG['doubler_uid'] > 0)
+       if ($_CONFIG['doubler_uid'] > 0)
        {
                // Get user's points
-               $user = GET_TOTAL_DATA($CONFIG['doubler_uid'], "user_points", "points");
+               $user = GET_TOTAL_DATA($_CONFIG['doubler_uid'], "user_points", "points");
                $points += $user;
        }
 
index e1697c7..8b8f8ba 100644 (file)
@@ -38,17 +38,17 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
        require($INC);
 }
 //
-function PAYOUT_OUTPUT_PAYOUT_LIST($POINTS)
+function PAYOUT_OUTPUT_PAYOUT_LIST($points)
 {
        // Replace german decimal comma with CPU's decimal dot
-       $POINTS = strval(str_replace(",", ".", $POINTS));
-       if ($POINTS > 0)
+       $points = strval(str_replace(",", ".", $points));
+       if ($points > 0)
        {
                // Pay this out!
                $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points
 FROM "._MYSQL_PREFIX."_payout_types
 WHERE %s >= min_points
-ORDER BY type", array($POINTS), __FILE__, __LINE__);
+ORDER BY type", array($points), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) > 0)
                {
                        OUTPUT_HTML("<br /><DIV align=\"center\">
@@ -58,10 +58,10 @@ ORDER BY type", array($POINTS), __FILE__, __LINE__);
                        while (list($id, $type, $rate, $mpoi) = SQL_FETCHROW($result))
                        {
                                $type = COMPILE_CODE($type);
-                               if ($POINTS >= $mpoi)
+                               if ($points >= $mpoi)
                                {
                                        // Ok we found one
-                                       $P = $POINTS * $rate - 0.5;
+                                       $P = $points * $rate - 0.5;
                                        OUTPUT_HTML("<LI>".PAYOUT_IN.": <STRONG><A href=\"".URL."/modules.php?module=login&amp;what=payout&amp;payout=".$id."\">".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")</A></STRONG></LI>");
                                }
                        }
index 799c896..4496e31 100644 (file)
@@ -42,7 +42,7 @@ function RALLYE_AUTOSTART_RALLYES($result)
 {
        // Global data array for LOAD_EMAIL_TEMPLATE()
        $DATA = array();
-       global $DATA, $CONFIG;
+       global $DATA, $_CONFIG;
 
        // Load all rallyes (usally we have only one rallye active per time!
        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -110,7 +110,7 @@ FROM "._MYSQL_PREFIX."_user_points AS p
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
 ON p.userid=d.userid
 WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%d",
- array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
+ array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
                        list($cpoints) = SQL_FETCHROW($result_ref);
                        SQL_FREERESULT($result_ref);
 
@@ -201,8 +201,8 @@ function RALLYE_ADD_PRICES($rallye,$mode="email")
 //
 function RALLYE_ADD_TOPUSERS($rallye,$default=0)
 {
-       global $CONFIG;
-       $since = (time() - $CONFIG['ap_in_since']);
+       global $_CONFIG;
+       $since = (time() - $_CONFIG['ap_in_since']);
 
        // First check how many prices are set
        $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level",
@@ -234,7 +234,7 @@ WHERE u.rallye_id=%d AND r.counter > 0 ORDER BY u.refs DESC",
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
 ON p.userid=d.userid
 WHERE d.userid=%d AND d.status='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s AND d.last_online >= %s
-LIMIT 1", array(bigintval($uid), $CONFIG['ref_payout'], $since), __FILE__, __LINE__);
+LIMIT 1", array(bigintval($uid), $_CONFIG['ref_payout'], $since), __FILE__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -338,10 +338,10 @@ VALUES ('%s', '%s', '0')",
 //
 function RALLYE_EXPIRE_RALLYES($result)
 {
-       global $DATA, $CONFIG;
+       global $DATA, $_CONFIG;
 
        // Latest online time
-       $since = (time() - $CONFIG['ap_in_since']);
+       $since = (time() - $_CONFIG['ap_in_since']);
 
        // Load rallye data
        list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
@@ -539,10 +539,10 @@ function RALLYE_LOAD_PRICES_ARRAY($rallye)
 //
 function RALLYE_LOAD_USERS_ARRAY($rallye)
 {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Fix zero points to 0.00000
-       if ($CONFIG['ref_payout'] == "0") $CONFIG['ref_payout'] = "0.00000";
+       if ($_CONFIG['ref_payout'] == "0") $_CONFIG['ref_payout'] = "0.00000";
 
        // Init multi array
        $users = array(
@@ -565,7 +565,7 @@ FROM "._MYSQL_PREFIX."_user_points AS p
 LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
 ON p.userid=d.userid
 WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%d",
- array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
+ array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -673,7 +673,7 @@ function RALLYE_LIST_WINNERS($rallye,$default=0)
 //
 function RALLYE_DELETE_EXPIRED_RALLYES()
 {
-       global $DATA, $CONFIG;
+       global $DATA, $_CONFIG;
        // Check for expired rallyes
        $EXPIRE = time() - ONE_DAY * 3; // The hard-coded value...
        $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time FROM "._MYSQL_PREFIX."_rallye_data WHERE end_time <= %s AND expired='Y'",
@@ -770,7 +770,7 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
 //
 function RALLYE_GET_REFCOUNT($uid, $old=0)
 {
-       global $REF_SYSTEM, $REF_DEPTHS, $CONFIG;
+       global $REF_SYSTEM, $REF_DEPTHS, $_CONFIG;
        // Check current refs
        if (GET_EXT_VERSION("cache") >= "0.1.2")
        {
@@ -807,7 +807,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0)
                if ($cnt > 0)
                {
                        // Count cache hits
-                       $CONFIG['cache_hits']++;
+                       $_CONFIG['cache_hits']++;
 
                        // Remove old refs
                        //* DEBUG: */ echo "+".$cnt."/".$old."+<br />";
index 317bcea..4e6e52f 100644 (file)
@@ -108,7 +108,7 @@ function REGISTER_OUTPUT_REQUIRE_CHECK(&$array)
 //
 function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
 {
-       global $_POST, $CONFIG;
+       global $_POST, $_CONFIG;
        $OUT = "";
 
        // Guests are mostly not interested in how many members has
@@ -134,7 +134,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false)
                                'id'    => $id,
                        );
 
-                       if (($_POST['cat'][$id] == 'Y') || (($CONFIG['register_default'] == 'Y') && (empty($_POST['cat'][$id]))))
+                       if (($_POST['cat'][$id] == 'Y') || (($_CONFIG['register_default'] == 'Y') && (empty($_POST['cat'][$id]))))
                        {
                                $content['def_y'] = " checked";
                        }
index 1434360..e282612 100644 (file)
@@ -41,10 +41,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 //
 function REWRITE_LINKS($HTML)
 {
-       global $_GET, $CONFIG;
+       global $_CONFIG;
 
        // Skip rewriting for the admin area (which search engine may enter here???)
-       if (ereg($GLOBALS['module'], $CONFIG['rewrite_skipped_mods'])) return $HTML;
+       if (ereg($GLOBALS['module'], $_CONFIG['rewrite_skipped_mods'])) return $HTML;
 
        // Strip slashes with double-backslashes for the preg_replace() function
        $URL = str_replace("/", "\\/", URL);
index 730812b..1afe82a 100644 (file)
@@ -46,7 +46,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 //
 function OUTPUT_ADVANCED_OVERVIEW (&$result_main)
 {
-       global $_COOKIE, $CONFIG;
+       global $_COOKIE, $_CONFIG;
 
        // Init variables/arrays
        $EXTRAS = ""; $OUT = ""; $SQLs = array(); $WHATs = array(); $DESCRs = array(); $TITLEs = array();
@@ -271,7 +271,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main)
 
        if (EXT_IS_ACTIVE("autopurge")) {
                // Start finding them...
-               $since = (time() - $CONFIG['ap_in_since']);
+               $since = (time() - $_CONFIG['ap_in_since']);
                $EXCLUDE_LIST = " AND d.userid != c.def_refid";
 
                // Check for more extensions
@@ -336,11 +336,11 @@ ORDER BY d.userid";
                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 ($_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";
                        $USE .= ")";
                } else {
                        // Old version ???
@@ -349,10 +349,10 @@ ORDER BY d.userid";
 
                // Autopurge installed?
                $LAST = ""; $ONLINE = "";
-               if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == 'Y') && ($CONFIG['ap_in_since'] > 0)) {
+               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == 'Y') && ($_CONFIG['ap_in_since'] > 0)) {
                        // Use last online timestamp to keep inactive members away from here
                        $LAST   = " AND last_online >= ";
-                       $ONLINE = bigintval(time() - $CONFIG['ap_in_since']);
+                       $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
                }
 
                $SQLs[]   = "SELECT ".$USE." AS active_bonus FROM "._MYSQL_PREFIX."_user_data
@@ -368,10 +368,10 @@ ORDER BY active_bonus DESC, userid";
 
                // Autopurge installed?
                $LAST = ""; $ONLINE = "";
-               if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == 'Y') && ($CONFIG['ap_in_since'] > 0)) {
+               if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == 'Y') && ($_CONFIG['ap_in_since'] > 0)) {
                        // Use last online timestamp to keep inactive members away from here
                        $LAST   = " AND last_online >= ";
-                       $ONLINE = bigintval(time() - $CONFIG['ap_in_since']);
+                       $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
                }
 
                $SQLs[]   = "SELECT userid FROM "._MYSQL_PREFIX."_user_data
index cf44c26..533dded 100644 (file)
@@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 
 function alpha($sortby, $colspan, $return=false)
 {
-       global $CONFIG;
+       global $_CONFIG;
        if (empty($_GET['offset'])) $_GET['offset'] = "0";
        $ADD = "&amp;page=".$_GET['page']."&amp;offset=".$_GET['offset'];
        if (!empty($_GET['mode'])) $ADD .= "&amp;mode=".SQL_ESCAPE($_GET['mode']);
@@ -63,7 +63,7 @@ function alpha($sortby, $colspan, $return=false)
                        if (!empty($_GET['mode'])) $OUT .= "&amp;mode=".SQL_ESCAPE($_GET['mode']);
                        $OUT .= "&amp;letter=".$ltr."&amp;sortby=".$sortby.$ADD."\">".$ltr."</A>";
                }
-               if ((($counter / $CONFIG['user_alpha']) == round($counter / $CONFIG['user_alpha'])) && ($counter > 0))
+               if ((($counter / $_CONFIG['user_alpha']) == round($counter / $_CONFIG['user_alpha'])) && ($counter > 0))
                {
                        $OUT .= "&nbsp;]<br />[&nbsp;";
                }
index ea38400..812fbf2 100644 (file)
@@ -45,7 +45,7 @@ function WERNIS_STATUS_MESSAGE ($msg, $status) {
 }
 
 // Get the status message
-function WERNIS_ERROR_MESSAGE () {
+function GET_WERNIS_ERROR_MESSAGE () {
        global $WERNIS;
        if (isset($WERNIS['message'])) {
                // Use raw message
@@ -59,9 +59,24 @@ function WERNIS_ERROR_MESSAGE () {
        }
 }
 
+// Get the status code
+function GET_WERNIS_ERROR_CODE () {
+       global $WERNIS;
+       if (isset($WERNIS['status'])) {
+               // Use raw message
+               return $WERNIS['status'];
+       } elseif (isset($WERNIS['status'])) {
+               // Fall-back to status
+               return sprintf(WERNIS_ERROR_STATUS, $WERNIS['status']);
+       } else {
+               // Something bad happend
+               return WERNIS_UNKNOWN_ERROR;
+       }
+}
+
 // Sends out a request to the API and returns it's result
 function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
-       global $CONFIG;
+       global $_CONFIG;
 
        // Is the requestData an array?
        if (!is_array($requestData)) {
@@ -73,7 +88,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
        }
 
        // Is the API id and MD5 hash there?
-       if ((empty($CONFIG['wernis_api_id'])) || (empty($CONFIG['wernis_api_md5']))) {
+       if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) {
                // Abort here...
                return array(
                        'status'  => "failed_general",
@@ -82,7 +97,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
        }
 
        // Construct the request string
-       $requestString = $CONFIG['wernis_api_url'] . $scriptName."?api_id=".$CONFIG['wernis_api_id']."&api_key=".$CONFIG['wernis_api_md5'];
+       $requestString = $_CONFIG['wernis_api_url'] . $scriptName."?api_id=".$_CONFIG['wernis_api_id']."&api_key=".$_CONFIG['wernis_api_md5'];
        foreach ($requestData as $key=>$value) {
                $requestString .= "&".$key."=".$value;
        }
@@ -125,6 +140,34 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
                                );
                                break;
 
+                       case "USER": // Missing account or invalid password
+                               $return = array(
+                                       'status'  => "user_failed",
+                                       'message' => WERNIS_API_REQUEST_FAILED_USER
+                               );
+                               break;
+
+                       case "OWN": // Transfer to own account
+                               $return = array(
+                                       'status'  => "own_failed",
+                                       'message' => WERNIS_API_REQUEST_FAILED_OWN
+                               );
+                               break;
+
+                       case "AMOUNT": // Amount is depleted
+                               $return = array(
+                                       'status'  => "amount_failed",
+                                       'message' => WERNIS_API_REQUEST_FAILED_AMOUNT
+                               );
+                               break;
+
+                       case "AMOUNT-SEND": // API amount is depleted
+                               $return = array(
+                                       'status'  => "api_amount_failed",
+                                       'message' => WERNIS_API_REQUEST_FAILED_API_AMOUNT
+                               );
+                               break;
+
                        default: // Unknown error (maybe new?)
                                $return = array(
                                        'status'  => "request_failed",
@@ -147,7 +190,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
 // Tests the function by calling balance.php on the API
 function WERNIS_TEST_API () {
        // Get config first
-       global $CONFIG;
+       global $_CONFIG;
        $result = false;
 
        // Return the result from the lower functions
@@ -165,5 +208,92 @@ function WERNIS_TEST_API () {
        return $result;
 }
 
+// Widthdraw this amount
+function WERNIS_EXECUTE_WITHDRAW($userId, $userMd5, $amount) {
+       global $_CONFIG;
+       $result = false;
+
+       // Prepare the purpose
+       $eval = "\$purpose = \"".COMPILE_CODE(WERNIS_API_PURPOSE_WITHDRAW)."\";";
+       eval($eval);
+
+       // Prepare the request data
+       $requestData = array(
+               'sub_request'   => "receive",
+               't_uid'                 => bigintval($userId),
+               't_md5'                 => $userMd5,
+               'r_uid'                 => $_CONFIG['wernis_refid'],
+               'amount'                => bigintval($amount),
+               'purpose'               => urlencode(base64_encode($purpose))
+       );
+
+       // Return the result from the lower functions
+       $return = WERNIS_SEND_REQUEST("book.php", $requestData);
+
+       if ($return['status'] == "OK") {
+               // All fine!
+               $result = true;
+       } else {
+               // Status failture text
+               WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
+       }
+
+       // Return result
+       return $result;
+}
+
+
+// Payout this amount
+function WERNIS_EXECUTE_PAYOUT($userId, $userMd5, $amount) {
+       global $_CONFIG;
+       $result = false;
+
+       // Prepare the purpose
+       $eval = "\$purpose = \"".COMPILE_CODE(WERNIS_API_PURPOSE_PAYOUT)."\";";
+       eval($eval);
+
+       // Prepare the request data
+       $requestData = array(
+               'sub_request'   => "send",
+               't_uid'                 => bigintval($userId),
+               't_md5'                 => $userMd5,
+               'r_uid'                 => $_CONFIG['wernis_refid'],
+               'amount'                => bigintval($amount),
+               'purpose'               => urlencode(base64_encode($purpose))
+       );
+
+       // Return the result from the lower functions
+       $return = WERNIS_SEND_REQUEST("book.php", $requestData);
+
+       if ($return['status'] == "OK") {
+               // All fine!
+               $result = true;
+       } else {
+               // Status failture text
+               WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
+       }
+
+       // Return result
+       return $result;
+}
+
+// Translate the status IN/OUT
+function WERNIS_TRANSFER_STATUS($status) {
+       // Default status
+       $return = sprintf(WERNIS_STATUS_UNKNWOWN, $status);
+       switch ($status) {
+               case "IN": // Withdraw
+                       $return = WERNIS_STATUS_WITHDRAW;
+                       break;
+
+               case "OUT": // Payout
+                       $return = WERNIS_STATUS_PAYOUT;
+                       break;
+       }
+
+       // Return the status
+       return $return;
+}
+
 //
 ?>
index 3cca361..d31cf3a 100644 (file)
@@ -98,7 +98,7 @@ if (($CACHE->cache_file("admins", true) == true)) {
                $CACHE->cache_destroy();
                unset($ADMINS);
        }
-} elseif (($CONFIG['cache_admins'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_admins'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file
        $CACHE->cache_init("ADMINS");
 
@@ -163,7 +163,7 @@ if ($CACHE->cache_file("mod_reg", true) == true) {
                        unset($MODULES['has_menu'][$key]);
                }
        }
-} elseif (($CONFIG['cache_modreg'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_modreg'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $CACHE->cache_init("MODULES");
 
@@ -210,7 +210,7 @@ if ($CACHE->cache_file("config", true) == true) {
                $CACHE->cache_destroy();
                unset($CFG_CACHE);
        }
-} elseif (($CONFIG['cache_config'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_config'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $CACHE->cache_init("CONFIG");
 
@@ -249,7 +249,7 @@ if ($CACHE->cache_file("refsystem", true) == true) {
                $CACHE->cache_destroy();
                unset($REF_SYSTEM);
        }
-} elseif (($CONFIG['cache_refsys'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_refsys'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $CACHE->cache_init("REFSYSTEM");
 
@@ -288,7 +288,7 @@ if ($CACHE->cache_file("refdepths", true) == true) {
                $CACHE->cache_destroy();
                unset($REF_DEPTHS);
        }
-} elseif (($CONFIG['cache_refdepth'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_refdepth'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $CACHE->cache_init("REFDEPTHS");
 
@@ -331,7 +331,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") {
                                unset($ADMINS_ACLS);
                        }
                }
-       } elseif (($CONFIG['cache_acls'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+       } elseif (($_CONFIG['cache_acls'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
                // Create cache file here
                $CACHE->cache_init("ADMINS_ACLS");
 
index f919b7d..8c469bd 100644 (file)
@@ -75,7 +75,7 @@ if (EXT_IS_ACTIVE("cache"))
        }
 
        // Do not recreate cache file when it's switched off!
-       if (($CACHE_FILE == "init") && ($CONFIG['cache_exts'] == 'N')) $CACHE_FILE = "skip";
+       if (($CACHE_FILE == "init") && ($_CONFIG['cache_exts'] == 'N')) $CACHE_FILE = "skip";
 
        // Load language
        if ($CACHE_FILE == "load") include(PATH."inc/language/cache_".GET_LANGUAGE().".php");
@@ -308,9 +308,9 @@ SQL_FREERESULT($res_ext_crt);
 /**
  * Commented out...
  *
- *foreach ($CONFIG as $k=>$v)
+ *foreach ($_CONFIG as $k=>$v)
  *{
- *     $CONFIG[$k] = COMPILE_CODE($v);
+ *     $_CONFIG[$k] = COMPILE_CODE($v);
  *}
  */
 
index 9363f83..7bbd91f 100644 (file)
@@ -47,15 +47,15 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 if ($CSS == 1) return;
 
 // Create timemark from saved month
-$mark = mktime(0, 0, 0, $CONFIG['beg_month'], date("d", time()), date('Y', time()));
+$mark = mktime(0, 0, 0, $_CONFIG['beg_month'], date("d", time()), date('Y', time()));
 $SQL = ""; $MODE = "";
 
 // Shall I sent activation or deactivation mail?
 $SQL = "SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE (beg_ral_notify ";
-switch ($CONFIG['beg_rallye'])
+switch ($_CONFIG['beg_rallye'])
 {
 case 'Y': // Begging rallye is activated
-       if ($CONFIG['beg_ral_en_notify'] == 'Y')
+       if ($_CONFIG['beg_ral_en_notify'] == 'Y')
        {
                // Okay, let's check for member accounts
                $SQL .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
@@ -69,7 +69,7 @@ case 'Y': // Begging rallye is activated
        break;
 
 case 'N': // Begging rallye is deactivated
-       if ($CONFIG['beg_ral_di_notify'] == 'Y')
+       if ($_CONFIG['beg_ral_di_notify'] == 'Y')
        {
                // Okay, let's check for member accounts
                $SQL .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
@@ -89,10 +89,10 @@ if (!empty($SQL))
        $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC";
 
        // Prepare data for the template
-       define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points']));
-       define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points_max']));
-       define('__BEG_MAX_WINNERS', round($CONFIG['beg_ranks']));
-       if ($CONFIG['beg_ip_timeout'] == 0)
+       define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points']));
+       define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points_max']));
+       define('__BEG_MAX_WINNERS', round($_CONFIG['beg_ranks']));
+       if ($_CONFIG['beg_ip_timeout'] == 0)
        {
                // No IP locking setuped!
                define('__BEG_IP_LOCKER', BEG_NO_LIMITATION);
@@ -100,7 +100,7 @@ if (!empty($SQL))
         else
        {
                // Create timemark
-               define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($CONFIG['beg_ip_timeout']));
+               define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($_CONFIG['beg_ip_timeout']));
        }
 
        // Check for accounts to be notified
@@ -108,7 +108,7 @@ if (!empty($SQL))
        if (SQL_NUMROWS($result_main) > 0)
        {
                // Normal notification mails or bonus mails?
-               $MAIL_MODE = (($CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
+               $MAIL_MODE = (($_CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
 
                // Generate subject line
                $eval = "\$SUBJECT = BEG_RALLYE_".strtoupper($MODE)."_NOTIFY;";
@@ -152,8 +152,8 @@ VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s',
        $SUBJECT,
        $MSG,
        $RECEIVER,
-       $CONFIG['beg_notify_bonus'],
-       $CONFIG['beg_notify_wait'],
+       $_CONFIG['beg_notify_bonus'],
+       $_CONFIG['beg_notify_wait'],
        URL."/modules.php?module=index&what=login",
        0,
        SELECTION_COUNT(explode(";", $RECEIVER)),
index ec8317a..597d728 100644 (file)
@@ -53,10 +53,10 @@ $YEAR  = date('Y', time());
 
 // Shall I include only active members?
 $ADD = "%s"; $VALUE = "";
-if (($CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_in_since'] > 0) && ($CONFIG['ap_inactive'] == 'Y'))
+if (($_CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_in_since'] > 0) && ($_CONFIG['ap_inactive'] == 'Y'))
 {
        $ADD = " AND last_online >= %d";
-       $VALUE = bigintval(time() - $CONFIG['ap_in_since']);
+       $VALUE = bigintval(time() - $_CONFIG['ap_in_since']);
 }
 
 // Only confirmed members shall receive birthday mails...
@@ -78,12 +78,12 @@ if (SQL_NUMROWS($result_birthday) > 0)
                // Simply subtract both values and you got the age... :)
                $AGE = $NOW - $BD;
 
-               if ($CONFIG['birthday_points'] > 0)
+               if ($_CONFIG['birthday_points'] > 0)
                {
                        // Prepare array for loading template
                        $content = array(
                                'age'    => $AGE,
-                               'points' => $CONFIG['birthday_points'],
+                               'points' => $_CONFIG['birthday_points'],
                                'check'  => "",
                        );
                        for ($idx = 0; $idx < 4; $idx++)
@@ -93,7 +93,7 @@ if (SQL_NUMROWS($result_birthday) > 0)
 
                        // Insert row into database
                        $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s', '%s', '%s' )",
-                        array(bigintval($uid), $CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__);
+                        array(bigintval($uid), $_CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__);
 
                        // Load email template with confirmation link
                        $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid));
index 1c4cb97..6736810 100644 (file)
@@ -47,15 +47,15 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 if ($CSS == 1) return;
 
 // Create timemark from saved month
-$mark = mktime(0, 0, 0, $CONFIG['bonus_month'], date("d", time()), date('Y', time()));
+$mark = mktime(0, 0, 0, $_CONFIG['bonus_month'], date("d", time()), date('Y', time()));
 $SQL = ""; $MODE = "";
 
 // Shall I sent activation or deactivation mail?
 $SQL = "SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE (bonus_ral_notify ";
-switch ($CONFIG['bonus_active'])
+switch ($_CONFIG['bonus_active'])
 {
 case 'Y': // Active rallye is activated
-       if ($CONFIG['bonus_en_notify'] == 'Y')
+       if ($_CONFIG['bonus_en_notify'] == 'Y')
        {
                // Okay, let's check for member accounts
                $SQL .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
@@ -69,7 +69,7 @@ case 'Y': // Active rallye is activated
        break;
 
 case 'N': // Active rallye is deactivated
-       if ($CONFIG['bonus_di_notify'] == 'Y')
+       if ($_CONFIG['bonus_di_notify'] == 'Y')
        {
                // Okay, let's check for member accounts
                $SQL .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
@@ -89,7 +89,7 @@ if (!empty($SQL))
        $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC";
 
        // Normal notification mails or bonus mails?
-       $MAIL_MODE = (($CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
+       $MAIL_MODE = (($_CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
 
        // Generate subject line
        $eval = "\$SUBJECT = BONUS_RALLYE_".strtoupper($MODE)."_NOTIFY;";
@@ -137,8 +137,8 @@ VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s',
        $SUBJECT,
        $MSG,
        $RECEIVER,
-       $CONFIG['bonus_notify_points'],
-       $CONFIG['bonus_notify_wait'],
+       $_CONFIG['bonus_notify_points'],
+       $_CONFIG['bonus_notify_wait'],
        URL."/modules.php?module=index&what=login",
        0,
        SELECTION_COUNT(explode(";", $RECEIVER)),
index 55b9a3b..b5b6b02 100644 (file)
@@ -42,7 +42,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 if ((empty($GLOBALS['action'])) && ($check == "admin_only"))
 {
        // Redirect to right URL
-       LOAD_URL(URL."/modules.php?module=admin&amp;action=login");
+       LOAD_URL("modules.php?module=admin&amp;action=login");
 }
 
 // Load include file
@@ -352,7 +352,7 @@ if (!admin_registered)
                        }
 
                        // When type of admin menu is not set fallback to old menu system
-                       if (empty($CONFIG['admin_menu'])) $CONFIG['admin_menu'] = "OLD";
+                       if (empty($_CONFIG['admin_menu'])) $_CONFIG['admin_menu'] = "OLD";
 
                        // Check for version and switch between old menu system and new "intelligent menu system"
                        if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (file_exists(PATH."inc/modules/admin/la_sys-inc.php")))
index e389d58..c10b309 100644 (file)
@@ -45,12 +45,12 @@ OUTPUT_HTML("</FONT><br /><br />");
 if (!empty($_POST['no']))
 {
        // Do not logout now
-       LOAD_URL(URL."/modules.php?module=admin");
+       LOAD_URL("modules.php?module=admin");
 }
  elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout"))
 {
        // Redirect to logout link
-       LOAD_URL(URL."/modules.php?module=admin&amp;logout=1");
+       LOAD_URL("modules.php?module=admin&amp;logout=1");
 }
  else
 {
index db3e3b3..9e2e39a 100644 (file)
@@ -64,14 +64,14 @@ function REGISTER_ADMIN ($user, $md5)
 // Only be executed on login procedure!
 function CHECK_ADMIN_LOGIN ($admin_login, $password)
 {
-       global $ADMINS, $CONFIG, $CACHE;
+       global $ADMINS, $_CONFIG, $CACHE;
        $ret = "404"; $pass = "";
        if (!empty($ADMINS['aid'][$admin_login]))
        {
                // Get password from cache
                $pass = $ADMINS['password'][$admin_login];
                $ret = "pass";
-               $CONFIG['cache_hits']++;
+               $_CONFIG['cache_hits']++;
        }
         else
        {
@@ -129,14 +129,14 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password)
 // Only be executed on cookie checking
 function CHECK_ADMIN_COOKIES ($admin_login, $password)
 {
-       global $ADMINS, $CONFIG;
+       global $ADMINS, $_CONFIG;
        $ret = "404"; $pass = "";
        if (!empty($ADMINS['aid'][$admin_login]))
        {
                // Get password from cache
                $pass = $ADMINS['password'][$admin_login];
                $ret = "pass";
-               $CONFIG['cache_hits']++;
+               $_CONFIG['cache_hits']++;
        }
         else
        {
@@ -225,7 +225,7 @@ function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0)
 //
 function ADMIN_DO_ACTION($wht)
 {
-       global $menuDesription, $menuTitle, $CONFIG, $EXTENSIONS, $link, $DATA;
+       global $menuDesription, $menuTitle, $_CONFIG, $EXTENSIONS, $link, $DATA;
        //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*<br />\n";
        if (EXT_IS_ACTIVE("cache"))
        {
@@ -522,9 +522,9 @@ function ADMIN_MENU_SELECTION($MODE, $default="", $defid="")
        return $OUT;
 }
 //
-function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $translateComma = array(), $alwaysAdd=false)
+function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="config=0", $translateComma = array(), $alwaysAdd=false)
 {
-       global $CONFIG, $CFG_CACHE, $CACHE;
+       global $_CONFIG, $CFG_CACHE, $CACHE;
        $DATA = array();
        $skip = false; $TEST2 = "";
        foreach ($POST as $id=>$val) {
@@ -579,7 +579,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran
                                }
 
                                // Update current configuration
-                               $CONFIG[$id] = $val;
+                               $_CONFIG[$id] = $val;
                        }
                }
        }
@@ -587,10 +587,10 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran
        // Check if entry does exist
        $result = false;
        if (!$alwaysAdd) {
-               if (!empty($WHERE)) {
-                       $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$TABLE." WHERE ".$WHERE." LIMIT 1", __FILE__, __LINE__);
+               if (!empty($whereStatement)) {
+                       $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$tableName." WHERE ".$whereStatement." LIMIT 1", __FILE__, __LINE__);
                } else {
-                       $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$TABLE." LIMIT 1", __FILE__, __LINE__);
+                       $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$tableName." LIMIT 1", __FILE__, __LINE__);
                }
        }
 
@@ -599,7 +599,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran
                $DATA_UPDATE = implode(", ", $DATA);
 
                // Generate SQL string
-               $SQL = "UPDATE "._MYSQL_PREFIX.$TABLE." SET ".$DATA_UPDATE." WHERE ".$WHERE." LIMIT 1";
+               $SQL = "UPDATE "._MYSQL_PREFIX.$tableName." SET ".$DATA_UPDATE." WHERE ".$whereStatement." LIMIT 1";
        } else {
                // Add Line (does only work with auto_increment!
                $KEYs = array(); $VALUEs = array();
@@ -614,7 +614,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran
                $VALUEs = implode(", ", $VALUEs);
 
                // Generate SQL string
-               $SQL = "INSERT INTO "._MYSQL_PREFIX.$TABLE." (".$KEYs.") VALUES(".$VALUEs.")";
+               $SQL = "INSERT INTO "._MYSQL_PREFIX.$tableName." (".$KEYs.") VALUES(".$VALUEs.")";
        }
 
        // Free memory
@@ -624,7 +624,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran
        $result = SQL_QUERY($SQL, __FILE__, __LINE__);
 
        // Is the config table updated and the cache extension installed?
-       if ((GET_EXT_VERSION("cache") >= "0.1.2") && ($TABLE == "_config")) {
+       if ((GET_EXT_VERSION("cache") >= "0.1.2") && ($tableName == "_config")) {
                // Remove it here...
                if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy();
                unset($CFG_CACHE);
@@ -679,17 +679,17 @@ function ADMIN_USER_PROFILE_LINK($uid, $title="", $wht="list_user")
 //
 function ADMIN_CHECK_MENU_MODE()
 {
-       global $CONFIG, $ADMINS, $_COOKIE;
+       global $_CONFIG, $ADMINS, $_COOKIE;
 
        // Set the global mode as the mode for all admins
-       $MODE = $CONFIG['admin_menu']; $ADMIN = $MODE;
+       $MODE = $_CONFIG['admin_menu']; $ADMIN = $MODE;
 
        // Check individual settings of current admin
        if (isset($ADMINS['la_mode'][$_COOKIE['admin_login']]))
        {
                // Load from cache
                $ADMIN = $ADMINS['la_mode'][$_COOKIE['admin_login']];
-               $CONFIG['cache_hits']++;
+               $_CONFIG['cache_hits']++;
        }
         elseif (GET_EXT_VERSION("admins") >= "0.6.7")
        {
@@ -714,7 +714,7 @@ function ADMIN_CHECK_MENU_MODE()
 }
 // Change activation status
 function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
-       global $CONFIG;
+       global $_CONFIG;
        $cnt = 0; $newStatus = 'Y';
        if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" all through and count them
@@ -756,7 +756,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
 }
 // Delete rows by given ID numbers
 function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $row, $columns = array(), $filterFunctions = array(), $deleteNow=false, $idRow="id") {
-       global $CONFIG;
+       global $_CONFIG;
        $OUT = ""; $SW = 2;
        if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" through all entries and count them
index 2b1556b..3568b70 100644 (file)
@@ -170,7 +170,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC",
 //
 function OUTPUT_SELECTED_TASKS($_POST, $result_tasks)
 {
-       global $CONFIG, $NOTES;
+       global $_CONFIG, $NOTES;
        if ((isset($_POST['assign'])) && (count($_POST['task']) > 0))
        {
                // Assign / do tasks
@@ -217,7 +217,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks)
                                $title = TASK_NO_TITLE;
 
                                // Shall I list SQL commands assigned to an extension installation or update task?
-                               if (((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
+                               if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
                                {
                                        $ext_name = substr($subj, 1, strpos($subj, ":") - 1);
                                        if ($type == "EXTENSION")
@@ -258,7 +258,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks)
                                        // Add SQLs to a table
                                        if (empty($SQLs)) $SQLs = array();
                                        if (empty($title)) $title = "";
-                                       if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == 'Y')) {
+                                       if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y')) {
                                                // Add verbose SQL table
                                                $text .= EXTENSION_VERBOSE_TABLE($SQLs, $title, " class=\"admin_table top2 left2 right2\"", true, "100%")."<br />\n";
                                        }
index 2d08ad8..1f831ca 100644 (file)
@@ -76,7 +76,7 @@ VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
                if (!empty($id))
                {
                        // Reload to prices...
-                       LOAD_URL(URL."/modules.php?module=admin&amp;what=config_rallye_prices&rallye=".$id);
+                       LOAD_URL("modules.php?module=admin&amp;what=config_rallye_prices&rallye=".$id);
                }
                 else
                {
index 724d2ae..34ed0fc 100644 (file)
@@ -48,7 +48,7 @@ if (isset($_POST['edit']))
        {
                // Add option for userlog
                $ADMINS = ADD_OPTION_LINES("admins", "id", "login", "", "email");
-               $SW = 2; $ROWS = "";
+               $SW = 2; $rowNameS = "";
                foreach ($_POST['sel'] as $template=>$sel)
                {
                        // First of all load data from DB
@@ -92,10 +92,10 @@ if (isset($_POST['edit']))
                        $content['content'] = $OUT;
 
                        // Start outputing line
-                       $ROWS .= LOAD_TEMPLATE("admin_admins_mails_edit_row", true, $content);
+                       $rowNameS .= LOAD_TEMPLATE("admin_admins_mails_edit_row", true, $content);
                        $SW = 3 - $SW;
                }
-               define('__ADMINS_ROWS', $ROWS);
+               define('__ADMINS_ROWS', $rowNameS);
 
                // Edit checked entries
                LOAD_TEMPLATE("admin_admins_mails_edit");
index 5ff646d..01c61e8 100644 (file)
@@ -47,19 +47,19 @@ if (isset($_POST['ok']))
  else
 {
        // Setup constants for the template
-       switch ($CONFIG['ap_inactive'])
+       switch ($_CONFIG['ap_inactive'])
        {
                case 'Y': define('__YES_IN', " checked"); define('__NO_IN', "");         break;
                case 'N': define('__YES_IN', "");         define('__NO_IN', " checked"); break;
        }
-       switch ($CONFIG['ap_unconfirmed'])
+       switch ($_CONFIG['ap_unconfirmed'])
        {
                case 'Y': define('__YES_UN', " checked"); define('__NO_UN', "");         break;
                case 'N': define('__YES_UN', "");         define('__NO_UN', " checked"); break;
        }
-       define('__AP_IN_SINCE', $CONFIG['ap_in_since']);
-       define('__AP_IN_TIME' , $CONFIG['ap_in_time']);
-       define('__AP_UN_TIME' , $CONFIG['ap_un_time']);
+       define('__AP_IN_SINCE', $_CONFIG['ap_in_since']);
+       define('__AP_IN_TIME' , $_CONFIG['ap_in_time']);
+       define('__AP_UN_TIME' , $_CONFIG['ap_un_time']);
 
        // Output template
        LOAD_TEMPLATE("admin_config_autopurge");
index 69a6948..b22172c 100644 (file)
@@ -42,11 +42,11 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
 ADD_DESCR("admin", basename(__FILE__));
 
 // Prepare data for the template
-define('__DB_HITS'   , $CONFIG['db_hits']);
-$HITS = str_repeat("&nbsp;", abs(strlen($CONFIG['db_hits']) - strlen($CONFIG['cache_hits']))).$CONFIG['cache_hits'];
+define('__DB_HITS'   , $_CONFIG['db_hits']);
+$HITS = str_repeat("&nbsp;", abs(strlen($_CONFIG['db_hits']) - strlen($_CONFIG['cache_hits']))).$_CONFIG['cache_hits'];
 define('__CACHE_HITS', $HITS);
-define('__TOTAL_HITS', ($CONFIG['db_hits'] + $CONFIG['cache_hits']));
-define('__CACHE_PERC', TRANSLATE_COMMA(($CONFIG['cache_hits'] / __TOTAL_HITS  * 100)));
+define('__TOTAL_HITS', ($_CONFIG['db_hits'] + $_CONFIG['cache_hits']));
+define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / __TOTAL_HITS  * 100)));
 
 // Load template
 LOAD_TEMPLATE("admin_cache_stats");
index ccfc154..3a19f15 100644 (file)
@@ -45,7 +45,7 @@ if (isset($_POST['ok'])) {
        ADMIN_SAVE_SETTINGS($_POST);
 } else {
        // Minimum mails / active
-       define('__LIMIT_VALUE', $CONFIG['active_limit']);
+       define('__LIMIT_VALUE', $_CONFIG['active_limit']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_active");
index 2997e4f..4dc5753 100644 (file)
@@ -48,7 +48,7 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare data for the template
-       switch ($CONFIG['admin_menu'])
+       switch ($_CONFIG['admin_menu'])
        {
        case "NEW":
                define('__ADMIN_MENU_NEW', " checked");
index 044e9b7..83a0cd2 100644 (file)
@@ -48,27 +48,27 @@ if (isset($_POST['ok']))
  else
 {
        // Output de-/activation selections
-       define('__AP_INACTIVE_SELECTION'   , ADD_SELECTION("yn", $CONFIG['ap_inactive']   , "autopurge_inactive"));
-       define('__AP_UNCONFIRMED_SELECTION', ADD_SELECTION("yn", $CONFIG['ap_unconfirmed'], "autopurge_unconfirmed"));
-       define('__AP_TASKS_SELECTION'      , ADD_SELECTION("yn", $CONFIG['ap_tasks']      , "autopurge_tasks"));
-       define('__AP_DEL_MAILS_SELECTION'  , ADD_SELECTION("yn", $CONFIG['ap_del_mails']  , "ap_del_mails"));
+       define('__AP_INACTIVE_SELECTION'   , ADD_SELECTION("yn", $_CONFIG['ap_inactive']   , "autopurge_inactive"));
+       define('__AP_UNCONFIRMED_SELECTION', ADD_SELECTION("yn", $_CONFIG['ap_unconfirmed'], "autopurge_unconfirmed"));
+       define('__AP_TASKS_SELECTION'      , ADD_SELECTION("yn", $_CONFIG['ap_tasks']      , "autopurge_tasks"));
+       define('__AP_DEL_MAILS_SELECTION'  , ADD_SELECTION("yn", $_CONFIG['ap_del_mails']  , "ap_del_mails"));
 
        // Output notification selections
-       define('__AP_NOTIFY_INACTIVE'      , ADD_SELECTION("yn", $CONFIG['ap_in_mail']    , "ap_in_notify"));
-       define('__AP_NOTIFY_UNCONFIRMED'   , ADD_SELECTION("yn", $CONFIG['ap_un_mail']    , "ap_un_notify"));
-       define('__AP_NOTIFY_TASKS'         , ADD_SELECTION("yn", $CONFIG['ap_tasks_mail'] , "ap_tasks_notify"));
-       define('__AP_NOTIFY_DEL_MAILS'     , ADD_SELECTION("yn", $CONFIG['ap_dm_notify']  , "ap_dm_notify"));
+       define('__AP_NOTIFY_INACTIVE'      , ADD_SELECTION("yn", $_CONFIG['ap_in_mail']    , "ap_in_notify"));
+       define('__AP_NOTIFY_UNCONFIRMED'   , ADD_SELECTION("yn", $_CONFIG['ap_un_mail']    , "ap_un_notify"));
+       define('__AP_NOTIFY_TASKS'         , ADD_SELECTION("yn", $_CONFIG['ap_tasks_mail'] , "ap_tasks_notify"));
+       define('__AP_NOTIFY_DEL_MAILS'     , ADD_SELECTION("yn", $_CONFIG['ap_dm_notify']  , "ap_dm_notify"));
 
        // Output time selection boxes
-       define('__AP_IN_SINCE'      , CREATE_TIME_SELECTIONS($CONFIG['ap_in_since']  , "ap_inactive_since"  , "MWDh"));
-       define('__AP_IN_TIME'       , CREATE_TIME_SELECTIONS($CONFIG['ap_in_time']   , "ap_inactive_time"   , "MWDh"));
-       define('__AP_UN_TIME'       , CREATE_TIME_SELECTIONS($CONFIG['ap_un_time']   , "ap_unconfirmed_time", "MWDh"));
-       define('__AP_TASK_TIME'     , CREATE_TIME_SELECTIONS($CONFIG['ap_tasks_time'], "ap_tasks_time"      , "MWDh"));
-       define('__AP_DEL_MAILS_TIME', CREATE_TIME_SELECTIONS($CONFIG['ap_dm_timeout'], "ap_dm_timeout"      , "MWDh"));
+       define('__AP_IN_SINCE'      , CREATE_TIME_SELECTIONS($_CONFIG['ap_in_since']  , "ap_inactive_since"  , "MWDh"));
+       define('__AP_IN_TIME'       , CREATE_TIME_SELECTIONS($_CONFIG['ap_in_time']   , "ap_inactive_time"   , "MWDh"));
+       define('__AP_UN_TIME'       , CREATE_TIME_SELECTIONS($_CONFIG['ap_un_time']   , "ap_unconfirmed_time", "MWDh"));
+       define('__AP_TASK_TIME'     , CREATE_TIME_SELECTIONS($_CONFIG['ap_tasks_time'], "ap_tasks_time"      , "MWDh"));
+       define('__AP_DEL_MAILS_TIME', CREATE_TIME_SELECTIONS($_CONFIG['ap_dm_timeout'], "ap_dm_timeout"      , "MWDh"));
 
        // Mail confirmation links
-       define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS($CONFIG['auto_purge'], "auto_purge", "MWD"));
-       if ($CONFIG['auto_purge_active'] == 'N')
+       define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS($_CONFIG['auto_purge'], "auto_purge", "MWD"));
+       if ($_CONFIG['auto_purge_active'] == 'N')
        {
                define('_CFG_AP_ACTIVE_N', " checked");
                define('_CFG_AP_ACTIVE_Y', "");
index df66f24..ede3010 100644 (file)
@@ -52,12 +52,12 @@ if (isset($_POST['ok']))
        ADMIN_SAVE_SETTINGS($_POST);
 
        // Remember new settings
-       $CONFIG['beg_rallye']        = $_POST['beg_rallye'];
-       $CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify'];
-       $CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify'];
+       $_CONFIG['beg_rallye']        = $_POST['beg_rallye'];
+       $_CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify'];
+       $_CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify'];
 
        // Include sending out mails
-       if ((($CONFIG['beg_rallye'] == 'Y') && ($CONFIG['beg_ral_en_notify'] == 'Y')) || (($CONFIG['beg_rallye'] == 'N') && ($CONFIG['beg_ral_di_notify'] == 'Y')))
+       if ((($_CONFIG['beg_rallye'] == 'Y') && ($_CONFIG['beg_ral_en_notify'] == 'Y')) || (($_CONFIG['beg_rallye'] == 'N') && ($_CONFIG['beg_ral_di_notify'] == 'Y')))
        {
                include(PATH."inc/mails/beg_mails.php");
        }
@@ -65,17 +65,17 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare constants for the template
-       define('__BEG_POINTS'           , TRANSLATE_COMMA($CONFIG['beg_points']      , false));
-       define('__BEG_POINTS_MAX'       , TRANSLATE_COMMA($CONFIG['beg_points_max']  , false));
-       define('__BEG_NOTIFY_BONUS'     , TRANSLATE_COMMA($CONFIG['beg_notify_bonus'], false));
-       define('__BEG_TIMEOUT'          , CREATE_TIME_SELECTIONS($CONFIG['beg_timeout']    , "beg_timeout"    , "Dhm"));
-       define('__BEG_UID_TIMEOUT'      , CREATE_TIME_SELECTIONS($CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm"));
-       define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm"));
-       define('__WAIT_SELECTION'       , CREATE_TIME_SELECTIONS($CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" ));
-       define('__BEG_RANKS', $CONFIG['beg_ranks']);
+       define('__BEG_POINTS'           , TRANSLATE_COMMA($_CONFIG['beg_points']      , false));
+       define('__BEG_POINTS_MAX'       , TRANSLATE_COMMA($_CONFIG['beg_points_max']  , false));
+       define('__BEG_NOTIFY_BONUS'     , TRANSLATE_COMMA($_CONFIG['beg_notify_bonus'], false));
+       define('__BEG_TIMEOUT'          , CREATE_TIME_SELECTIONS($_CONFIG['beg_timeout']    , "beg_timeout"    , "Dhm"));
+       define('__BEG_UID_TIMEOUT'      , CREATE_TIME_SELECTIONS($_CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm"));
+       define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm"));
+       define('__WAIT_SELECTION'       , CREATE_TIME_SELECTIONS($_CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" ));
+       define('__BEG_RANKS', $_CONFIG['beg_ranks']);
 
        // Activate / Deactivate beg rallye (Y/N)
-       switch ($CONFIG['beg_rallye'])
+       switch ($_CONFIG['beg_rallye'])
        {
        case 'Y':
                define('__BEG_RALLYE_Y', " checked");
@@ -87,7 +87,7 @@ if (isset($_POST['ok']))
                define('__BEG_RALLYE_N', " checked");
                break;
        }
-       switch ($CONFIG['beg_active'])
+       switch ($_CONFIG['beg_active'])
        {
        case 'Y':
                define('__BEG_ACTIVE_Y', " checked");
@@ -99,7 +99,7 @@ if (isset($_POST['ok']))
                define('__BEG_ACTIVE_N', " checked");
                break;
        }
-       switch ($CONFIG['beg_mode'])
+       switch ($_CONFIG['beg_mode'])
        {
        case "DIRECT":
                define('__BEG_MODE_DIRECT', " checked");
@@ -111,7 +111,7 @@ if (isset($_POST['ok']))
                define('__BEG_MODE_REF'   , " checked");
                break;
        }
-       switch ($CONFIG['beg_ral_en_notify'])
+       switch ($_CONFIG['beg_ral_en_notify'])
        {
        case 'Y':
                define('__BEG_RAL_EN_NOTIFY_Y', " checked");
@@ -123,7 +123,7 @@ if (isset($_POST['ok']))
                define('__BEG_RAL_EN_NOTIFY_N', " checked");
                break;
        }
-       switch ($CONFIG['beg_ral_di_notify'])
+       switch ($_CONFIG['beg_ral_di_notify'])
        {
        case 'Y':
                define('__BEG_RAL_DI_NOTIFY_Y', " checked");
@@ -135,7 +135,7 @@ if (isset($_POST['ok']))
                define('__BEG_RAL_DI_NOTIFY_N', " checked");
                break;
        }
-       switch ($CONFIG['beg_new_mem_notify'])
+       switch ($_CONFIG['beg_new_mem_notify'])
        {
        case 'Y':
                define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");
@@ -147,7 +147,7 @@ if (isset($_POST['ok']))
                define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");
                break;
        }
-       switch ($CONFIG['beg_include_own'])
+       switch ($_CONFIG['beg_include_own'])
        {
        case 'Y':
                define('__BEG_INCLUDE_OWN_Y', " checked");
@@ -161,7 +161,7 @@ if (isset($_POST['ok']))
        }
 
        // Add data to constant __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['beg_uid']);
+       ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['beg_uid']);
 
        // Load form template
        LOAD_TEMPLATE("admin_config_beg");
index 60ff7ee..34eb07a 100644 (file)
@@ -48,8 +48,8 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare data for the template
-       define('__POINTS_VALUE', $CONFIG['birthday_points']);
-       switch ($CONFIG['birthday_active'])
+       define('__POINTS_VALUE', $_CONFIG['birthday_points']);
+       switch ($_CONFIG['birthday_active'])
        {
        case 'Y':
                define('__BIRTHDAY_ACTIVE_Y', " checked");
@@ -61,7 +61,7 @@ if (isset($_POST['ok']))
                define('__BIRTHDAY_ACTIVE_N', " checked");
                break;
        }
-       switch ($CONFIG['birthday_mode'])
+       switch ($_CONFIG['birthday_mode'])
        {
        case "DIRECT":
                define('__BIRTHDAY_MODE_DIRECT', " checked");
index 5c35147..b0b5bc1 100644 (file)
@@ -60,18 +60,18 @@ if (isset($_POST['ok']))
        unset($_POST['rate']);
 
        // Automatically calculate bonus points for ranks 2 and 3 when not set
-       if (empty($_POST['turbo_rates'])) $_POST['turbo_rates'] = "".round($CONFIG['turbo_bonus'] / 2).";".round($CONFIG['turbo_bonus'] / 4)."";
+       if (empty($_POST['turbo_rates'])) $_POST['turbo_rates'] = "".round($_CONFIG['turbo_bonus'] / 2).";".round($_CONFIG['turbo_bonus'] / 4)."";
 
        // Save data
        ADMIN_SAVE_SETTINGS($_POST);
 
        // Remember new settings
-       $CONFIG['bonus_active']    = $_POST['bonus_active'];
-       $CONFIG['bonus_en_notify'] = $_POST['bonus_en_notify'];
-       $CONFIG['bonus_di_notify'] = $_POST['bonus_di_notify'];
+       $_CONFIG['bonus_active']    = $_POST['bonus_active'];
+       $_CONFIG['bonus_en_notify'] = $_POST['bonus_en_notify'];
+       $_CONFIG['bonus_di_notify'] = $_POST['bonus_di_notify'];
 
        // Include sending out mails
-       if ((($CONFIG['bonus_active'] == 'Y') && ($CONFIG['bonus_en_notify'] == 'Y')) || (($CONFIG['bonus_active'] == 'N') && ($CONFIG['bonus_di_notify'] == 'Y')))
+       if ((($_CONFIG['bonus_active'] == 'Y') && ($_CONFIG['bonus_en_notify'] == 'Y')) || (($_CONFIG['bonus_active'] == 'N') && ($_CONFIG['bonus_di_notify'] == 'Y')))
        {
                include(PATH."inc/mails/bonus_mails.php");
        }
@@ -79,23 +79,23 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare contants for the template
-       define('__LOGIN_VALUE' , TRANSLATE_COMMA($CONFIG['login_bonus']        , false));
-       define('__TURBO_VALUE' , TRANSLATE_COMMA($CONFIG['turbo_bonus']        , false));
-       define('__ORDER_VALUE' , TRANSLATE_COMMA($CONFIG['bonus_order']        , false));
-       define('__REF_VALUE'   , TRANSLATE_COMMA($CONFIG['bonus_ref']          , false));
-       define('__STATS_VALUE' , TRANSLATE_COMMA($CONFIG['bonus_stats']        , false));
-       define('__NOTIFY_VALUE', TRANSLATE_COMMA($CONFIG['bonus_notify_points'], false));
-       define('__TRANKS_VALUE', $CONFIG['bonus_ranks']);
-       define('__TLINES_VALUE', $CONFIG['bonus_lines']);
+       define('__LOGIN_VALUE' , TRANSLATE_COMMA($_CONFIG['login_bonus']        , false));
+       define('__TURBO_VALUE' , TRANSLATE_COMMA($_CONFIG['turbo_bonus']        , false));
+       define('__ORDER_VALUE' , TRANSLATE_COMMA($_CONFIG['bonus_order']        , false));
+       define('__REF_VALUE'   , TRANSLATE_COMMA($_CONFIG['bonus_ref']          , false));
+       define('__STATS_VALUE' , TRANSLATE_COMMA($_CONFIG['bonus_stats']        , false));
+       define('__NOTIFY_VALUE', TRANSLATE_COMMA($_CONFIG['bonus_notify_points'], false));
+       define('__TRANKS_VALUE', $_CONFIG['bonus_ranks']);
+       define('__TLINES_VALUE', $_CONFIG['bonus_lines']);
 
        // Transfer options to template __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['bonus_uid']);
+       ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['bonus_uid']);
 
        // Initialize array for the points list
-       $RANKS = explode(";", $CONFIG['bonus_rates']);
+       $RANKS = explode(";", $_CONFIG['bonus_rates']);
 
        // Automatically calculate bonus points for ranks 2 and 3 when not set
-       if (empty($CONFIG['bonus_rates'])) $RANKS = array(round($CONFIG['turbo_bonus'] / 2), round($CONFIG['turbo_bonus'] / 4));
+       if (empty($_CONFIG['bonus_rates'])) $RANKS = array(round($_CONFIG['turbo_bonus'] / 2), round($_CONFIG['turbo_bonus'] / 4));
 
        // Generate list
        $OUT = "<OL start=\"2\">\n";
@@ -114,12 +114,12 @@ if (isset($_POST['ok']))
        $OUT .= "</OL>\n";
        define('__TRATES_LIST', $OUT);
 
-       define('__LOGIN_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['login_timeout']    , "login_timeout"    , "WDh"));
-       define('__BONUS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['bonus_timeout']    , "bonus_timeout"    , "WDh"));
-       define('__WAIT_SELECTION'         , CREATE_TIME_SELECTIONS($CONFIG['bonus_notify_wait'], "bonus_notify_wait", "ms" ));
+       define('__LOGIN_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['login_timeout']    , "login_timeout"    , "WDh"));
+       define('__BONUS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['bonus_timeout']    , "bonus_timeout"    , "WDh"));
+       define('__WAIT_SELECTION'         , CREATE_TIME_SELECTIONS($_CONFIG['bonus_notify_wait'], "bonus_notify_wait", "ms" ));
 
        // Activate / Deactivate bonus active rallye (Y/N)
-       switch ($CONFIG['bonus_active'])
+       switch ($_CONFIG['bonus_active'])
        {
        case 'Y':
                define('__BONUS_ACTIVE_Y', " checked");
@@ -132,7 +132,7 @@ if (isset($_POST['ok']))
                break;
        }
        // Other bonus to de-/activate
-       switch ($CONFIG['bonus_login_yn'])
+       switch ($_CONFIG['bonus_login_yn'])
        {
        case 'Y':
                define('__BONUS_LOGIN_Y', " checked");
@@ -144,7 +144,7 @@ if (isset($_POST['ok']))
                define('__BONUS_LOGIN_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_stats_yn'])
+       switch ($_CONFIG['bonus_stats_yn'])
        {
        case 'Y':
                define('__BONUS_STATS_Y', " checked");
@@ -156,7 +156,7 @@ if (isset($_POST['ok']))
                define('__BONUS_STATS_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_order_yn'])
+       switch ($_CONFIG['bonus_order_yn'])
        {
        case 'Y':
                define('__BONUS_ORDER_Y', " checked");
@@ -168,7 +168,7 @@ if (isset($_POST['ok']))
                define('__BONUS_ORDER_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_ref_yn'])
+       switch ($_CONFIG['bonus_ref_yn'])
        {
        case 'Y':
                define('__BONUS_REF_Y', " checked");
@@ -180,7 +180,7 @@ if (isset($_POST['ok']))
                define('__BONUS_REF_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_click_yn'])
+       switch ($_CONFIG['bonus_click_yn'])
        {
        case 'Y':
                define('__BONUS_CLICK_Y', " checked");
@@ -192,7 +192,7 @@ if (isset($_POST['ok']))
                define('__BONUS_CLICK_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_en_notify'])
+       switch ($_CONFIG['bonus_en_notify'])
        {
        case 'Y':
                define('__BONUS_EN_NOTIFY_Y', " checked");
@@ -204,7 +204,7 @@ if (isset($_POST['ok']))
                define('__BONUS_EN_NOTIFY_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_di_notify'])
+       switch ($_CONFIG['bonus_di_notify'])
        {
        case 'Y':
                define('__BONUS_DI_NOTIFY_Y', " checked");
@@ -216,7 +216,7 @@ if (isset($_POST['ok']))
                define('__BONUS_DI_NOTIFY_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_new_mem_notify'])
+       switch ($_CONFIG['bonus_new_mem_notify'])
        {
        case 'Y':
                define('__BONUS_NEW_MEMBER_NOTIFY_Y', " checked");
@@ -228,7 +228,7 @@ if (isset($_POST['ok']))
                define('__BONUS_NEW_MEMBER_NOTIFY_N', " checked");
                break;
        }
-       switch ($CONFIG['bonus_include_own'])
+       switch ($_CONFIG['bonus_include_own'])
        {
        case 'Y':
                define('__BONUS_INCLUDE_OWN_Y', " checked");
index 3de2ab0..9b1851b 100644 (file)
@@ -46,7 +46,7 @@ if (isset($_POST['ok']))
        $_POST['cache_tested'] = 'N';
 
        // Check if path has been changed
-       if ($_POST['cache_path'] != $CONFIG['cache_path'])
+       if ($_POST['cache_path'] != $_CONFIG['cache_path'])
        {
                // Okay, cache path has been altered so we have to test it again!
                $_POST['cache_tested'] = 'Y';
@@ -88,42 +88,42 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare data
-       switch ($CONFIG['cache_admins'])
+       switch ($_CONFIG['cache_admins'])
        {
                case 'Y': define('__ADMINS_Y', " checked"); define('__ADMINS_N', "");         break;
                case 'N': define('__ADMINS_Y', "");         define('__ADMINS_N', " checked"); break;
        }
-       switch ($CONFIG['cache_acls'])
+       switch ($_CONFIG['cache_acls'])
        {
                case 'Y': define('__ACLS_Y', " checked"); define('__ACLS_N', "");         break;
                case 'N': define('__ACLS_Y', "");         define('__ACLS_N', " checked"); break;
        }
-       switch ($CONFIG['cache_exts'])
+       switch ($_CONFIG['cache_exts'])
        {
                case 'Y': define('__EXTS_Y', " checked"); define('__EXTS_N', "");         break;
                case 'N': define('__EXTS_Y', "");         define('__EXTS_N', " checked"); break;
        }
-       switch ($CONFIG['cache_config'])
+       switch ($_CONFIG['cache_config'])
        {
                case 'Y': define('__CONFIG_Y', " checked"); define('__CONFIG_N', "");         break;
                case 'N': define('__CONFIG_Y', "");         define('__CONFIG_N', " checked"); break;
        }
-       switch ($CONFIG['cache_modreg'])
+       switch ($_CONFIG['cache_modreg'])
        {
                case 'Y': define('__MODREG_Y', " checked"); define('__MODREG_N', "");         break;
                case 'N': define('__MODREG_Y', "");         define('__MODREG_N', " checked"); break;
        }
-       switch ($CONFIG['cache_refdepth'])
+       switch ($_CONFIG['cache_refdepth'])
        {
                case 'Y': define('__REFDEPTH_Y', " checked"); define('__REFDEPTH_N', "");         break;
                case 'N': define('__REFDEPTH_Y', "");         define('__REFDEPTH_N', " checked"); break;
        }
-       switch ($CONFIG['cache_refsys'])
+       switch ($_CONFIG['cache_refsys'])
        {
                case 'Y': define('__REFSYS_Y', " checked"); define('__REFSYS_N', "");         break;
                case 'N': define('__REFSYS_Y', "");         define('__REFSYS_N', " checked"); break;
        }
-       define('__PATH', $CONFIG['cache_path']);
+       define('__PATH', $_CONFIG['cache_path']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_cache");
index 09c95b1..e835bbd 100644 (file)
@@ -56,22 +56,22 @@ if (isset($_POST['ok']))
 {
        // Prepare data for the template
        // - Charge rate
-       define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($CONFIG['doubler_charge'] * 100), false));
+       define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($_CONFIG['doubler_charge'] * 100), false));
        // - Referral rate
-       define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($CONFIG['doubler_ref'] * 100), false));
+       define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($_CONFIG['doubler_ref'] * 100), false));
        // - Minimum points to double
-       define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($CONFIG['doubler_min'], false));
+       define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($_CONFIG['doubler_min'], false));
        // - Maximum points to double
-       define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($CONFIG['doubler_max'], false));
+       define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($_CONFIG['doubler_max'], false));
        // - Points left on users account after doubling
-       define('__DOUBLER_LEFT', TRANSLATE_COMMA($CONFIG['doubler_left'], false));
+       define('__DOUBLER_LEFT', TRANSLATE_COMMA($_CONFIG['doubler_left'], false));
        // - Max payouts to check per click/reset
-       define('__DOUBLER_MAX_SENT', $CONFIG['doubler_max_sent']);
+       define('__DOUBLER_MAX_SENT', $_CONFIG['doubler_max_sent']);
        // - Group sending
-       define('__DOUBLER_GROUP_SENT', $CONFIG['doubler_group_sent']);
+       define('__DOUBLER_GROUP_SENT', $_CONFIG['doubler_group_sent']);
 
        // Take points from jackpot (Y/N)
-       switch ($CONFIG['doubler_jackpot'])
+       switch ($_CONFIG['doubler_jackpot'])
        {
        case 'Y':
                define('__DOUBLER_JACKPOT_Y', " checked");
@@ -85,7 +85,7 @@ if (isset($_POST['ok']))
        }
 
        // Take points from own account (Y/N)
-       switch ($CONFIG['doubler_own'])
+       switch ($_CONFIG['doubler_own'])
        {
        case 'Y':
                define('__DOUBLER_OWN_Y', " checked");
@@ -99,7 +99,7 @@ if (isset($_POST['ok']))
        }
 
        // Mail send mode
-       switch ($CONFIG['doubler_send_mode'])
+       switch ($_CONFIG['doubler_send_mode'])
        {
        case "DIRECT":
                define('__DOUBLER_SEND_DIRECT', " checked");
@@ -113,7 +113,7 @@ if (isset($_POST['ok']))
        }
 
        // Take points from own account (Y/N)
-       switch ($CONFIG['doubler_sent_all'])
+       switch ($_CONFIG['doubler_sent_all'])
        {
        case 'Y':
                define('__DOUBLER_SENT_ALL_Y', " checked");
@@ -127,15 +127,15 @@ if (isset($_POST['ok']))
        }
 
        // Transfer options (!!!) to __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['doubler_uid']);
+       ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['doubler_uid']);
 
        // Number of rows to display (option lines!!!)
-       define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $CONFIG['doubler_display_new']));
-       define('__DOUBLER_DISPLAY_PAY', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $CONFIG['doubler_display_pay']));
-       define('__DOUBLER_DISPLAY_OLD', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $CONFIG['doubler_display_old']));
+       define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_new']));
+       define('__DOUBLER_DISPLAY_PAY', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_pay']));
+       define('__DOUBLER_DISPLAY_OLD', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_old']));
 
        // Timeout selection box or input box?
-       define('__DOUBLER_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['doubler_timeout']  , "doubler_timeout"  , "WDh"));
+       define('__DOUBLER_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['doubler_timeout']  , "doubler_timeout"  , "WDh"));
 
        // Load template
        LOAD_TEMPLATE("admin_config_doubler");
index e941a3b..c65d3d2 100644 (file)
@@ -48,7 +48,7 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare data
-       switch ($CONFIG['verbose_sql'])
+       switch ($_CONFIG['verbose_sql'])
        {
                case 'Y': define('__VERBOSE_Y', " checked"); define('__VERBOSE_N', "");         break;
                case 'N': define('__VERBOSE_Y', "");         define('__VERBOSE_N', " checked"); break;
index e903b62..b11db02 100644 (file)
@@ -48,9 +48,9 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare constants for the template
-       define('__MAX_VALUE', $CONFIG['holiday_max']);
-       define('__LOCKED'   , CREATE_TIME_SELECTIONS($CONFIG['holiday_lock']  , "holiday_lock"  , "WDh"));
-       switch ($CONFIG['holiday_mode'])
+       define('__MAX_VALUE', $_CONFIG['holiday_max']);
+       define('__LOCKED'   , CREATE_TIME_SELECTIONS($_CONFIG['holiday_lock']  , "holiday_lock"  , "WDh"));
+       switch ($_CONFIG['holiday_mode'])
        {
        case "RESET":
                define('__RESET_DEFAULT' , " checked");
index e606232..6ce223e 100644 (file)
@@ -60,9 +60,9 @@ case "settings": // Settings related to the index page
        {
                // Prepare data for the template
                $content = array_fill(-1, 60, "");
-               $content[$CONFIG['index_delay']] = " selected=\"selected\"";
+               $content[$_CONFIG['index_delay']] = " selected=\"selected\"";
 
-               define('__INDEX_COOKIE_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['index_cookie'], "index_cookie", "YMWD"));
+               define('__INDEX_COOKIE_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['index_cookie'], "index_cookie", "YMWD"));
                LOAD_TEMPLATE("admin_config_home_settings", false, $content);
        }
        break;
@@ -72,7 +72,7 @@ case "target": // Set which what-file will be placed in home-page (only modules.
        {
                // Set new home
                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET index_home='%s' WHERE config='0' LIMIT 1", array($_GET['home']), __FILE__, __LINE__);
-               $CONFIG['index_home'] = $_GET['home'];
+               $_CONFIG['index_home'] = $_GET['home'];
        }
 
        // Load all what menu points
@@ -85,7 +85,7 @@ case "target": // Set which what-file will be placed in home-page (only modules.
        while (list($id, $wht, $wtitle) = SQL_FETCHROW($result))
        {
                $LINK = "<A href=\"".URL."/modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=".$wht."\">"._IS_NEW_HOME."</A>";
-               if ($wht == $CONFIG['index_home'])
+               if ($wht == $_CONFIG['index_home'])
                {
                        // Is current home
                        $LINK   = "<STRONG class=\"admin_note\">"._IS_CURRENT_HOME."</STRONG>";
index 6dfdbcd..d7c7f82 100644 (file)
@@ -77,10 +77,10 @@ if (isset($_POST['ok']))
  else
 {
        // Start of this exchange
-       if ($CONFIG['mt_start'] > 0)
+       if ($_CONFIG['mt_start'] > 0)
        {
                // Only show start
-               define('__MT_START', "<STRONG>".MAKE_DATETIME($CONFIG['mt_start'], "3")."</STRONG>");
+               define('__MT_START', "<STRONG>".MAKE_DATETIME($_CONFIG['mt_start'], "3")."</STRONG>");
        }
         else
        {
@@ -93,7 +93,7 @@ if (isset($_POST['ok']))
        }
 
        // Next stage of this MT
-       define('__MT_STAGE', $CONFIG['mt_stage']);
+       define('__MT_STAGE', $_CONFIG['mt_stage']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_mediadata");
index 9abc620..f169c3b 100644 (file)
@@ -51,7 +51,7 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare contants for the template
-       define('__CHARGE_VALUE'  , TRANSLATE_COMMA($CONFIG['nl_charge'], false));
+       define('__CHARGE_VALUE'  , TRANSLATE_COMMA($_CONFIG['nl_charge'], false));
 
        // Prepare constants and load template
        LOAD_TEMPLATE("admin_config_newsletter", false);
index f8b8da5..239c30c 100644 (file)
@@ -48,7 +48,7 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare constants for the template
-       switch ($CONFIG['order_max'])
+       switch ($_CONFIG['order_max'])
        {
        case "ORDER":
                define('__ORDER_DEFAULT', " checked");
@@ -62,10 +62,10 @@ if (isset($_POST['ok']))
        }
 
        // Minimum mails / order
-       define('__MIN_VALUE', $CONFIG['order_min']);
+       define('__MIN_VALUE', $_CONFIG['order_min']);
 
        // Sorting mode (ascending / descending)
-       switch ($CONFIG['order_mode'])
+       switch ($_CONFIG['order_mode'])
        {
        case "ASC":
                define('__ASC_DEFAULT' , " selected=\"selected\"");
@@ -79,7 +79,7 @@ if (isset($_POST['ok']))
        }
 
        // Selection list
-       define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($CONFIG['order_select']));
+       define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($_CONFIG['order_select']));
 
        // Load template
        LOAD_TEMPLATE("admin_config_order");
index eb64e61..91ddaec 100644 (file)
@@ -84,35 +84,35 @@ if (isset($_POST['ok']))
 }
  else
 {
-       // Transfer config data into constants for the template (DO NOT set $CONFIG as global in LOAD_TEMPLATE!!!)
-       define('_CFG_UNCONFIRMED'   , $CONFIG['unconfirmed']);
-       define('_CFG_MAX_TLENGTH'   , $CONFIG['max_tlength']);
-       define('_CFG_CODE_LENGTH'   , $CONFIG['code_length']);
-       define('_CFG_ACT_SYSTEM'    , $CONFIG['activate_xchange']);
-       define('_CFG_MAX_SEND'      , $CONFIG['max_send']);
-       define('_CFG_REJECT_URL'    , $CONFIG['reject_url']);
+       // Transfer config data into constants for the template (DO NOT set $_CONFIG as global in LOAD_TEMPLATE!!!)
+       define('_CFG_UNCONFIRMED'   , $_CONFIG['unconfirmed']);
+       define('_CFG_MAX_TLENGTH'   , $_CONFIG['max_tlength']);
+       define('_CFG_CODE_LENGTH'   , $_CONFIG['code_length']);
+       define('_CFG_ACT_SYSTEM'    , $_CONFIG['activate_xchange']);
+       define('_CFG_MAX_SEND'      , $_CONFIG['max_send']);
+       define('_CFG_REJECT_URL'    , $_CONFIG['reject_url']);
 
        // Is there the pro-version function avaiable to create selection boxes instead of input boxes?
        if (function_exists('CREATE_TIME_SELECTIONS'))
        {
                // Only pro versions: time selection boxes
-               define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['online_timeout'], "ip_timeout"           , "ms"));
-               define('_CFG_URL_TLOCK'     , CREATE_TIME_SELECTIONS($CONFIG['url_tlock']     , "url_tlock"            , "WDh"));
-               define('_CFG_PROFILE_LOCK'  , CREATE_TIME_SELECTIONS($CONFIG['profile_lock']  , "profile_lock"         , "WDh"));
-               define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($CONFIG['profile_update'], "profile_update"       , "YM"));
-               define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($CONFIG['resend_profile_update'] , "resend_profile_update", "MWD"));
+               define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['online_timeout'], "ip_timeout"           , "ms"));
+               define('_CFG_URL_TLOCK'     , CREATE_TIME_SELECTIONS($_CONFIG['url_tlock']     , "url_tlock"            , "WDh"));
+               define('_CFG_PROFILE_LOCK'  , CREATE_TIME_SELECTIONS($_CONFIG['profile_lock']  , "profile_lock"         , "WDh"));
+               define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($_CONFIG['profile_update'], "profile_update"       , "YM"));
+               define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($_CONFIG['resend_profile_update'] , "resend_profile_update", "MWD"));
        }
         else
        {
                // Normal input boxes
-               define('_CFG_ONLINE_TIMEOUT', "<INPUT type=\"text\" name=\"online_timeout\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$CONFIG['online_timeout']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
-               define('_CFG_URL_TLOCK'     , "<INPUT type=\"text\" name=\"url_tlock\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$CONFIG['url_tlock']     ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
-               define('_CFG_PROFILE_LOCK'  , "<INPUT type=\"text\" name=\"profile_lock\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$CONFIG['profile_lock']  ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
-               define('_CFG_PROFILE_UPDATE', "<INPUT type=\"text\" name=\"profile_update\" class=\"admin_normal\" size=\"10\" maxlength=\"255\" value=\"".$CONFIG['profile_update']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
-               define('_CFG_PROF_REUPDATE' , "<INPUT type=\"text\" name=\"resend_profile_update\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$CONFIG['resend_profile_update'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+               define('_CFG_ONLINE_TIMEOUT', "<INPUT type=\"text\" name=\"online_timeout\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['online_timeout']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+               define('_CFG_URL_TLOCK'     , "<INPUT type=\"text\" name=\"url_tlock\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['url_tlock']     ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+               define('_CFG_PROFILE_LOCK'  , "<INPUT type=\"text\" name=\"profile_lock\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['profile_lock']  ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+               define('_CFG_PROFILE_UPDATE', "<INPUT type=\"text\" name=\"profile_update\" class=\"admin_normal\" size=\"10\" maxlength=\"255\" value=\"".$_CONFIG['profile_update']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+               define('_CFG_PROF_REUPDATE' , "<INPUT type=\"text\" name=\"resend_profile_update\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['resend_profile_update'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
        }
 
-       if ($CONFIG['test_text'] == 'N')
+       if ($_CONFIG['test_text'] == 'N')
        {
                define('_CFG_TEST_TEXT_N', " checked");
                define('_CFG_TEST_TEXT_Y', "");
@@ -122,7 +122,7 @@ if (isset($_POST['ok']))
                define('_CFG_TEST_TEXT_N', "");
                define('_CFG_TEST_TEXT_Y', " checked");
        }
-       if ($CONFIG['test_subj'] == 'N')
+       if ($_CONFIG['test_subj'] == 'N')
        {
                define('_CFG_TEST_SUBJ_N', " checked");
                define('_CFG_TEST_SUBJ_Y', "");
@@ -132,7 +132,7 @@ if (isset($_POST['ok']))
                define('_CFG_TEST_SUBJ_N', "");
                define('_CFG_TEST_SUBJ_Y', " checked");
        }
-       if ($CONFIG['url_blacklist'] == 'N')
+       if ($_CONFIG['url_blacklist'] == 'N')
        {
                define('_CFG_URL_BLIST_N', " checked");
                define('_CFG_URL_BLIST_Y', "");
@@ -142,7 +142,7 @@ if (isset($_POST['ok']))
                define('_CFG_URL_BLIST_N', "");
                define('_CFG_URL_BLIST_Y', " checked");
        }
-       if ($CONFIG['order_multi_page'] == 'N')
+       if ($_CONFIG['order_multi_page'] == 'N')
        {
                define('_CFG_ORDER_MULTI_N', " checked");
                define('_CFG_ORDER_MULTI_Y', "");
@@ -152,7 +152,7 @@ if (isset($_POST['ok']))
                define('_CFG_ORDER_MULTI_N', "");
                define('_CFG_ORDER_MULTI_Y', " checked");
        }
-       if ($CONFIG['autosend_active'] == 'N')
+       if ($_CONFIG['autosend_active'] == 'N')
        {
                define('_CFG_AUTOSEND_ACTIVE_N', " checked");
                define('_CFG_AUTOSEND_ACTIVE_Y', "");
@@ -162,7 +162,7 @@ if (isset($_POST['ok']))
                define('_CFG_AUTOSEND_ACTIVE_N', "");
                define('_CFG_AUTOSEND_ACTIVE_Y', " checked");
        }
-       if ($CONFIG['send_prof_update'] == 'N')
+       if ($_CONFIG['send_prof_update'] == 'N')
        {
                define('_CFG_SEND_UPDATE_N', " checked");
                define('_CFG_SEND_UPDATE_Y', "");
@@ -172,7 +172,7 @@ if (isset($_POST['ok']))
                define('_CFG_SEND_UPDATE_N', "");
                define('_CFG_SEND_UPDATE_Y', " checked");
        }
-       if ($CONFIG['admin_notify'] == 'N')
+       if ($_CONFIG['admin_notify'] == 'N')
        {
                define('_CFG_ADMIN_NOTIFY_N', " checked");
                define('_CFG_ADMIN_NOTIFY_Y', "");
@@ -182,7 +182,7 @@ if (isset($_POST['ok']))
                define('_CFG_ADMIN_NOTIFY_N', "");
                define('_CFG_ADMIN_NOTIFY_Y', " checked");
        }
-       if ($CONFIG['css_php'] == "DIRECT")
+       if ($_CONFIG['css_php'] == "DIRECT")
        {
                define('_CFG_CSS_PHP_DIRECT', " checked");
                define('_CFG_CSS_PHP_FILE', "");
@@ -192,28 +192,28 @@ if (isset($_POST['ok']))
                define('_CFG_CSS_PHP_DIRECT', "");
                define('_CFG_CSS_PHP_FILE', " checked");
        }
-       if ($CONFIG['guest_menu'] == 'Y') {
+       if ($_CONFIG['guest_menu'] == 'Y') {
                define('_CFG_GUEST_MENU_ACTIVE', " checked");
                define('_CFG_GUEST_MENU_INACTIVE', "");
        } else {
                define('_CFG_GUEST_MENU_ACTIVE', "");
                define('_CFG_GUEST_MENU_INACTIVE', " checked");
        }
-       if ($CONFIG['member_menu'] == 'Y') {
+       if ($_CONFIG['member_menu'] == 'Y') {
                define('_CFG_MEMBER_MENU_ACTIVE', " checked");
                define('_CFG_MEMBER_MENU_INACTIVE', "");
        } else {
                define('_CFG_MEMBER_MENU_ACTIVE', "");
                define('_CFG_MEMBER_MENU_INACTIVE', " checked");
        }
-       if ($CONFIG['youre_here'] == 'Y') {
+       if ($_CONFIG['youre_here'] == 'Y') {
                define('_CFG_YOURE_HERE_ACTIVE', " checked");
                define('_CFG_YOURE_HERE_INACTIVE', "");
        } else {
                define('_CFG_YOURE_HERE_ACTIVE', "");
                define('_CFG_YOURE_HERE_INACTIVE', " checked");
        }
-       if ($CONFIG['show_timings'] == 'Y') {
+       if ($_CONFIG['show_timings'] == 'Y') {
                define('_CFG_FOOTER_STATS_Y', " checked");
                define('_CFG_FOOTER_STATS_N', "");
        } else {
@@ -224,7 +224,7 @@ if (isset($_POST['ok']))
        for ($i = 0; $i <= 5; $i++)
        {
                $eval = "define('_COMMA_DEF_".$i."', \"\");";
-               if ($CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");";
+               if ($_CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");";
                eval($eval);
        }
 
index a0171fc..8930f89 100644 (file)
@@ -129,13 +129,13 @@ WHERE config='0' LIMIT 1",
  $_POST['reg_points_mode'],
  $REF
                );
-               if (($CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
+               if (($_CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
                {
                        // Update account's ref_payout for "must-confirm"
                        $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=(%d - mails_confirmed)
 WHERE mails_confirmed < %d", $REF, $REF);
                }
-                elseif (($CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
+                elseif (($_CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
                {
                        // Update account's ref_payout for "not-must-confirm"
                        $SQL[] = "UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=0 WHERE ref_payout > 0";
@@ -185,7 +185,7 @@ WHERE mails_confirmed < %d", $REF, $REF);
 {
        // Setup some settings like direct pay and so on
        // Including new add-mode for one-time referral bonus
-       switch ($CONFIG['allow_direct_pay'])
+       switch ($_CONFIG['allow_direct_pay'])
        {
        case 'Y':
                define('__DIRECT_Y', " checked");
@@ -199,14 +199,14 @@ WHERE mails_confirmed < %d", $REF, $REF);
        }
 
        // One-time referral bonus add-mode
-       switch ($CONFIG['reg_points_mode'])
+       switch ($_CONFIG['reg_points_mode'])
        {
                case "ref"   : define('__MODE_REF', " checked"); define('__MODE_DIRECT', "");         break;
                case "direct": define('__MODE_REF', "");         define('__MODE_DIRECT', " checked"); break;
        }
 
        // Referral payout value
-       define('__REF_PAYOUT', round($CONFIG['ref_payout']));
+       define('__REF_PAYOUT', round($_CONFIG['ref_payout']));
 
        // Load template
        LOAD_TEMPLATE("admin_config_point_settings");
@@ -309,8 +309,8 @@ WHERE mails_confirmed < %d", $REF, $REF);
  elseif ($_GET['sub'] == "points")
 {
        // First points for registration and other fixed points including new add-mode for one-time referral bonus...
-       define('P_REG_VALUE', $CONFIG['points_register']);
-       define('P_REF_VALUE', $CONFIG['points_ref']);
+       define('P_REG_VALUE', $_CONFIG['points_register']);
+       define('P_REF_VALUE', $_CONFIG['points_ref']);
 
        // Load templates
        LOAD_TEMPLATE("admin_config_sub_points");
index 16d8b3f..1ecb724 100644 (file)
@@ -48,9 +48,9 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare contants for the template
-       ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['def_refid']);
+       ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['def_refid']);
 
-       switch ($CONFIG['refid_target'])
+       switch ($_CONFIG['refid_target'])
        {
                case "index":    define('__DEF_RT_INDEX', " selected=\"selected\""); define('__DEF_RT_REGISTER', "");          break;
                case "register": define('__DEF_RT_INDEX', "");          define('__DEF_RT_REGISTER', " selected=\"selected\""); break;
index a7ae62d..116980d 100644 (file)
@@ -62,12 +62,12 @@ if (isset($_POST['ok']))
  else
 {
        // Remember stuff in constants
-       define('LEAST_CATS_VALUE'   , $CONFIG['least_cats']);
-       define('__CFG_SHOW_REFID'   , ADD_SELECTION("yn", $CONFIG['display_refid'], "display_refid"));
-       define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['ip_timeout'], "ip_timeout", "Dhm"));
-       define('__CFG_DBL_EMAIL'    , ADD_SELECTION("yn", $CONFIG['check_double_email'], "check_double_email"));
-       define('__CFG_DBL_PASS'     , ADD_SELECTION("yn", $CONFIG['check_double_pass'] , "check_double_pass"));
-       define('__REF_PAYOUT'       , $CONFIG['ref_payout']);
+       define('LEAST_CATS_VALUE'   , $_CONFIG['least_cats']);
+       define('__CFG_SHOW_REFID'   , ADD_SELECTION("yn", $_CONFIG['display_refid'], "display_refid"));
+       define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['ip_timeout'], "ip_timeout", "Dhm"));
+       define('__CFG_DBL_EMAIL'    , ADD_SELECTION("yn", $_CONFIG['check_double_email'], "check_double_email"));
+       define('__CFG_DBL_PASS'     , ADD_SELECTION("yn", $_CONFIG['check_double_pass'] , "check_double_pass"));
+       define('__REF_PAYOUT'       , $_CONFIG['ref_payout']);
 
        // Load normal template
        LOAD_TEMPLATE("admin_config_reg");
index e87b966..bcf85c5 100644 (file)
@@ -56,12 +56,12 @@ if (isset($_POST['ok']))
  else
 {
        // Remember stuff in constants
-       define('LEAST_CATS_VALUE'   , round($CONFIG['least_cats']));
-       define('__CFG_SHOW_REFID'   , ADD_SELECTION("yn", $CONFIG['display_refid']   , "display_refid"));
-       define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['ip_timeout']   , "ip_timeout", "Dhm"));
-       define('__CFG_DBL_EMAIL'    , ADD_SELECTION("yn", $CONFIG['check_double_email']       , "check_double_email"));
-       define('__CFG_DBL_PASS'     , ADD_SELECTION("yn", $CONFIG['check_double_pass']        , "check_double_pass"));
-       define('__CFG_CAT_DEFAULT'  , ADD_SELECTION("yn", $CONFIG['register_default'], "register_default"));
+       define('LEAST_CATS_VALUE'   , round($_CONFIG['least_cats']));
+       define('__CFG_SHOW_REFID'   , ADD_SELECTION("yn", $_CONFIG['display_refid']   , "display_refid"));
+       define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['ip_timeout']   , "ip_timeout", "Dhm"));
+       define('__CFG_DBL_EMAIL'    , ADD_SELECTION("yn", $_CONFIG['check_double_email']       , "check_double_email"));
+       define('__CFG_DBL_PASS'     , ADD_SELECTION("yn", $_CONFIG['check_double_pass']        , "check_double_pass"));
+       define('__CFG_CAT_DEFAULT'  , ADD_SELECTION("yn", $_CONFIG['register_default'], "register_default"));
 
        // Load normal template
        LOAD_TEMPLATE("admin_config_register2");
index a1e728b..8fa8a3a 100644 (file)
@@ -72,7 +72,7 @@ if (isset($_POST['ok']))
                if (empty($title)) $title = "---";
 
                // Already registered module?
-               if (ereg($mod, $CONFIG['rewrite_skipped_mods']))
+               if (ereg($mod, $_CONFIG['rewrite_skipped_mods']))
                {
                        // Found
                        $y = " checked";
index 2ad3c4b..07011ba 100644 (file)
@@ -54,7 +54,7 @@ if (isset($_POST['ok']))
                unset($_POST['salt_length']);
 
                // Redirect to logout link
-               LOAD_URL(URL."/modules.php?module=admin&logout=1");
+               LOAD_URL("modules.php?module=admin&logout=1");
        }
 
        // Save settings
@@ -63,10 +63,10 @@ if (isset($_POST['ok']))
  else
 {
        // Remember stuff in constants
-       define('__PASS_LEN'   , $CONFIG['pass_len']);
+       define('__PASS_LEN'   , $_CONFIG['pass_len']);
 
        // Password-salt length
-       define('__SALT_LENGTH', $CONFIG['salt_length']);
+       define('__SALT_LENGTH', $_CONFIG['salt_length']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_secure");
index 7caf135..155a72c 100644 (file)
@@ -48,7 +48,7 @@ if (isset($_POST['ok']))
  else
 {
        // Guest stats
-       switch (strtolower($CONFIG['guest_stats']))
+       switch (strtolower($_CONFIG['guest_stats']))
        {
        case "members":
                define('__MEMBERS_RADIO', " checked selected");
@@ -70,7 +70,7 @@ if (isset($_POST['ok']))
        }
 
        // Max stats entries per page
-       define('__STATS_LIMIT', $CONFIG['stats_limit']);
+       define('__STATS_LIMIT', $_CONFIG['stats_limit']);
 
        // Load template
        LOAD_TEMPLATE("admin_config_stats");
index 68bac70..322be77 100644 (file)
@@ -48,12 +48,12 @@ if (isset($_POST['ok']))
  else
 {
        // Remember config data in constants for the template
-       define('__CFG_TITLE_LEFT'     , $CONFIG['title_left']);
-       define('__CFG_TITLE_MIDDLE'   , $CONFIG['title_middle']);
-       define('__CFG_TITLE_RIGHT'    , $CONFIG['title_right']);
-       define('__CFG_TITLE_DECOS'    , ADD_SELECTION("yn", $CONFIG['title_decoration'], "enable_title_deco"));
-       define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $CONFIG['title_mod_show']  , "enable_mod_title" ));
-       define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $CONFIG['title_what_show']  , "enable_what_title"));
+       define('__CFG_TITLE_LEFT'     , $_CONFIG['title_left']);
+       define('__CFG_TITLE_MIDDLE'   , $_CONFIG['title_middle']);
+       define('__CFG_TITLE_RIGHT'    , $_CONFIG['title_right']);
+       define('__CFG_TITLE_DECOS'    , ADD_SELECTION("yn", $_CONFIG['title_decoration'], "enable_title_deco"));
+       define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $_CONFIG['title_mod_show']  , "enable_mod_title" ));
+       define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $_CONFIG['title_what_show']  , "enable_what_title"));
 
        // Load template
        LOAD_TEMPLATE("admin_config_title");
index da7d1e6..507f8a1 100644 (file)
@@ -48,7 +48,7 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare constants for the template
-       define('__MAX_VALUE', $CONFIG['top10_max']);
+       define('__MAX_VALUE', $_CONFIG['top10_max']);
 
        // Load form template
        LOAD_TEMPLATE("admin_config_top10");
index d6dee9d..8368e70 100644 (file)
@@ -47,20 +47,20 @@ if (isset($_POST['ok']))
 }
 
 // Prepare constants for template
-define('__TRANS_MAX_VALUE'    , $CONFIG['transfer_max']);
-define('__TRANS_BALANCE_VALUE', $CONFIG['transfer_balance']);
-define('__TRANS_CODE_VALUE'   , $CONFIG['transfer_code']);
+define('__TRANS_MAX_VALUE'    , $_CONFIG['transfer_max']);
+define('__TRANS_BALANCE_VALUE', $_CONFIG['transfer_balance']);
+define('__TRANS_CODE_VALUE'   , $_CONFIG['transfer_code']);
 
 // Autppurge expired transfer entries?
-switch ($CONFIG['ap_inactive'])
+switch ($_CONFIG['ap_inactive'])
 {
        case 'Y': define('__YES_AP', " selected=\"selected\""); define('__NO_AP', "");          break;
        case 'N': define('__YES_AP', "");          define('__NO_AP', " selected=\"selected\""); break;
 }
 
 // Time selection box
-define('__TRANS_AGE_SELECTION'    , CREATE_TIME_SELECTIONS($CONFIG['transfer_age'], "transfer_age", "MWDh"));
-define('__TRANS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['transfer_timeout'], "transfer_timeout", "MWDh"));
+define('__TRANS_AGE_SELECTION'    , CREATE_TIME_SELECTIONS($_CONFIG['transfer_age'], "transfer_age", "MWDh"));
+define('__TRANS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['transfer_timeout'], "transfer_timeout", "MWDh"));
 
 // Load template
 LOAD_TEMPLATE("admin_config_transfer");
index 7cd3c43..dd108a8 100644 (file)
@@ -48,8 +48,8 @@ if (isset($_POST['ok']))
  else
 {
        // Prepare constants for the template
-       define('__LIMIT_VALUE', $CONFIG['user_limit']);
-       define('__ALPHA_VALUE', $CONFIG['user_alpha']);
+       define('__LIMIT_VALUE', $_CONFIG['user_limit']);
+       define('__ALPHA_VALUE', $_CONFIG['user_alpha']);
 
        // Load form template
        LOAD_TEMPLATE("admin_config_user");
index c4b247a..5df7fb6 100644 (file)
@@ -41,8 +41,8 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
 ADD_DESCR("admin", basename(__FILE__));
 
 if (isset($_POST['ok'])) {
-       // First merge temporary the new API data into config
-       $CONFIG = array_merge($CONFIG, $_POST);
+       // First merge temporarily the new API data into the current config
+       $_CONFIG = array_merge($_CONFIG, $_POST);
 
        // Let's test the API first (hold your horses here, cowboy! Thanks. :) )
        if (WERNIS_TEST_API()) {
@@ -50,15 +50,16 @@ if (isset($_POST['ok'])) {
                ADMIN_SAVE_SETTINGS($_POST);
        } else {
                // Failed to test the API!
-               LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_ERROR_MESSAGE());
+               LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
        }
 }  else {
        // Prepare data for template output
        $content = array(
-               'min_amount' => $CONFIG['wernis_min_amount'],
-               'api_id'     => $CONFIG['wernis_api_id'],
-               'api_md5'    => $CONFIG['wernis_api_md5'],
-               'api_url'    => $CONFIG['wernis_api_url']
+               'min_amount'    => bigintval($_CONFIG['wernis_min_amount']),
+               'api_id'                => bigintval($_CONFIG['wernis_api_id']),
+               'api_md5'               => $_CONFIG['wernis_api_md5'],
+               'api_url'               => $_CONFIG['wernis_api_url'],
+               'refid'                 => bigintval($_CONFIG['wernis_refid'])
        );
 
        // Load template
index 9799da4..ba3d9e9 100644 (file)
@@ -67,7 +67,7 @@ if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason']
  elseif (!empty($_POST['no']))
 {
        // Do not delete him...
-       LOAD_URL(URL."/modules.php?module=admin&amp;what=list_user&amp;u_id=".$_GET['u_id']);
+       LOAD_URL("modules.php?module=admin&amp;what=list_user&amp;u_id=".$_GET['u_id']);
 }
  elseif (empty($_GET['u_id']))
 {
index 1de43e9..7e822c5 100644 (file)
@@ -54,7 +54,7 @@ $result_normal = SQL_QUERY($SQL, __FILE__, __LINE__);
 
 // Set offset an current page to default values
 if (empty($_GET['page']))   $_GET['page']   = "1";
-if (empty($_GET['offset'])) $_GET['offset'] = $CONFIG['mails_page'];
+if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['mails_page'];
 
 // Add limitation to SQL string
 $SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset'];
@@ -63,7 +63,7 @@ $SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET
 $result = SQL_QUERY($SQL, __FILE__, __LINE__);
 
 // Calculate pages
-$PAGES = round(SQL_NUMROWS($result_normal) / $CONFIG['mails_page'] + 0.5);
+$PAGES = round(SQL_NUMROWS($result_normal) / $_CONFIG['mails_page'] + 0.5);
 SQL_FREERESULT($result_normal);
 
 if (SQL_NUMROWS($result) > 0)
@@ -73,8 +73,8 @@ if (SQL_NUMROWS($result) > 0)
        // Add navigation table rows
        if ($PAGES > 1)
        {
-               define('__TOP_EMAIL_NAV'   , ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], true , "3", true));
-               define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3", true));
+               define('__TOP_EMAIL_NAV'   , ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], true , "3", true));
+               define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3", true));
        }
         else
        {
index 1b30be7..b27e002 100644 (file)
@@ -98,7 +98,7 @@ $result_normal = SQL_QUERY($SQL, __FILE__, __LINE__);
 
 // Set offset an current page to default values
 if (empty($_GET['page']))   $_GET['page']   = "1";
-if (empty($_GET['offset'])) $_GET['offset'] = $CONFIG['mails_page'];
+if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['mails_page'];
 
 // Add limitation to SQL string
 if (empty($_GET['mid']))
@@ -118,7 +118,7 @@ $result_list = SQL_QUERY($SQL, __FILE__, __LINE__);
 if ((!empty($SQL2)) && ($WHO == _ALL)) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
 
 // Calculate pages
-$PAGES = round(SQL_NUMROWS($result_normal) / $CONFIG['mails_page'] + 0.3);
+$PAGES = round(SQL_NUMROWS($result_normal) / $_CONFIG['mails_page'] + 0.3);
 SQL_FREERESULT($result_normal);
 
 $MAIL = false;
@@ -134,7 +134,7 @@ if (SQL_NUMROWS($result_list) > 0)
 </TR>");
 
        // Add navigation (with change box and colspan=3)
-       if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3");
+       if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3");
 
        while ($pool = SQL_FETCHROW($result_list))
        {
@@ -224,7 +224,7 @@ if (SQL_NUMROWS($result_list) > 0)
        SQL_FREERESULT($result_list);
 
        // Add navigation (without change box but with colspan=3)
-       if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3");
+       if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3");
 
        // Output footer
        OUTPUT_HTML("</TABLE>
@@ -251,10 +251,10 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL))
   </TD>
 </TR>");
                // Calculate pages
-               $PAGES = round(SQL_NUMROWS($result_bonus) / $CONFIG['mails_page'] + 0.5);
+               $PAGES = round(SQL_NUMROWS($result_bonus) / $_CONFIG['mails_page'] + 0.5);
 
                // Add navigation (with change box and colspan=3)
-               if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], true, "3");
+               if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], true, "3");
 
                // List emails
                while ($bonus = SQL_FETCHROW($result_bonus))
@@ -330,7 +330,7 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL))
                }
 
                // Add navigation (without change box but with colspan=3)
-               if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3");
+               if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3");
 
                // Output footer
                OUTPUT_HTML("</TABLE>
index bd283a9..36c06cf 100644 (file)
@@ -163,7 +163,7 @@ if (!empty($_GET['reg_ext'])) {
                // Free the result
                SQL_FREERESULT($result);
 
-               if ($CONFIG['verbose_sql']) {
+               if ($_CONFIG['verbose_sql']) {
                        // Load SQL commands in remove mode