]> git.mxchange.org Git - mailer.git/commitdiff
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 20274b9c2dea1d36765d4de1bfd3eb97cffcdc16..3aa5af429681d5c9e6c6a1a42a72c4f3a40da89a 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 d73a2f793d380cc048eadb8dff9d775100251cb7..6b5db674fc9e8fc851fa678a1a00163bfa91d932 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 5171c0a622f570ba6ff2970d805c03ff72fdd735..0b2618f03eaa1386405a867cc2b962461399de19 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 3aa851bf1aa3a5adb3fcc4f5a414eb32e01e72a7..0f0a9111b6c6827ef570803513159518402c879d 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 e082040a1374417d2b72d5b11bdf304e647e362e..fcf1a4ec92d875eaf6fd8c379b5a5ddfb80fdc3e 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 c4a45406783991d0a295b208bdc1969850bab4ed..5223164e6b7a7d42b5858bdda811069b4e1e5460 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 60b67f7a80d53de7a34421306eaf14aac94fc161..1787b6f75d230cd7cac37bdffddaa8ecb76b394e 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 9e5e57b1923df9cd260a5857576b2ffbadf4c0c1..7560ac483dee650f7c8484405cdb85a74c17c8ee 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 ff3afc65f7c51c31b9c871538acdd93b840b698d..019b6b82daeb0c16493e7eefcb72e4e891f4123c 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 583d7eb15ed78d729dbbfd1367bd41c2144f38c6..6dccfbf0886f0ee285eb8f12e2f11f1b07750288 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 58899f1cdd1e88ba771d13a8f9af14c5fc07da8b..eb590f73c768eb135540e173801478b686fd15df 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 0ca4421b141cb6bf435d9b55b2cdf2a2d4d2446d..f3c3dd0f97490f3b87ddeca8e23a2d04435cf69c 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 a6f754c22faecfa659b741a3fd9af01c435e6862..f55c33b583b9521378435c6ec23c11e2e129b6ef 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 f9995139b47ecdda63644fa03a8b8780e879eef7..832bc57515130505508d8a78d3f1fa177ccb4c47 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 6221433fef60c5551a0ec103d062c338a67f92ac..7b1b8c8e81c0a49b9ff05d924f6c3fd4ce848098 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 71ab1bd55acc5bfe49487eef93149cb73b8b3ac5..bd3e5eaadee6be4b3290cd387b55a0e9e2fee345 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 71cfbdd73ea4810ff7c7849f3ef08e0d0b737759..5e12611c9fe2d2776f647e975b8b19468e2bba7b 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 0b6002d9ce7d294b6d4c568aec1dc22ba3fc7047..cd575419ea0ab085828403e2a57c63c62113c89d 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 7c51cb95403804919a67c67afa6716e2bbe5d9e2..3190462f36af0ef6c4cdd59b74d4cdaab37b270d 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 64f76c58813f042797232aba7b359d0f1f9266bd..987ffed898c0f30ec84e7c77fd276cbda1162834 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 d3b89af49830e66516aa64ebb1fc5a67ec804428..ef95af5fecb17545d65441ac9b269188772bc76a 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 6697f1ee9a985df38689a9a8e36d55e01287aec0..d63aada5fb2dc044fb905020ffcbb291fddf7e2a 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 c51e462205261aff8ec5e7fc587e43ce512b0d64..caa6b13ad2ac226a2fbd7d3c64fc4e6641d72bae 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 1cd64496cc2c694136ec36e5a0c8a7ecaad50111..a58b00eb7252f2c33232bb79e67f53909bbe1eb3 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 268962da75b3f253e4402300690b0c29d5ae0756..b40a7e1076a21a066fb8f5e38b25395471f8c9c0 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 9e1dce294251c6727cb0ea6bbe6e0107fcc0c98e..b055bae9ef8c536bfa47439cd1a8fb39548730aa 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 8a32c4c5fb832a12ea7264c45df62e6192e117f2..3d801a5e8c80bea7740d27766f71df45b8fac896 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 8aad93494685c344ab9f847e09e4c3cee88bc088..c276c84db2abe17e801692c330e005d8b3649a7d 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 5248f12891848bcb37a9ad89bcb9d807e727bf5e..90f59f22d1a0f82fa4fa3cbc151b688243559094 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 214a66bbf39b7544f124a0f17d12ba063fc4dede..81bc3f8ed09ded61d3acccce2a672b0c1d785715 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 d80ea9b41f290328681391ef65cc3e07d35471ac..1ae9e27848d8aceb266dd2ca9875dc62585722c0 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 31bbf4c3c9ecb2d4f4e24f4295789712d9b1821e..03762085bf55fb7ea2f380ca1ad0fe7636c11c66 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 1344403fa0714ef2d3f53a32081074525fb59fb7..191c85bf884fb4e4a6af3c2e0f2847e6c85ef148 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 d9915dffaff50414636f4d545ddc76b6db5de696..967b6b6a155ee5de80b45b382af549615377ef55 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 d9915dffaff50414636f4d545ddc76b6db5de696..967b6b6a155ee5de80b45b382af549615377ef55 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 d9915dffaff50414636f4d545ddc76b6db5de696..967b6b6a155ee5de80b45b382af549615377ef55 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 c2cfac4d099332ebccc35baafbcd60480fc7c85a..efcb3c1b5f5b8c1e1a8826b7842fd5a3ffa43f85 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 49d608a0d68aa5268d53c73426e860539b94cbe6..ed3311adf1bc6fe317de9ef35ef1be5a5a52c3d2 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 e405e625a30ed40721b2b7dc7d548ff6299a4433..60f6163b6561c8ccc573edc426e216183d37a5a8 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 b22a9f3bc9b5962a4e60eb709f433baf8cc98420..090fa4348ac6551de87b9777ca931edc53a8b120 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 c6ef6c2e9f99d57bd26e800d580ea467a2dd5fb3..3f3c29223d518141df2ab51b9b6261a316b07326 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 8343af91d07f12de65f6ff28f7c7b5fdc4849c7a..af47b72b987fe807b42a5773ed36f4f1dc647214 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 35ff349b5e7df5b3fd568e551742e7485d19be2a..f863e221df5afe8ce35160c0aa87736f3b1f21bc 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 864299bacb111d08eb1e16b2cafd84593dd6e56e..9fb4453d17a3684af540c6b44f833d6ab9ff58d3 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 6fee3818c2cca39907a0dcc40783e216a7ec78a1..6afe0ce978136f78114353e5340b196f1dbb59dd 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 ce4daadb21ca2c03da10986781574782d9f3877a..702d81a3564845b0a095f8c092e18789183ae31c 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 451ab749012e1ffc2a1c23fea4a57aefff474eb7..6b8ea9cc364245e608be2ade161c3e6ba66ab9e2 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 ebbf566f0ad9d20d030e6185e8430de5dad10ac2..c008da921a0ea2336ee60ff9ecfa4b59dcc3e6a9 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 3a3e730f1bbaa62c7eeafbebdb25519083d18efd..2783498ba6320dd1053ea0ca92d0a75a8d6c4fe9 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 49683289523d0ea76f7822a7dca633f5a0f0381a..a5f7afd9607688b26648345bf89b739d824f362a 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 687b45b9df72cf478e7a4bf0bd7ea01bdc3b99e3..e3c56d86d66bb8c298321eb37fd0a921b0175169 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 fa65035f3a13fb6d21302e2646247e93f805bc5d..98d51f66d01a9129663a1d8a65e318ece90cb57f 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 0e977d5bb958b19ca39fa70d55bfee31ff5c38ff..5315036aacf9aaa29b1c9a2520669d66619d0a04 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 e44abfdbf6e66ec9f939a72631b786c70800e2ad..16f68e694c26dc58629767fdb4154b084c6d02a7 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 53851627638c08ff9d32d9670b37b7f9af2ec736..b5aeeba06398c96e6ae7c0e58afe2958be5edff5 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 13837e422c7791e33561416adca0cb14d1f64c2f..e4816028b6653b27efe1a7d1effb654e1d76e85d 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 a79ab6da58f32e91b67b2b285286bc6fd2ee19bc..e6bef5b49925249c296bdf47388e684155969235 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 03cadb061c34a3d1a99947e3266ec8e66261d478..338da85988e08363d416f34b79e2bc839c734173 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 3f7c0308c7920e2de4c2d9aee51b01a8375f052d..83510d2d85681bcfac8bba87cba069d4604e8318 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 8e5465d241df9a741b9fc7dff5bd6acf433cbd09..057b5864dcfcb4bcc4e2fb1385650073d0a5bcee 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 9082cb50ecd58a5d1ca1e6613099004c0ea7525d..f801044c5c01353075f5123b2142dcedf8816050 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 ff7f46596c34b623a114d7d53021ceafef715bb2..c3e2df9f925c533f581213c04ad0218db4f91bef 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 a228a9aef92cfec6bbd93d02ad328cc2ace43225..de111014e435df32b440d179f9c0bd8c3ded7b1a 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 cb6c64f12fa8727dd5c429e2329335907456c05f..f2b9f84c0cab012ee6d41f0b36655ee5ec5739e0 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 304593ecbf243661c22f2cde2c279c5eea582c93..273b2c5c56a4ef3cf4509e0f4dc2d0319874aad3 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 f3a5d2a96004772b5cc5815e7195401a9c6f0ecf..eae1ea2cae74513235f2601cbd439cebf7445d28 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