More language strings rewritten
authorRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 14:52:08 +0000 (14:52 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 23 Feb 2009 14:52:08 +0000 (14:52 +0000)
66 files changed:
inc/modules/admin/action-task.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_yoomedia.php
inc/modules/admin/what-del_task.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-list_yoomedia_tm.php
inc/modules/admin/what-send_bonus.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/modules/guest/action-sponsor.php
inc/modules/guest/action-themes.php
inc/modules/guest/what-active.php
inc/modules/guest/what-beg.php
inc/modules/guest/what-doubler.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-rallyes.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_agb.php
inc/modules/guest/what-sponsor_infos.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/guest/what-top10.php
inc/modules/guest/what-wernis_portal.php
inc/modules/member/action-bank.php
inc/modules/member/action-order.php
inc/modules/member/action-surfbar.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-doubler.php
inc/modules/member/what-holiday.php
inc/modules/member/what-html_mail.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-primera.php
inc/modules/member/what-rallyes.php
inc/modules/member/what-refback.php
inc/modules/member/what-sponsor.php
inc/modules/member/what-support.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-surfbar_start.php
inc/modules/member/what-surfbar_stats.php
inc/modules/member/what-themes.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/modules/sponsor/.php
inc/modules/sponsor/account.php
inc/modules/sponsor/settings.php
inc/modules/sponsor/welcome.php
mailid_top.php

index 20274b9..3aa5af4 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("task")) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "task");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
        return;
 }
 
index d73a2f7..6b5db67 100644 (file)
@@ -35,9 +35,9 @@
 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif ((!EXT_IS_ACTIVE("other")) || (GET_EXT_VERSION("other") == "")) {
+} elseif (!EXT_IS_ACTIVE("other")) {
        // Missing extension!
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "other"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "other");
        return;
 }
 
index 5171c0a..0b2618f 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("yoomedia")) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
        return;
 }
 
index 3aa851b..0f0a911 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("task")) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "task");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
        return;
 }
 
index e082040..fcf1a4e 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("mailid")) {
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
        return;
 }
 
@@ -48,7 +48,7 @@ if (empty($_GET['del'])) $_GET['del'] = "";
 if (!empty($_GET['u_id'])) {
        // Check if the user already exists
        $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+               array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
 
         // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
@@ -60,11 +60,11 @@ if (!empty($_GET['u_id'])) {
                if (EXT_IS_ACTIVE("bonus")) {
                        // Load bonus ID
                        $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
-                        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+                               array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
                } else {
                        // Load stats ID (2nd will be ignored later! But it is needed for the same fetchrow command)
                        $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
-                        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+                               array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
                }
 
                // Get number of rows from the query
@@ -99,14 +99,14 @@ if (!empty($_GET['u_id'])) {
                                        case "NORMAL":
                                                $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE id=%s LIMIT 1",
                                                        array(bigintval($id)), __FILE__, __LINE__);
-                                               $type = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM;
+                                               $type = "mailid"; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
                                                $LINK = "<a href=\"{!URL!}/mailid.php?uid=".$_GET['u_id']."&amp;mailid=".$id."\" target=\"_blank\">".$id."</a>";
                                                break;
 
                                        case "BONUS":
                                                $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
                                                        array(bigintval($id2)), __FILE__, __LINE__);
-                                               $type = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM;
+                                               $type = "bonusid"; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
                                                $LINK = "<a href=\"{!URL!}/mailid.php?uid=".$_GET['u_id']."&amp;bonusid=".$id2."\" target=\"_blank\">".$id2."</a>";
                                                break;
 
index c4a4540..5223164 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("task")) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "task");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
        return;
 }
 
index 60b67f7..1787b6f 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("mailid")) {
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
        return;
 }
 
@@ -48,7 +48,7 @@ $listed = false;
 
 if (!empty($_GET['mid'])) {
        // List confirmation links from your member's mail orders
-       define('__LIST_UNCON_TITLE', LIST_UNCONFIRMED_MEMBER_LINKS);
+       define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_MEMBER_LINKS'));
 
        // SQL query for mail data
        $SQL = "SELECT DISTINCT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec  FROM `{!_MYSQL_PREFIX!}_pool` AS p
@@ -63,7 +63,7 @@ WHERE p.id='".$_GET['mid']."' LIMIT 1";
        $listed = true; $DATA = $_GET['mid']; $LINK = "mailid";
 } elseif ((!empty($_GET['bid'])) && (EXT_IS_ACTIVE("bonus"))) {
        // List confirmation links from bonus mails
-       define('__LIST_UNCON_TITLE', LIST_UNCONFIRMED_BONUS_LINKS);
+       define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS'));
 
        // SQL query for mail data (both ids are required for compatiblity to above normal mail
        $SQL = "SELECT id, id, subject, text, url, timestamp, mails_sent FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id='".$_GET['bid']."' LIMIT 1";
@@ -79,7 +79,7 @@ WHERE p.id='".$_GET['mid']."' LIMIT 1";
 }
 
 // Shall I display links or not?
