From 77cdaff2afb97ed32985ced906a3a95ee078c2ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 23 Feb 2009 14:52:08 +0000 Subject: [PATCH] More language strings rewritten --- inc/modules/admin/action-task.php | 2 +- inc/modules/admin/what-config_other.php | 4 +- inc/modules/admin/what-config_yoomedia.php | 2 +- inc/modules/admin/what-del_task.php | 2 +- inc/modules/admin/what-list_links.php | 12 +-- inc/modules/admin/what-list_task.php | 2 +- inc/modules/admin/what-list_unconfirmed.php | 13 +-- inc/modules/admin/what-list_user.php | 24 +++--- inc/modules/admin/what-list_yoomedia_tm.php | 4 +- inc/modules/admin/what-send_bonus.php | 2 +- inc/modules/admin/what-theme_edit.php | 10 +-- inc/modules/admin/what-theme_import.php | 2 +- inc/modules/guest/action-sponsor.php | 2 +- inc/modules/guest/action-themes.php | 2 +- inc/modules/guest/what-active.php | 2 +- inc/modules/guest/what-beg.php | 2 +- inc/modules/guest/what-doubler.php | 2 +- inc/modules/guest/what-login.php | 2 +- inc/modules/guest/what-mediadata.php | 2 +- inc/modules/guest/what-rallyes.php | 2 +- inc/modules/guest/what-register.php | 6 +- inc/modules/guest/what-sponsor_agb.php | 6 +- inc/modules/guest/what-sponsor_infos.php | 6 +- inc/modules/guest/what-sponsor_login.php | 6 +- inc/modules/guest/what-sponsor_reg.php | 6 +- inc/modules/guest/what-top10.php | 2 +- inc/modules/guest/what-wernis_portal.php | 2 +- inc/modules/member/action-bank.php | 2 +- inc/modules/member/action-order.php | 2 +- inc/modules/member/action-surfbar.php | 2 +- inc/modules/member/action-themes.php | 2 +- inc/modules/member/what-bank_create.php | 2 +- inc/modules/member/what-bank_deposit.php | 2 +- inc/modules/member/what-bank_infos.php | 2 +- inc/modules/member/what-bank_output.php | 2 +- inc/modules/member/what-bank_withdraw.php | 2 +- inc/modules/member/what-beg.php | 2 +- inc/modules/member/what-beg2.php | 2 +- inc/modules/member/what-bonus.php | 10 +-- inc/modules/member/what-doubler.php | 25 +++--- inc/modules/member/what-holiday.php | 2 +- inc/modules/member/what-html_mail.php | 2 +- inc/modules/member/what-mydata.php | 60 +++++--------- inc/modules/member/what-newsletter.php | 2 +- inc/modules/member/what-nickname.php | 2 +- inc/modules/member/what-order.php | 2 +- inc/modules/member/what-payout.php | 91 +++++++-------------- inc/modules/member/what-points.php | 4 +- inc/modules/member/what-primera.php | 4 +- inc/modules/member/what-rallyes.php | 2 +- inc/modules/member/what-refback.php | 2 +- inc/modules/member/what-sponsor.php | 2 +- inc/modules/member/what-support.php | 19 ++++- inc/modules/member/what-surfbar_book.php | 6 +- inc/modules/member/what-surfbar_list.php | 2 +- inc/modules/member/what-surfbar_start.php | 2 +- inc/modules/member/what-surfbar_stats.php | 2 +- inc/modules/member/what-themes.php | 2 +- inc/modules/member/what-transfer.php | 2 +- inc/modules/member/what-wernis.php | 4 +- inc/modules/order.php | 17 ++-- inc/modules/sponsor/.php | 4 +- inc/modules/sponsor/account.php | 20 +++-- inc/modules/sponsor/settings.php | 4 +- inc/modules/sponsor/welcome.php | 4 +- mailid_top.php | 2 +- 66 files changed, 199 insertions(+), 252 deletions(-) diff --git a/inc/modules/admin/action-task.php b/inc/modules/admin/action-task.php index 20274b9c2d..3aa5af4296 100644 --- a/inc/modules/admin/action-task.php +++ b/inc/modules/admin/action-task.php @@ -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; } diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index d73a2f793d..6b5db674fc 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -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; } diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index 5171c0a622..0b2618f03e 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -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; } diff --git a/inc/modules/admin/what-del_task.php b/inc/modules/admin/what-del_task.php index 3aa851bf1a..0f0a9111b6 100644 --- a/inc/modules/admin/what-del_task.php +++ b/inc/modules/admin/what-del_task.php @@ -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; } diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index e082040a13..fcf1a4ec92 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -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 = "".$id.""; 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 = "".$id2.""; break; diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index c4a4540678..5223164e6b 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -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; } diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index 60b67f7a80..1787b6f75d 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -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')); } } + // ?> diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 9e5e57b192..7560ac483d 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -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', " ".NICKNAME.""); - } - else - { + define('__NICKNAME_TH', " {--NICKNAME--}"); + } 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']); diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index ff3afc65f7..019b6b82da 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -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; } diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 583d7eb15e..6dccfbf088 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -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; } diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index 58899f1cdd..eb590f73c7 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -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']); diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index 0ca4421b14..f3c3dd0f97 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -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; } diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index a6f754c22f..f55c33b583 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -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 diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index f9995139b4..832bc57515 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -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; } diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index 6221433fef..7b1b8c8e81 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -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; } diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 71ab1bd55a..bd3e5eaade 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -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; } diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index 71cfbdd73e..5e12611c9f 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -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; } diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 0b6002d9ce..cd575419ea 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -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; } diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 7c51cb9540..3190462f36 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -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; } diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 64f76c5881..987ffed898 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -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; } diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index d3b89af498..ef95af5fec 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -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; } diff --git a/inc/modules/guest/what-sponsor_agb.php b/inc/modules/guest/what-sponsor_agb.php index 6697f1ee9a..d63aada5fb 100644 --- a/inc/modules/guest/what-sponsor_agb.php +++ b/inc/modules/guest/what-sponsor_agb.php @@ -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; } diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index c51e462205..caa6b13ad2 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -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; } diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 1cd64496cc..a58b00eb72 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -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; } diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 268962da75..b40a7e1076 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -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; } diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 9e1dce2942..b055bae9ef 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -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; } diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index 8a32c4c5fb..3d801a5e8c 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -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; } diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index 8aad934946..c276c84db2 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -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 diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index 5248f12891..90f59f22d1 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -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 diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index 214a66bbf3..81bc3f8ed0 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -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 diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index d80ea9b41f..1ae9e27848 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -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; } diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index 31bbf4c3c9..03762085bf 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -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"); diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index 1344403fa0..191c85bf88 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -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; } diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index d9915dffaf..967b6b6a15 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -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; } diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index d9915dffaf..967b6b6a15 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -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; } diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index d9915dffaf..967b6b6a15 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -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; } diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index c2cfac4d09..efcb3c1b5f 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -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; } diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 49d608a0d6..ed3311adf1 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -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; } diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index e405e625a3..60f6163b65 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -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"; } diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index b22a9f3bc9..090fa4348a 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -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; } diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index c6ef6c2e9f..3f3c29223d 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -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; } diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 8343af91d0..af47b72b98 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -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; } diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 35ff349b5e..f863e221df 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -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', "
".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + getConfig('profile_lock'), "0").MEMBER_PROFILE_LOCKED_2."
"); - } - 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&what=welcome&msg=".urlencode(PROFILE_UPDATED); + array($GLOBALS['userid']), __FILE__, __LINE__); + $URL = "modules.php?module=login&what=welcome&msg=".urlencode(getMessage('PROFILE_UPDATED')); break; } diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index 864299bacb..9fb4453d17 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -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; } diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 6fee3818c2..6afe0ce978 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -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; } diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index ce4daadb21..702d81a356 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -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; } diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 451ab74901..6b8ea9cc36 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -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 = "
".$status."
"; // 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 = "\"".$alt."\""; - } - else - { + } else { // Textlink $account = $alt; } - $bank = "".CLICK_HERE.""; - } - else - { + $bank = "{--CLICK_HERE--}"; + } 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')); } } + // ?> diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index ebbf566f0a..c008da921a 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -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")) { diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 3a3e730f1b..2783498ba6 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -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; } diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 4968328952..a5f7afd960 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -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; } diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 687b45b9df..e3c56d86d6 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -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; } diff --git a/inc/modules/member/what-sponsor.php b/inc/modules/member/what-sponsor.php index fa65035f3a..98d51f66d0 100644 --- a/inc/modules/member/what-sponsor.php +++ b/inc/modules/member/what-sponsor.php @@ -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; } diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 0e977d5bb9..5315036aac 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -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 diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index e44abfdbf6..16f68e694c 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -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 diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 5385162763..b5aeeba063 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -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; } diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index 13837e422c..e4816028b6 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -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; } diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index a79ab6da58..e6bef5b499 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -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; } diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 03cadb061c..338da85988 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -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; } diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 3f7c0308c7..83510d2d85 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -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; } diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 8e5465d241..057b5864dc 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -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 diff --git a/inc/modules/order.php b/inc/modules/order.php index 9082cb50ec..f801044c5c 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -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); } + // ?> diff --git a/inc/modules/sponsor/.php b/inc/modules/sponsor/.php index ff7f46596c..c3e2df9f92 100644 --- a/inc/modules/sponsor/.php +++ b/inc/modules/sponsor/.php @@ -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; } diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index a228a9aef9..de111014e4 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -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 diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index cb6c64f12f..f2b9f84c0c 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -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; } diff --git a/inc/modules/sponsor/welcome.php b/inc/modules/sponsor/welcome.php index 304593ecbf..273b2c5c56 100644 --- a/inc/modules/sponsor/welcome.php +++ b/inc/modules/sponsor/welcome.php @@ -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; } diff --git a/mailid_top.php b/mailid_top.php index f3a5d2a960..eae1ea2cae 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -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 -- 2.39.5