$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;
}
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;
}
$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;
}
$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;
}
$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;
}
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) {
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
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']."&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']."&bonusid=".$id2."\" target=\"_blank\">".$id2."</a>";
break;
$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;
}
$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;
}
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
$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";
}
// 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) {
} 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);
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
}
}
+
//
?>
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;
}
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
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?
// 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!
}
// 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', "");
}
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']);
$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;
}
$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;
}
$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;
}
} 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?
// 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']);
$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;
}
$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
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
$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;
}
} 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
} 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
} 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
} 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;
}
$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");
} 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 (!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 (!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 (!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 (!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;
}
} 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;
}
} 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";
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";
}
} 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;
}
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']);
}
// 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;
}
} 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;
}
} 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;
}
} 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;
}
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__);
$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]);
}
// 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);
$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])
{
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 = "";
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',
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',
// ... 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;
}
} 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;
}
} 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;
}
} 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;
}
// 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;
}
// 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);
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 = "---";
// 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);
// Calulcate points from submitted amount
$PAYOUT = 0;
- if (!empty($_POST['payout']))
- {
+ if (!empty($_POST['payout'])) {
$PAYOUT = bigintval($_POST['payout']) / $rate;
$PAY_MAX = $max / $rate;
}
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);
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')",
// 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')",
// 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'));
}
}
+
//
?>
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")) {
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;
}
// 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;
}
} 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;
}
// 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;
}
} 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;
}
} 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;
}
// 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
// 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;
}
$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
} 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;
}
// 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;
}
} 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 (!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;
}
} 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;
}
// 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;
}
// 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
$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!
// 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";
}
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]);
// 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);
// Redirect...
LOAD_URL($URL);
}
+
//
?>
$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;
}
$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;
}
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);
// 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;
$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
$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;
}
$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;
}
// 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