-if ($listed) {
+if ($listed === true) {
        // Load mail data
        $result = SQL_QUERY($SQL, __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
@@ -146,9 +146,9 @@ WHERE l.%s='%s' ORDER BY l.userid LIMIT %s",
        } elseif ($_GET['mid'] > 0) {
                // Data in pool or in user_stats not found, so let's find out where data is missing
                $result1 = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1",
-                array(bigintval($ID)), __FILE__, __LINE__);
+                       array(bigintval($ID)), __FILE__, __LINE__);
                $result2 = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
-                array(bigintval($ID)), __FILE__, __LINE__);
+                       array(bigintval($ID)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result1) == 1) {
                        // pool table
                        LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_UNCONFIRMED_POOL_MISSING_1.$ID.ADMIN_UNCONFIRMED_POOL_MISSING_2);
@@ -168,5 +168,6 @@ WHERE l.%s='%s' ORDER BY l.userid LIMIT %s",
                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
        }
 }
+
 //
 ?>
index 9e5e57b..7560ac4 100644 (file)
@@ -37,7 +37,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("user")) || (GET_EXT_VERSION("user") == "")) {
        // Missing extension!
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
        return;
 }
 
@@ -45,13 +45,13 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Init title with "all accounts"
-$listHeader = ADMIN_ALL_ACCOUNTS;
+$listHeader = getMessage('ADMIN_ALL_ACCOUNTS');
 if (!empty($_GET['status'])) {
        // Set title according to the "status"
-       $listHeader = constant(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['status']))));
+       $listHeader = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['status']))));
 } elseif (!empty($_GET['mode'])) {
        // Set title according to the "mode"
-       $listHeader = constant(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
+       $listHeader = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
 }
 
 // Remember it
@@ -152,12 +152,13 @@ LIMIT 1",
                if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = "---";
 
                // Nickname inclusion?
+               // @TODO Rewrite these to filters
                if (EXT_IS_ACTIVE("nickname")) {
                        // Nickname not set or invalid? Then 
                        if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = "---";
                } else {
                        // Extension not found
-                       $DATA['nickname'] = EXT_NICKNAME_404;
+                       $DATA['nickname'] = getMessage('EXT_NICKNAME_404');
                }
 
                // Is the user extension newer?
@@ -238,7 +239,7 @@ LIMIT 1",
        // Calculate page count (0.5 fixes a bug with page count)
        if (getConfig('user_limit') == 0) {
                setConfigEntry('user_limit', 100);
-               LOAD_TEMPLATE("admin_settings_saved", false, EXTENSION_WARNING_USER_LIMIT);
+               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('EXTENSION_WARNING_USER_LIMIT'));
        } // END - if
 
        // Activate the extension please!
@@ -276,13 +277,11 @@ LIMIT 1",
                }
 
                // Column with nickname when nickname extension is present
-               if (EXT_IS_ACTIVE("nickname"))
-               {
+               // @TODO Rewrite this into a  filter
+               if (EXT_IS_ACTIVE("nickname")) {
                        // Nickname extension found
-                       define('__NICKNAME_TH', "  <td class=\"admin_title bottom2\" align=\"center\">".NICKNAME."</td>");
-               }
-                else
-               {
+                       define('__NICKNAME_TH', "  <td class=\"admin_title bottom2\" align=\"center\">{--NICKNAME--}</td>");
+               } else {
                        // Not found
                        define('__NICKNAME_TH', "");
                }
@@ -330,6 +329,7 @@ LIMIT 1",
                        if (!isset($content['lock_reason'])) $content['lock_reason'] = "---";
 
                        // Is the extension "country" installed?
+                       // @TODO Rewrite this into a filter
                        if (EXT_IS_ACTIVE("country")) {
                                // Then overwrite country information
                                $content['country'] = COUNTRY_GENERATE_INFO($content['country_code']);
index ff3afc6..019b6b8 100644 (file)
@@ -35,10 +35,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("yoomedia")) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
        return;
 } elseif (!EXT_IS_ACTIVE("bonus")) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
        return;
 }
 
index 583d7eb..6dccfbf 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("order")) {
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "order"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 }
 
index 58899f1..eb590f7 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("theme")) {
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
@@ -58,11 +58,11 @@ if ($SEL > 0) {
                        } else {
                                $SQL = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
                        }
-                       $OUT = ADMIN_THEMES_UPDATED;
+                       $OUT = getMessage('ADMIN_THEMES_UPDATED');
                } elseif (isset($_POST['del'])) {
                        // Delete themes
                        $SQL = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1";
-                       $OUT = ADMIN_THEMES_DELETED;
+                       $OUT = getMessage('ADMIN_THEMES_DELETED');
                }
 
                // Run SQL command?
@@ -72,11 +72,11 @@ if ($SEL > 0) {
 
                        // Rebuild cache
                        REBUILD_CACHE("themes", "them");
-               }
+               } // END - if
        }
 
        // Output generated?
-       if (empty($OUT)) ADMIN_THEME_NO_OUTPUT;
+       if (empty($OUT)) $OUT = getMessage('ADMIN_THEME_NO_OUTPUT');
 } elseif (!empty($_GET['default_theme'])) {
        // Escape string from input
        $POST['default_theme'] = SQL_ESCAPE($_GET['default_theme']);
index 0ca4421..f3c3dd0 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("theme")) {
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "theme"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index a6f754c..f55c33b 100644 (file)
@@ -35,7 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
index f999513..832bc57 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 6221433..7b1b8c8 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "active");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "active");
        return;
 }
 
index 71ab1bd..bd3e5ea 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
        return;
 }
 
index 71cfbdd..5e12611 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
        return;
 }
 
index 0b6002d..cd57541 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "user");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
        return;
 }
 
index 7c51cb9..3190462 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("mediadata")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "mediadata");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mediadata");
        return;
 }
 
index 64f76c5..987ffed 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
        return;
 }
 
index d3b89af..ef95af5 100644 (file)
@@ -36,11 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("register"))) {
-       if (IS_ADMIN()) {
-               addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "register"));
-       } else {
-               addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "register");
-       }
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "register");
        return;
 }
 
index 6697f1e..d63aada 100644 (file)
@@ -35,11 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       if (IS_ADMIN()) {
-               addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor"));
-       } else {
-               addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
-       }
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index c51e462..caa6b13 100644 (file)
@@ -35,11 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       if (IS_ADMIN()) {
-               addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor"));
-       } else {
-               addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
-       }
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index 1cd6449..a58b00e 100644 (file)
@@ -35,11 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       if (IS_ADMIN()) {
-               addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor"));
-       } else {
-               addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
-       }
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index 268962d..b40a7e1 100644 (file)
@@ -35,11 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       if (IS_ADMIN()) {
-               addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "sponsor"));
-       } else {
-               addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
-       }
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index 9e1dce2..b055bae 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("top10")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "top10");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "top10");
        return;
 }
 
index 8a32c4c..3d801a5 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
        return;
 }
 
index 8aad934..c276c84 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
index 5248f12..90f59f2 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
index 214a66b..81bc3f8 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
index d80ea9b..1ae9e27 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 31bbf4c..0376208 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
index 1344403..191c85b 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index d9915df..967b6b6 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index d9915df..967b6b6 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index d9915df..967b6b6 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bank");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index c2cfac4..efcb3c1 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
        return;
 }
 
index 49d608a..ed3311a 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
        return;
 }
 
index e405e62..60f6163 100644 (file)
@@ -38,16 +38,16 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
 } elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
        return;
 }
 
 // Add description as navigation point
 ADD_DESCR("member", __FILE__);
 
-if (GET_EXT_VERSION("bonus") >= "0.6.9")
-{
+if (GET_EXT_VERSION("bonus") >= "0.6.9") {
        // Add more bonus points here
+       // @TODO Rewrite this to a filter
        $USE = "(0";
        if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus";
        if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus";
@@ -55,9 +55,7 @@ if (GET_EXT_VERSION("bonus") >= "0.6.9")
        if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats";
        if (getConfig('bonus_ref_yn')   == "Y") $USE .= " + bonus_ref";
        $USE .= ")";
-}
- else
-{
+} else {
        // Old version ???
        $USE = "turbo_bonus";
 }
index b22a9f3..090fa43 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
 } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "doubler");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
        return;
 }
 
@@ -53,24 +53,18 @@ define('__MIN_VALUE'   , TRANSLATE_COMMA(getConfig('doubler_min')));
 define('__MAX_VALUE'   , TRANSLATE_COMMA(getConfig('doubler_max')));
 
 // Transfer referal ID
-if (EXT_IS_ACTIVE("nickname"))
-{
+if (EXT_IS_ACTIVE("nickname")) {
        // Load nickname from DB
        $nick = NICKNAME_GET_NICK($GLOBALS['userid']);
 
-       if (!empty($nick))
-       {
+       if (!empty($nick)) {
                // Set nickname
                define('__USERID', $nick);
-       }
-        else
-       {
+       } else {
                // Use direct userid
                define('__USERID', $GLOBALS['userid']);
        }
-}
- else
-{
+} else {
        // Use direct userid
        define('__USERID', $GLOBALS['userid']);
 }
@@ -81,11 +75,16 @@ define('__DOUBLER_COUNTER', TRANSLATE_COMMA(getConfig('doubler_counter')));
 // Which mail-send-mode did the admin setup?
 switch (getConfig('doubler_send_mode')) {
 case "DIRECT":
-       define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
+       define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
        break;
 
 case "RESET":
-       define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
+       define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
+       break;
+
+default:
+       define('DOUBLER_PAYOUT_TIME', sprintf(getMessage('DOUBLER_PAYOUT_TIME_UNKNOWN'), getConfig('doubler_send_mode')));
+       DEBUG_LOG(__FILE__, __LINE__, constant('DOUBLER_PAYOUT_TIME'));
        break;
 }
 
index c6ef6c2..3f3c292 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "holiday");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "holiday");
        return;
 }
 
index 8343af9..af47b72 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "html_mail");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "html_mail");
        return;
 }
 
index 35ff349..f863e22 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "mydata");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata");
        return;
 }
 
@@ -56,14 +56,11 @@ if (!empty($_POST['notify'])) $MODE = "notify"; // Switch off notification
 switch ($MODE)
 {
 case "show": // Show his data
-       if (EXT_IS_ACTIVE("country", true))
-       {
+       if (EXT_IS_ACTIVE("country", true)) {
                // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
                $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
-       }
-        else
-       {
+       } else {
                // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
                $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
@@ -76,26 +73,23 @@ case "show": // Show his data
        $DATA[13] = MAKE_DATETIME($DATA[13], "0");
 
        // How far is last change on his profile away from now?
-       if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0))
-       {
+       if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
                // You cannot change your account
                define('CHANGE', "<div class=\"member_failed\">".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + getConfig('profile_lock'), "0").MEMBER_PROFILE_LOCKED_2."</div>");
-       }
-        else
-       {
+       } else {
                // He is allowed to change his profile
                define('CHANGE', LOAD_TEMPLATE("member_mydata_button", true));
        }
+
        if (strlen($DATA[7]) == 1) $DATA[7] = "0".$DATA[7];
        if (strlen($DATA[8]) == 1) $DATA[8] = "0".$DATA[8];
-       switch (GET_LANGUAGE())
-       {
+
+       switch (GET_LANGUAGE()) {
                case "de": define('DOB', $DATA[7].".".$DATA[8].".".$DATA[9]); break;
                default  : define('DOB', $DATA[8]."-".$DATA[7]."-".$DATA[9]); break;
        }
 
-       if (EXT_IS_ACTIVE("country"))
-       {
+       if (EXT_IS_ACTIVE("country")) {
                // Load country's description and code
                $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
        }
@@ -109,12 +103,12 @@ case "edit": // Edit data
                // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
                $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
 FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                array(UID_VALUE), __FILE__, __LINE__);
+                array(constant('UID_VALUE')), __FILE__, __LINE__);
        } else {
                // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
                $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
 FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                array(UID_VALUE), __FILE__, __LINE__);
+                array(constant('UID_VALUE')), __FILE__, __LINE__);
        }
 
        $DATA = SQL_FETCHROW($result);
@@ -122,14 +116,11 @@ FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
        $DATA[13] = $DATA[12] + getConfig('profile_lock');
 
        // How far is last change on his profile away from now?
-       if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0))
-       {
+       if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
                $DATA[13] = MAKE_DATETIME($DATA[13] + getConfig('profile_lock'), "0");
                // You cannot change your account
                LOAD_TEMPLATE("member_mydata_locked");
-       }
-        else
-       {
+       } else {
                // He is allowed to change his profile
                switch ($DATA[10])
                {
@@ -205,12 +196,11 @@ case "save": // Save entered data
                LOAD_TEMPLATE("member_mydata_locked");
        } elseif (!VALIDATE_EMAIL($_POST['addy'])) {
                // Invalid email address!
-               LOAD_TEMPLATE("admin_settings_saved", false, INVALID_EMAIL_ADDRESS_ENTERED);
+               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
        } else {
                // Generate hash
                $hash = generateHash($_POST['pass1'], substr($DATA[1], 0, -40));
-               if ((($hash == $DATA[1]) || ($_POST['pass1'] == $_POST['pass2'])) && (!empty($_POST['pass1'])))
-               {
+               if ((($hash == $DATA[1]) || ($_POST['pass1'] == $_POST['pass2'])) && (!empty($_POST['pass1']))) {
                        // Only on simple changes normal mode is active = no email or password changed
                        $MODE = "normal"; $AND = "";
 
@@ -218,16 +208,14 @@ case "save": // Save entered data
                        if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = "pass"; }
 
                        // Or did he changed his password?
-                       if ($_POST['addy'] != $DATA[0])
-                       {
+                       if ($_POST['addy'] != $DATA[0]) {
                                // Jupp
                                if ($MODE == "normal") { $MODE = "email"; } else { $MODE .= ";email"; }
                                $_POST['old_addy'] = $DATA[0];
                        }
 
                        // Update member's profile
-                       if (EXT_IS_ACTIVE("country"))
-                       {
+                       if (EXT_IS_ACTIVE("country")) {
                                // New way
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
 gender='%s', surname='%s', family='%s',
@@ -256,9 +244,7 @@ array(
        UID_VALUE,
        get_session('u_hash')
  ), __FILE__, __LINE__);
-                       }
-                        else
-                       {
+                       } else {
                                // Old way
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
 gender='%s', surname='%s', family='%s',
@@ -294,19 +280,17 @@ array(
 
                        // ... and run them through
                        SEND_MODE_MAILS ("mydata", $modes);
-               }
-                else
-               {
+               } else {
                        // Entered wrong pass for updating profile
-                       LOAD_TEMPLATE("admin_settings_saved", false, MEBER_UPDATE_PWD_WRONG);
+                       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEBER_UPDATE_PWD_WRONG'));
                }
        }
        break;
 
 case "notify": // Switch off notfication
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
-        array($GLOBALS['userid']), __FILE__, __LINE__);
-       $URL = "modules.php?module=login&amp;what=welcome&amp;msg=".urlencode(PROFILE_UPDATED);
+               array($GLOBALS['userid']), __FILE__, __LINE__);
+       $URL = "modules.php?module=login&amp;what=welcome&amp;msg=".urlencode(getMessage('PROFILE_UPDATED'));
        break;
 }
 
index 864299b..9fb4453 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "newsletter");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "newsletter");
        return;
 }
 
index 6fee381..6afe0ce 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "nickname");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "nickname");
        return;
 }
 
index ce4daad..702d81a 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 }
 
index 451ab74..6b8ea9c 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "payout");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "payout");
        return;
 }
 
@@ -79,15 +79,13 @@ $TPTS = TRANSLATE_COMMA($TPTS - $USED);
 // Sanity check...
 if (empty($TPTS)) $TPTS = "0.00000";
 
-if (empty($_GET['payout']))
-{
+if (empty($_GET['payout'])) {
        // Load payout types
        $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points, allow_url
 FROM `{!_MYSQL_PREFIX!}_payout_types`
 WHERE %s >= min_points
 ORDER BY type", array(REVERT_COMMA($TPTS)), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0)
-       {
+       if (SQL_NUMROWS($result) > 0) {
                // Free memory
                SQL_FREERESULT($result);
 
@@ -99,34 +97,26 @@ ON p.payout_id = t.id
 WHERE p.userid = %s
 ORDER BY p.payout_timestamp DESC",
                 array($GLOBALS['userid']), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result_payouts) > 0)
-               {
+               if (SQL_NUMROWS($result_payouts) > 0) {
                        // List all his requests
                        $SW = 2; $OUT = "";
-                       while (list($pid, $total, $account, $bank, $type, $tstamp, $status, $allow, $url, $alt, $banner) = SQL_FETCHROW($result_payouts))
-                       {
+                       while (list($pid, $total, $account, $bank, $type, $tstamp, $status, $allow, $url, $alt, $banner) = SQL_FETCHROW($result_payouts)) {
                                // Translate status
                                $status = constant('PAYOUT_MEMBER_STATUS_'.strtoupper($status).'');
                                $status = "<div class=\"member_failed\">".$status."</div>";
 
                                // Nothing entered must be secured in member/what-payputs.php !
-                               if ($allow == "Y")
-                               {
+                               if ($allow == "Y") {
                                        // Banner/Textlink views/clicks request
-                                       if (!empty($banner))
-                                       {
+                                       if (!empty($banner)) {
                                                // Banner
                                                $account = "<img src=\"".$banner."\" alt=\"".$alt."\" title=\"".$alt."\" border=\"0\" />";
-                                       }
-                                        else
-                                       {
+                                       } else {
                                                // Textlink
                                                $account = $alt;
                                        }
-                                       $bank = "<a href=\"".DEREFERER($url)."\" target=\"_blank\">".CLICK_HERE."</a>";
-                               }
-                                else
-                               {
+                                       $bank = "<a href=\"".DEREFERER($url)."\" target=\"_blank\">{--CLICK_HERE--}</a>";
+                               } else {
                                        // e-currency payout request
                                        if (empty($account)) $account = "---";
                                        if (empty($bank))    $bank    = "---";
@@ -159,15 +149,12 @@ ORDER BY p.payout_timestamp DESC",
                // Output payout list
                PAYOUT_OUTPUT_PAYOUT_LIST($TPTS);
        }
-}
- else
-{
+} else {
        // Chedk if he can get paid by selected type
        $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1",
-        array(bigintval($_GET['payout'])), __FILE__, __LINE__);
+               array(bigintval($_GET['payout'])), __FILE__, __LINE__);
 
-       if (SQL_NUMROWS($result) == 1)
-       {
+       if (SQL_NUMROWS($result) == 1) {
                // ID is valid
                list($type, $rate, $min, $allow) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
@@ -177,8 +164,7 @@ ORDER BY p.payout_timestamp DESC",
 
                // Calulcate points from submitted amount
                $PAYOUT = 0;
-               if (!empty($_POST['payout']))
-               {
+               if (!empty($_POST['payout'])) {
                        $PAYOUT  = bigintval($_POST['payout']) / $rate;
                        $PAY_MAX = $max / $rate;
                }
@@ -187,11 +173,9 @@ ORDER BY p.payout_timestamp DESC",
                define('PAYOUT_MAX_VALUE' , $max);
                define('PAYOUT_TYPE_VALUE', COMPILE_CODE($type));
 
-               if (REVERT_COMMA($TPTS) >= $min)
-               {
+               if (REVERT_COMMA($TPTS) >= $min) {
                        // Ok, he can get be paid
-                       if ((isset($_POST['ok'])) && ($PAYOUT <= $PAY_MAX) && ($PAYOUT >= $min))
-                       {
+                       if ((isset($_POST['ok'])) && ($PAYOUT <= $PAY_MAX) && ($PAYOUT >= $min)) {
                                // Calculate exact value
                                define('PAYOUT_POINTS_VALUE', $PAYOUT);
 
@@ -199,8 +183,7 @@ ORDER BY p.payout_timestamp DESC",
                                SUB_POINTS("payout", $GLOBALS['userid'], $PAYOUT);
 
                                // Add entry to his tranfer history
-                               if ($allow == "Y")
-                               {
+                               if ($allow == "Y") {
                                        // Banner/textlink ordered
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_payouts` (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url)
 VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
@@ -215,17 +198,12 @@ VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
 
                                        // Load templates
                                        $msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request_banner", array(), $GLOBALS['userid']);
-                                       if (GET_EXT_VERSION("admins") >= "0.4.1")
-                                       {
+                                       if (GET_EXT_VERSION("admins") >= "0.4.1") {
                                                $adm_tpl = "admin_payout_request_banner";
-                                       }
-                                        else
-                                       {
+                                       } else {
                                                $msg_adm = LOAD_EMAIL_TEMPLATE("admin_payout_request_banner", array(), $GLOBALS['userid']);
                                        }
-                               }
-                                else
-                               {
+                               } else {
                                        // e-currency payout requested
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_payouts` (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password)
 VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
@@ -250,43 +228,36 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
 
                                // Generate task
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, status, task_type, subject, text, task_created, userid)
-VALUES (0, 'NEW','PAYOUT_REQUEST','[payout:] ".PAYOUT_REQUEST_ADMIN."','%s', UNIX_TIMESTAMP(), %s)",
+VALUES (0, 'NEW','PAYOUT_REQUEST','[payout:] {--PAYOUT_REQUEST_ADMIN--}','%s', UNIX_TIMESTAMP(), %s)",
  array(
        $msg_adm,
        $GLOBALS['userid']
 ), __FILE__, __LINE__);
 
                                // Send out mails
-                               SEND_EMAIL($GLOBALS['userid'], PAYOUT_REQUEST_MEMBER, $msg_mem);
+                               SEND_EMAIL($GLOBALS['userid'], getMessage('PAYOUT_REQUEST_MEMBER'), $msg_mem);
 
                                // To admin(s)
-                               SEND_ADMIN_NOTIFICATION(PAYOUT_REQUEST_ADMIN, $admin_tpl, array(), $GLOBALS['userid']);
+                               SEND_ADMIN_NOTIFICATION(getMessage('PAYOUT_REQUEST_ADMIN'), $admin_tpl, array(), $GLOBALS['userid']);
 
                                // Load template and output it
-                               LOAD_TEMPLATE("admin_settings_saved", false, PAYOUT_REQUEST_SENT);
-                       }
-                        elseif ($allow == "Y")
-                       {
+                               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_REQUEST_SENT'));
+                       } elseif ($allow == "Y") {
                                // Generate banner order form
                                LOAD_TEMPLATE("member_payout_form_banner");
-                       }
-                        else
-                       {
+                       } else {
                                // Generate normal form
                                LOAD_TEMPLATE("member_payout_form");
                        }
-               }
-                else
-               {
+               } else {
                        // Not enougth points
-                       LOAD_TEMPLATE("admin_settings_saved", false, PAYOUT_POINTS_NOT_ENOUGTH);
+                       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_POINTS_NOT_ENOUGTH'));
                }
-       }
-        else
-       {
+       } else {
                // ID is invalid
-               LOAD_TEMPLATE("admin_settings_saved", false, PAYOUT_ID_INVALID);
+               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_ID_INVALID'));
        }
 }
+
 //
 ?>
index ebbf566..c008da9 100644 (file)
@@ -191,10 +191,10 @@ if (EXT_IS_ACTIVE("user")) {
        LOAD_TEMPLATE("member_points");
 } elseif (IS_ADMIN()) {
        // Missing extension
-       addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user"));
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
 } else {
        // Message for user
-       LOAD_TEMPLATE("admin_settings_saved", false, PROBLEM_POINTS_OVERVIEW_UNAVAILABLE);
+       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE'));
 }
 
 if (EXT_IS_ACTIVE("payout")) {
index 3a3e730..2783498 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("primera")) && (!IS_ADMIN())) {
        // Extension "primera" is not activated
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "primera");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "primera");
        return;
 }
 
@@ -50,7 +50,7 @@ ADD_DESCR("member", __FILE__);
 // Check if the admin has entered the data
 if ((getConfig('primera_api_name') == "") || (getConfig('primera_api_md5') == "")) {
        // Something important is missing...
-       LOAD_TEMPLATE("admin_settings_saved", false, PRIMERA_MEMBER_API_DATA_MISSING);
+       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_API_DATA_MISSING'));
        return;
 }
 
index 4968328..a5f7afd 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "rallye");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
        return;
 }
 
index 687b45b..e3c56d8 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "refback");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "refback");
        return;
 }
 
index fa65035..98d51f6 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "sponsor");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index 0e977d5..5315036 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }  elseif (!IS_MEMBER()){
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "support");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "support");
        return;
 }
 
@@ -59,9 +59,20 @@ if ((!isset($_POST['ok'])) || (empty($_POST['qsummary']))) {
 
        // Select right subject
        switch ($_POST['qsummary']) {
-               case "ordr"       : $subj_a = SUPPORT_SUBJ_ADMIN_ORDER;       $subj_m = SUPPORT_SUBJ_MEMBER_ORDER;       break;
-               case "reflink"    : $subj_a = SUPPORT_SUBJ_ADMIN_REFLINK;     $subj_m = SUPPORT_SUBJ_MEMBER_REFLINK;     break;
-               case "unconfirmed": $subj_a = SUPPORT_SUBJ_ADMIN_UNCONFIRMED; $subj_m = SUPPORT_SUBJ_MEMBER_UNCONFIRMED; break;
+               case "ordr":
+                       $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_ORDER');
+                       $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_ORDER');
+                       break;
+
+               case "reflink":
+                       $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_REFLINK');
+                       $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_REFLINK');
+                       break;
+
+               case "unconfirmed":
+                       $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_UNCONFIRMED');
+                       $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_UNCONFIRMED');
+                       break;
        } // END - switch
 
        // Send mail to admin
index e44abfd..16f68e6 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // Redirect
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
@@ -61,12 +61,12 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
        $insertId = SURFBAR_MEMBER_ADD_URL($_POST['url'], $_POST['limit']);
 
        // By default something went wrong
-       $msg = MEMBER_SURFBAR_URL_NOT_ADDED;
+       $msg = getMessage('MEMBER_SURFBAR_URL_NOT_ADDED');
 
        // Was this fine?
        if ($insertId > 0) {
                // URL added and waiting for unlock
-               $msg = MEMBER_SURFBAR_URL_ADDED;
+               $msg = getMessage('MEMBER_SURFBAR_URL_ADDED');
        } // END - if
 
        // Load message template
index 5385162..b5aeeba 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index 13837e4..e481602 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index a79ab6d..e6bef5b 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index 03cadb0..338da85 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "theme");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 3f7c030..83510d2 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "transfer");
        return;
 }
 
index 8e5465d..057b586 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
        return;
 }
 
@@ -49,7 +49,7 @@ ADD_DESCR("member", __FILE__);
 // Check if the admin has entered the data
 if ((getConfig('wernis_api_id') == "") || (getConfig('wernis_api_md5') == "")) {
        // Something important is missing...
-       LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_API_DATA_MISSING);
+       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_API_DATA_MISSING'));
        return;
 } // END - if
 
index 9082cb5..f801044 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "order");
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 } elseif (!IS_MEMBER()) {
        // Sorry, no guest access!
@@ -52,13 +52,13 @@ if (empty($URL)) {
        // Is the auto-send mechanism active or inactive?
        if (getConfig('autosend_active') == "Y") {
                // Auto-send is active
-               define('ADMIN_AUTOSEND',  COMPILE_CODE(ADMIN_AUTOSEND_ACTIVE));
-               define('MEMBER_AUTOSEND', COMPILE_CODE(MEMBER_AUTOSEND_ACTIVE));
+               define('ADMIN_AUTOSEND',  getMessage('ADMIN_AUTOSEND_ACTIVE'));
+               define('MEMBER_AUTOSEND', getMessage('MEMBER_AUTOSEND_ACTIVE'));
                $type = "NEW";
        } else {
                // Auto-send is inactive
-               define('ADMIN_AUTOSEND',  COMPILE_CODE(ADMIN_AUTOSEND_INACTIVE));
-               define('MEMBER_AUTOSEND', COMPILE_CODE(MEMBER_AUTOSEND_INACTIVE));
+               define('ADMIN_AUTOSEND',  getMessage('ADMIN_AUTOSEND_INACTIVE'));
+               define('MEMBER_AUTOSEND', getMessage('MEMBER_AUTOSEND_INACTIVE'));
                $type = "ADMIN";
        }
 
@@ -79,7 +79,7 @@ if (empty($URL)) {
                        array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__);
                $DATA = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
-               if (empty($DATA[0])) $DATA[0] = DEFAULT_SUBJECT_LINE;
+               if (empty($DATA[0])) $DATA[0] = getMessage('DEFAULT_SUBJECT_LINE');
 
                // Calculate used points
                $USED = $DATA[7] * GET_PAY_POINTS($DATA[3]);
@@ -101,10 +101,10 @@ if (empty($URL)) {
 
                // Send an email to the user
                $msg_mem = LOAD_EMAIL_TEMPLATE("order-member", $content, $GLOBALS['userid']);
-               SEND_EMAIL($email, MEMBER_NEW_QUEUE, $msg_mem);
+               SEND_EMAIL($email, getMessage('MEMBER_NEW_QUEUE'), $msg_mem);
 
                // Notify admins about this
-               SEND_ADMIN_NOTIFICATION(ADMIN_NEW_QUEUE, "order-admin", $content, $GLOBALS['userid']);
+               SEND_ADMIN_NOTIFICATION(getMessage('ADMIN_NEW_QUEUE'), "order-admin", $content, $GLOBALS['userid']);
 
                // Output back bottom
                LOAD_TEMPLATE("member_order-back", false);
@@ -116,5 +116,6 @@ if (empty($URL)) {
        // Redirect...
        LOAD_URL($URL);
 }
+
 //
 ?>
index ff7f465..c3e2df9 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE);
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(SPONSOR_ONLY_AREA_ENTERED);
+       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index a228a9a..de11101 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE);
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(SPONSOR_ONLY_AREA_ENTERED);
+       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
@@ -50,7 +50,9 @@ phone, fax, cell, email, url,
 status, receive_warnings
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE id='%s' AND password='%s' LIMIT 1",
- array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__);
+       array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__);
+
+// Entry found?
 if (SQL_NUMROWS($result) == 1) {
        // Load sponsor data
        $content = SQL_FETCHARRAY($result);
@@ -60,19 +62,19 @@ if (SQL_NUMROWS($result) == 1) {
                        // Check passwords
                        if (empty($_POST['pass_old'])) {
                                // No current password entered
-                               $MSG = SPONSOR_NO_CURRENT_PASSWORD_ENTERED;
+                               $MSG = getMessage('SPONSOR_NO_CURRENT_PASSWORD_ENTERED');
                        } elseif (md5($_POST['pass_old']) != get_session('sponsorpass')) {
                                // Entered password didn't match password in DB
-                               $MSG = SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB;
+                               $MSG = getMessage('SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB');
                        } elseif ((!empty($_POST['pass1'])) && (!empty($_POST['pass2'])) && ($_POST['pass1'] != $_POST['pass2'])) {
                                // Both new passwords did not match
-                               $MSG = SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH;
+                               $MSG = getMessage('SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH');
                        } elseif ((empty($_POST['pass1'])) && (!empty($_POST['pass2']))) {
                                // No password one entered
-                               $MSG = SPONSOR_PASSWORD_ONE_EMPTY;
+                               $MSG = getMessage('SPONSOR_PASSWORD_ONE_EMPTY');
                        } elseif ((!empty($_POST['pass1'])) && (empty($_POST['pass2']))) {
                                // No password two entered
-                               $MSG = SPONSOR_PASSWORD_TWO_EMPTY;
+                               $MSG = getMessage('SPONSOR_PASSWORD_TWO_EMPTY');
                        } elseif ((!empty($_POST['pass1'])) && (strlen($_POST['pass1']) < getConfig('pass_len'))) {
                                // Too short password
                                $MSG = SPONSOR_PASSWORD_TOO_SHORT_1.getConfig('pass_len').SPONSOR_PASSWORD_TOO_SHORT_2;
@@ -107,7 +109,7 @@ if (SQL_NUMROWS($result) == 1) {
                                $OUT = LOAD_TEMPLATE("admin_settings_saved", true, $MSG);
                        } else {
                                // No message generated
-                               $OUT = LOAD_TEMPLATE("admin_settings_saved", true, SPONSOR_NO_MESSAGE_GENERATED);
+                               $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_MESSAGE_GENERATED'));
                        }
                } else {
                        // Check for gender selection
index cb6c64f..f2b9f84 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE);
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(SPONSOR_ONLY_AREA_ENTERED);
+       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index 304593e..273b2c5 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE);
+       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(SPONSOR_ONLY_AREA_ENTERED);
+       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index f3a5d2a..eae1ea2 100644 (file)
@@ -48,7 +48,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Is the extension active
        if (!EXT_IS_ACTIVE("mailid", true)) {
                // Is not activated/installed yet!
-               addFatalMessage(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"));
+               addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
        } // END - if
 
        // Secure all data