// Current SVN revision
//define('CURR_SVN_REVISION', getActualVersion(0));
-define('CURR_SVN_REVISION', "809");
+define('CURR_SVN_REVISION', "810");
define('CURR_SVN_DATE' , getActualVersion(1));
define('CURR_SVN_VERSION' , getActualVersion(2));
define('ADMIN_SELECTED_TASKS_ASSIGN', "Zum Bearbeiten ausgewählte Tasks");
define('ADMIN_REG_FAILED_INVALID', "Registrierung fehlgeschlagen: Ungütige ID übermittelt!");
define('ADMIN_REG_FAILED_ID_404', "Registrierung fehlgeschlagen: Erweiterung-ID nicht auffindbar!");
-define('ADMIN_REG_FAILED_404', "Registrierung fehlgeschlagen: Erweiterung nicht auffindbar!");
+define('ADMIN_REG_FAILED_404', "Registrierung fehlgeschlagen: Erweiterung <u>%s</u> nicht auffindbar!");
define('ADMIN_REG_FAILED_ASSIGED', "Registrierung fehlgeschlagen: Sie sind nicht zugewiesen oder Task ist veraltet!");
define('ADMIN_REG_FAILED_ALREADY', "Registrierung fehlgeschlagen: Erweiterun bereits installiert.");
define('ADMIN_REG_FAILED_DEPRECATED', "Registrierung fehlgeschlagen: Erweiterung ist veraltet.");
define('FILTER_FLUSH_FAILED_NO_DATABASE', "Kann die Filterketten nicht speichern. Datenbank fehlt!");
// Status changes
-define('ADMIN_STATUS_CHANGED_1', "Es wurden <u>");
-define('ADMIN_STATUS_CHANGED_2', "</u> von <u>");
-define('ADMIN_STATUS_CHANGED_3', "</u> Einträgen geändert.");
+define('ADMIN_STATUS_CHANGED', "Es wurden <u>%s</u> von <u>%s</u> Einträgen geändert.");
//
?>
define('HOLIDAY_NO_DIRECT_CALL', "Bite rufen Sie dieses Script über Auflisten auf.");
define('HOLIDAY_ADMIN_DEL_LINK', "Urlaub beenden");
define('HOLIDAY_ADMIN_SINGLE_DELETED', "Urlaub eines Mitgliedes beendet!");
-define('HOLIDAY_ADMIN_MULTI_DEL_1', "Urlaub von <u>");
-define('HOLIDAY_ADMIN_MULTI_DEL_2', "</u> Mitglied(-ern) beendet!");
+define('HOLIDAY_ADMIN_MULTI_DEL', "Urlaub von <u>%s</u> Mitglied(-ern) beendet!");
define('HOLIDAY_ADMIN_CONFIG_HEADER', "Einstellungen an der Urlaubsschaltung");
define('HOLIDAY_ADMIN_MAX_HOLIDAY', "Maximale beantragbare Urlaubszeit");
define('HOLIDAY_IS_ACTIVATED_NOW', "Ihre Urlaubsschaltung wurde jetzt aktiviert. Sie können keine Mails mehr buchen!");
define('HOLIDAY_ORDER_NOT_POSSIBLE', "Sie können keine Mails versenden, da Ihre Urlaubsschaltung aktiviert ist!");
define('HOLIDAY_MEMBER_TLOCK', "Urlaubsschaltung eingerichtet");
define('HOLIDAY_MEMBER_LOCKED', "Sie können derzeit Ihre Urlaubsschaltung nicht wieder deaktivieren, da Sie diese erst vor Kurzem aktiviert haben.");
-define('HOLIDAY_MEMBER_ORDER_1', "Sie können derzeit Ihre Urlaubsschaltung nicht verändern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: <u>");
-define('HOLIDAY_MEMBER_ORDER_2', "</u>");
+define('HOLIDAY_MEMBER_ORDER', "Sie können derzeit Ihre Urlaubsschaltung nicht verändern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: <u>%s</u>");
define('HOLIDAY_ADMIN_SINGLE_404', "Urlaubsschaltung nicht mehr vorhanden, oder veralteter Link!");
define('HOLIDAY_ADMIN_LOCKED', "Dauer bis Urlaubsschaltung aufgehoben werden kann");
define('HOLIDAY_ADMIN_MODE', "Zeitpunkt der Abarbeitung der Urlaubsschaltungen");
define('TRANSFER_ADMIN_AUTOPURGE', "Auto-Loeschung von Transfer-Eintraegen");
define('TRANSFER_COMPLETED', "Überweisung vollständig.");
define('TRANSFER_CONTINUE_OVERVIEW', "Weiter zur Übersichtsseite...");
-define('TRANSFER_LATEST_IS_1', "Einstellung gesperrt, letzte Überweisung war am <strong>");
-define('TRANSFER_LATEST_IS_2', "</strong>");
+define('TRANSFER_LATEST_IS', "Einstellung gesperrt, letzte Überweisung war am <strong>%s</strong>");
define('TRANSFER_LIST_ALL', "Gesamte Überweisungsliste anzeigen");
define('TRANSFER_NO_INCOMING_TRANSFERS', "Keine eingehenden Überweisungen gefunden.");
define('TRANSFER_NO_OUTGOING_TRANSFERS', "Keine ausgehenden Überweisungen gefunden.");
if ($points >= $mpoi) {
// Ok we found one
$P = $points * $rate - 0.5;
- OUTPUT_HTML("<li>{--PAYOUT_IN--}: <strong><a href=\"{!URL!}/modules.php?module=login&what=payout&payout=".$id."\">".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")</a></strong></li>");
+ OUTPUT_HTML("<li>{--PAYOUT_IN--}: <strong><a href=\"{!URL!}/modules.php?module=login&what=payout&payout=".$id."\">".$type." ({--PAYOUT_MAX--} ".round($P)." ".$type.")</a></strong></li>");
}
}
}
$OUT .= "<tr>
<td class=\"admin_menu\" colspan=\"2\">
- <NOBR> <strong>·</strong> ";
- if (($menu == $act) && (empty($wht)))
- {
+ <nobr> <strong>·</strong> ";
+ if (($menu == $act) && (empty($wht))) {
$OUT .= "<strong>";
- }
- else
- {
+ } else {
$OUT .= "[<a href=\"{!URL!}/modules.php?module=admin&action=".$menu."\">";
}
+
$OUT .= $title;
- if (($menu == $act) && (empty($wht)))
- {
+
+ if (($menu == $act) && (empty($wht))) {
$OUT .= "</strong>";
- }
- else
- {
+ } else {
$OUT .= "</a>]";
}
- $OUT .= "</NOBR></td>
+ $OUT .= "</nobr></td>
</tr>\n";
$result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
array($menu), __FUNCTION__, __LINE__);
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_sub\">\n";
while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) {
// Filename
- $INC = sprintf("%sinc/modules/admin/what-%s.php", constant('PATH'), $wht_sub);
+ $INC = sprintf("inc/modules/admin/what-%s.php", $wht_sub);
if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
$ACL = ADMINS_CHECK_ACL("", $wht_sub);
} else {
// ACL is "allow"... hmmm
$ACL = true;
}
+
+ // Is the file readable?
$readable = INCLUDE_READABLE($INC);
+
+ // Access allowed?
if ($ACL === true) {
// Insert compiled title and description
$GLOBALS['menu']['title'][$wht_sub] = $title_what;
$GLOBALS['menu']['description'][$wht_sub] = $desc_what;
$OUT .= "<tr>
<td class=\"admin_menu\" colspan=\"2\">
- <NOBR> <strong>--></strong> ";
- if ($readable === true)
- {
- if ($wht == $wht_sub)
- {
+ <nobr> <strong>--></strong> ";
+ if ($readable === true) {
+ if ($wht == $wht_sub) {
$OUT .= "<strong>";
- }
- else
- {
+ } else {
$OUT .= "[<a href=\"{!URL!}/modules.php?module=admin&what=".$wht_sub."\">";
}
- }
- else
- {
+ } else {
$OUT .= "<i class=\"admin_note\">";
}
+
$OUT .= $title_what;
- if ($readable === true)
- {
- if ($wht == $wht_sub)
- {
+
+ if ($readable === true) {
+ if ($wht == $wht_sub) {
$OUT .= "</strong>";
- }
- else
- {
+ } else {
$OUT .= "</a>]";
}
- }
- else
- {
+ } else {
$OUT .= "</em>";
}
- $OUT .= "</NOBR></td>
+ $OUT .= "</nobr></td>
</tr>\n";
}
}
$handle = opendir(sprintf("%sinc/modules/%s/", constant('PATH'), $menu)) or mxchange_die("Cannot load menu ".$menu."!");
// Init the selection box
- $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">\n <option value=\"\">{--IS_TOP_MENU--}</option>\n";
+ $OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">
+ <option value=\"\">{--IS_TOP_MENU--}</option>\n";
// Walk through all files
while ($file = readdir($handle)) {
} // END - foreach
// Output status
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_STATUS_CHANGED_1.$cnt.ADMIN_STATUS_CHANGED_2.count($IDs).ADMIN_STATUS_CHANGED_3);
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs)));
} else {
// Nothing selected!
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NOTHING_SELECTED_CHANGE'));
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_ENTRIES_REMOVED'));
} else {
// Some are still there :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_DELETED, SQL_AFFECTEDROWS(), count($IDs)));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs)));
}
} else {
// List for deletion confirmation
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_ENTRIES_EDITED'));
} else {
// Some are still there :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_EDITED, $affected, count($IDs)));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs)));
}
} else {
// List for editing
// Get count of (maybe) selected menu points
$chk = 0;
-if (REQUEST_ISSET_POST(('sel'))) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
// List all menu points and make them editable
-if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) {
+if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
// Edit menu entries
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
// Load template
LOAD_TEMPLATE("admin_amenu_edit_form");
}
- elseif ((REQUEST_ISSET_POST(('del'))) && (!IS_DEMO()))
+ elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO()))
{
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('admin')))) {
+if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('admin'))) {
// Send mail or message
if ((EXT_IS_ACTIVE("msg")) && (REQUEST_POST('type') == "msg")) {
// Add message
}
// Mail / message dropped
- LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_ADMIN_CONTACTED);
-} elseif (REQUEST_ISSET_GET(('admin'))) {
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_ADMIN_CONTACTED'));
+} elseif (REQUEST_ISSET_GET('admin')) {
// Load contact form template
define('__ADMIN', REQUEST_GET('admin'));
if (EXT_IS_ACTIVE("msg")) {
LOAD_TEMPLATE("admin_admins_contct_form");
} else {
// Please select an admin!
- LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_SELECT_ADMIN);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_SELECT_ADMIN'));
}
//
ADD_DESCR("admin", __FILE__);
// Set selection data to empty array when it is empty
-if (!REQUEST_ISSET_POST(('sel'))) REQUEST_SET_POST('sel', array());
+if (!REQUEST_ISSET_POST('sel')) REQUEST_SET_POST('sel', array());
// Check if direct admin account was selected
-if (REQUEST_ISSET_GET(('admin'))) {
+if (REQUEST_ISSET_GET('admin')) {
// Secure ID number
$aid = bigintval(REQUEST_GET('admin'));
REQUEST_SET_POST(array('sel', $aid), "1");
}
-if ((REQUEST_ISSET_POST(('edit'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+if ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit account(s)
ADMINS_EDIT_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
} elseif ((REQUEST_ISSET_POST(('change'))) && (sizeof(REQUEST_POST('login')) > 0)) {
// Change admin accounts
ADMINS_CHANGE_ADMIN_ACCOUNT(REQUEST_POST_ARRAY());
-} elseif ((REQUEST_ISSET_POST(('del'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Show admin accounts for deletetion
ADMINS_DELETE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY());
} else {
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (REQUEST_ISSET_POST(('edit')))
+if (REQUEST_ISSET_POST('edit'))
{
// Check if entires are checked
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
else
{
// Nothing selected
- LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_NO_MAIL_CHECKED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_NO_MAIL_CHECKED'));
}
}
else
LOAD_TEMPLATE("admin_admins_mails_list");
} else {
// No entries found
- LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_MAILS_NO_ENTRIES);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_MAILS_NO_ENTRIES'));
}
}
ADD_DESCR("admin", __FILE__);
$SEL = 0;
-if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
-if ((REQUEST_ISSET_POST(('edit'))) && ($SEL > 0)) {
+if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
// Edit ACLs
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $selected) {
// Entries changed
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED'));
-} elseif ((REQUEST_ISSET_POST(('del'))) && ($SEL > 0)) {
+} elseif ((REQUEST_ISSET_POST('del')) && ($SEL > 0)) {
// Delete ACLs
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $selected) {
REQUEST_POST('what_menu'),
REQUEST_POST('mode')
), __FILE__, __LINE__);
- $content = ADMIN_ADMINS_ACL_SAVED;
+ $content = getMessage('ADMIN_ADMINS_ACL_SAVED');
// Update cache when installed
if (EXT_IS_ACTIVE("cache")) {
} // END - if
} else {
// ACL does already exist!
- $content = ADMIN_ADMINS_ACL_ALREADY_ADDED;
+ $content = getMessage('ADMIN_ADMINS_ACL_ALREADY_ADDED');
}
// Free memory
SQL_FREERESULT($result);
} else {
// No menu selected makes also no sence...
- $content = ADMIN_ADMINS_SELECT_ACTION_WHAT;
+ $content = getMessage('ADMIN_ADMINS_SELECT_ACTION_WHAT');
}
} else {
// Same mode makes no sence...
- $content = ADMIN_ADMINS_SAME_MODE_SELECTED;
+ $content = getMessage('ADMIN_ADMINS_SAME_MODE_SELECTED');
}
// Display message
define('_ADMINS_SELECTION', ADD_OPTION_LINES("admins", "id", "login", "", "default_acl"));
define('_ACTION_SELECTION', ADMIN_MENU_SELECTION("action"));
define('_WHAT_SELECTION' , ADMIN_MENU_SELECTION("what"));
- define('_MODE_OPTIONS' , ADD_OPTION_LINES("/ARRAY/", array("allow", "deny"), array(ADMINS_ALLOW_MODE, ADMINS_DENY_MODE)));
+ define('_MODE_OPTIONS' ,
+ ADD_OPTION_LINES(
+ "/ARRAY/",
+ array("allow", "deny"),
+ array(
+ getMessage('ADMINS_ALLOW_MODE'),
+ getMessage('ADMINS_DENY_MODE')
+ )
+ )
+ );
// Load template for adding new ACL
LOAD_TEMPLATE("admin_admins_add_acl");
// Display message
LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
}
-} elseif ((REQUEST_ISSET_POST(('del'))) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
+} elseif ((REQUEST_ISSET_POST('del')) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
// Delete categories
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value) {
// Load main template
LOAD_TEMPLATE("admin_del_cats");
-} elseif ((REQUEST_ISSET_POST(('edit'))) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
+} elseif ((REQUEST_ISSET_POST('edit')) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
// Edit categories
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value)
// Display message
LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
}
-} elseif ((REQUEST_ISSET_POST(('del'))) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
+} elseif ((REQUEST_ISSET_POST('del')) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
// Delete entries
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value)
// Load main template
LOAD_TEMPLATE("admin_config_email_del");
-} elseif ((REQUEST_ISSET_POST(('edit'))) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
+} elseif ((REQUEST_ISSET_POST('edit')) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
// Edit entries
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value) {
ADD_DESCR("admin", __FILE__);
$SEL = 0;
-if (REQUEST_ISSET_POST(('edit'))) {
+if (REQUEST_ISSET_POST('edit')) {
// Check if at least one module is selected
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MODS_NOTHING_SELECTED'));
// Remove maybe confusing data
- REQUEST_UNSET_POST(('edit'));
+ REQUEST_UNSET_POST('edit');
REQUEST_UNSET_POST(('change'));
}
} elseif (REQUEST_ISSET_POST(('change'))) {
$result_mem = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `status`='NEW' ORDER BY payout_timestamp DESC", __FILE__, __LINE__);
$display = true;
-if ((REQUEST_ISSET_POST(('edit'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+if ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit payout types
if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == "ok")) {
// Edit entries
// Load main template
LOAD_TEMPLATE("admin_config_payouts_edit");
}
-} elseif ((REQUEST_ISSET_POST(('del'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete payout types
if ((REQUEST_ISSET_GET('ok')) && (REQUEST_GET('ok') == "ok")) {
// Delete entries
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
}
- $msg = ADMIN_PAYOUT_ENTRIES_DELETED;
+ $msg = getMessage('ADMIN_PAYOUT_ENTRIES_DELETED');
} else {
$display = false; //Suppress any other outputs
$SW = 2; $OUT = "";
$id = bigintval($id);
// Revert german commata
- REQUEST_POST('perc', $id) = REVERT_COMMA(REQUEST_POST('perc', $id));
+ REQUEST_SET_POST(array('perc', $id), REVERT_COMMA(REQUEST_POST('perc', $id)));
// Update entry
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE id=%s LIMIT 1",
array(bigintval($value), REQUEST_POST('perc', $id), $id), __FILE__, __LINE__);
}
- $message = REF_DEPTHS_SAVED;
+ $message = getMessage('REF_DEPTHS_SAVED');
break;
case "del":
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
}
- $message = REF_DEPTHS_DELETED;
+ $message = getMessage('REF_DEPTHS_DELETED');
break;
}
runFilterChain('run_sqls');
// Entry saved...
- $message = SETTINGS_SAVED;
+ $message = getMessage('SETTINGS_SAVED');
// Destroy config cache file here...
rebuildCacheFiles("config", "config");
// Load template
LOAD_TEMPLATE("admin_config_point_settings");
} elseif (REQUEST_GET('sub') == "ref") {
- if ((REQUEST_ISSET_POST(('del'))) && (REQUEST_ISSET_POST(('sel'))) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
+ // 12 3 32 2 3 32 23 4 5 54 3 3 4 4321
+ if ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST('sel')) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST('sel', 0)))) {
// Delete entries
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value) {
// Load main template
LOAD_TEMPLATE("admin_points_del");
- } elseif ((REQUEST_ISSET_POST(('edit'))) && (REQUEST_ISSET_POST(('sel'))) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0))))) {
+ } elseif ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('sel')) && ((SELECTION_COUNT(REQUEST_POST('sel')) > 0) || (REQUEST_ISSET_POST(('sel', 0)))) {
// Edit entries
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value) {
LOAD_TEMPLATE("admin_settings_saved", false, RALLYE_ENTRIES_CHANGED);
}
- if (REQUEST_ISSET_POST(('edit'))) {
+ if (REQUEST_ISSET_POST('edit')) {
// Check if at last one line is selected
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
LOAD_TEMPLATE("admin_settings_saved", false, $content);
}
}
- elseif (REQUEST_ISSET_POST(('del')))
+ elseif (REQUEST_ISSET_POST('del'))
{
// Check if at last one line is selected
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
}
// Add form for adding new price level
- if (!REQUEST_ISSET_POST(('edit'))) {
+ if (!REQUEST_ISSET_POST('edit')) {
LOAD_TEMPLATE("admin_add_rallye_prices", false, REQUEST_GET('rallye'));
}
} else {
// Output message
if (getConfig('repay_deleted_mails') == "REPAY") {
// Repayed
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_POINTS_REPAYED,
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
TRANSLATE_COMMA($totalPoints)
));
} else {
// To jackpot
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_POINTS_TO_JACKPOT,
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
TRANSLATE_COMMA($totalPoints)
));
}
}
} else {
// Points shredded!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_POINTS_SHREDDED, $totalPoints));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_POINTS_SHREDDED'), $totalPoints));
}
// Remove links from DB
// Check for selected holidays
$SUM = 0;
-if (REQUEST_ISSET_POST(('sel'))) $SUM = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $SUM = SELECTION_COUNT(REQUEST_POST('sel'));
// Shall I delete selected holidays???
if ($SUM > 0)
// Send email to user
$msg = LOAD_EMAIL_TEMPLATE("member_holiday_removed", $content, $uid);
- SEND_EMAIL($uid, HOLIDAY_ADMIN_REMOVED_SUBJ, $msg);
+ SEND_EMAIL($uid, getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $msg);
$cnt++;
}
}
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_ADMIN_MULTI_DEL_1.$cnt.HOLIDAY_ADMIN_MULTI_DEL_2);
-}
- elseif (REQUEST_ISSET_GET(('uid')))
-{
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt));
+} elseif (REQUEST_ISSET_GET(('uid'))) {
// Set default message
- $MSG = HOLIDAY_ADMIN_SINGLE_404;
+ $MSG = getMessage('HOLIDAY_ADMIN_SINGLE_404');
// Fetch data
$result_load = SQL_QUERY_ESC("SELECT holiday_start AS start, holiday_end AS end
FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s LIMIT 1", array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_load) == 1)
- {
+ if (SQL_NUMROWS($result_load) == 1) {
// Load data
$content = SQL_FETCHARRAY($result_load);
- // Free some memory
- unset($content[0]);
- unset($content[1]);
-
// Delete one holiday request (for task)
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s LIMIT 1", array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
// Send email to user
$msg = LOAD_EMAIL_TEMPLATE("member_holiday_removed", $content, REQUEST_GET('uid'));
- SEND_EMAIL(REQUEST_GET('uid'), HOLIDAY_ADMIN_REMOVED_SUBJ, $msg);
+ SEND_EMAIL(REQUEST_GET('uid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $msg);
// Set message
- $MSG = HOLIDAY_ADMIN_SINGLE_DELETED;
+ $MSG = getMessage('HOLIDAY_ADMIN_SINGLE_DELETED');
}
// Free memory
// Output message
LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-}
- else
-{
+} else {
// Please call me over other scripts... ;)
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_NO_DIRECT_CALL);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_NO_DIRECT_CALL'));
}
+
//
?>
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (REQUEST_ISSET_POST(('del')))
+if (REQUEST_ISSET_POST('del'))
{
// Delete entries from tables
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
ADD_DESCR("admin", __FILE__);
// User exists..
-if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST(('del'))) && (REQUEST_ISSET_POST(('reason'))))) {
+if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) {
// Delete users account
$result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
INIT_SQLS();
// Sponsor was found
- if ((IS_FORM_SENT()) || (REQUEST_ISSET_POST(('edit')))) {
+ if ((IS_FORM_SENT()) || (REQUEST_ISSET_POST('edit'))) {
// Perform action on mode
switch (REQUEST_GET('mode'))
{
// Output selection form with all confirmed user accounts listed
ADD_MEMBER_SELECTION_BOX();
}
- elseif (REQUEST_ISSET_POST(('edit')))
+ elseif (REQUEST_ISSET_POST('edit'))
{
// Ok, change the account...
$PASS = false; $ADD = "";
// Normally we want the overview of all registered extensions
$do = "overview";
$SEL = 0;
-if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if (REQUEST_ISSET_GET(('reg_ext'))) {
// We are about to register a new extension
EXTENSION_RUN_SQLS($ext_id, $EXT_LOAD_MODE);
}
}
-} elseif (((REQUEST_ISSET_POST(('edit'))) || (REQUEST_ISSET_POST(('modify')))) && ($SEL > 0) && (!IS_DEMO())) {
+} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST(('modify')))) && ($SEL > 0) && (!IS_DEMO())) {
// Change settings like CSS file load
if (REQUEST_ISSET_POST(('modify'))) {
// Change entries
// Is the extension deprecated?
if (EXT_GET_DEPRECATED() == "N") {
// ... so we can finally register and load it in registration mode
- $status = EXTENSION_REGISTER($ext_name, $ext_id);
- if ($status == true) {
+ if (EXTENSION_REGISTER($ext_name, $ext_id)) {
// Extension was found and successfully registered
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_EXTENSION_REGISTERED'));
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REG_FAILED_ALREADY'));
} else {
// Notify the admin that we have a problem here...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REG_FAILED_404'));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
}
} else {
// Motify the admin that we have a problem here...
// Get count of (maybe) selected menu points
$chk = 0;
-if (REQUEST_ISSET_POST(('sel'))) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
// List all menu points and make them editable
-if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO()))
+if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
{
// Edit menu entries
define('__SUB_VALUE', $SUB);
// Load template
LOAD_TEMPLATE("admin_gmenu_edit_form");
-} elseif ((REQUEST_ISSET_POST(('del'))) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) {
// Del menu entries with or without confirmation
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
if (REQUEST_ISSET_POST(('change'))) {
// Change permissions
ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "bank_packages", "package_active");
- } elseif (REQUEST_ISSET_POST(('edit'))) {
+ } elseif (REQUEST_ISSET_POST('edit')) {
// Delete entries (with confirmation)
ADMIN_EDIT_ENTRIES_CONFIRM(
REQUEST_POST('id'),
if (EXT_IS_ACTIVE("autopurge")) {
define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - getConfig('ap_inactive_since'), "2"));
} else {
- define('__AUTOPURGE_TIMEOUT', sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "autopurge"));
+ define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "autopurge"));
}
// Load final template
'url' => "modules.php?module=admin&what=list_country",
'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK')
));
-} elseif (((REQUEST_ISSET_POST(('edit'))) || (REQUEST_ISSET_POST(('delete')))) && (REQUEST_ISSET_POST(('id')))) {
+} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST(('delete')))) && (REQUEST_ISSET_POST(('id')))) {
if (count(REQUEST_POST('id')) > 0) {
- if (REQUEST_ISSET_POST(('edit'))) {
+ if (REQUEST_ISSET_POST('edit')) {
// Edit template
$row = "admin_list_country_edit_row";
$post = "modify";
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (!REQUEST_ISSET_GET(('del'))) REQUEST_SET_GET('del', "");
+if (!REQUEST_ISSET_GET('del')) REQUEST_SET_GET('del', "");
if (REQUEST_ISSET_GET(('uid'))) {
// Check if the user already exists
}
}
-if (REQUEST_ISSET_POST(('edit'))) {
+if (REQUEST_ISSET_POST('edit')) {
// Check for selections
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
if ((REQUEST_POST('pay_min_count') == 0) || (!REQUEST_ISSET_POST(('pay_min_count')))) REQUEST_UNSET_POST(('add'));
if (!REQUEST_ISSET_POST(('pay_currency'))) REQUEST_UNSET_POST(('add'));
-} elseif ((REQUEST_ISSET_POST(('edit'))) || (REQUEST_ISSET_POST(('del'))) || (REQUEST_ISSET_POST(('change'))) || (REQUEST_ISSET_POST(('remove')))) {
+} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST(('change'))) || (REQUEST_ISSET_POST(('remove')))) {
// Check if at least one entry was selected
if (!REQUEST_ISSET_POST(('id'))) {
// Nothing selected for editing / deleting???
- REQUEST_UNSET_POST(('edit'));
- REQUEST_UNSET_POST(('del'));
+ REQUEST_UNSET_POST('edit');
+ REQUEST_UNSET_POST('del');
REQUEST_UNSET_POST(('change'));
REQUEST_UNSET_POST(('remove'));
} elseif (REQUEST_ISSET_POST(('change'))) {
// Output message
LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-} elseif ((REQUEST_ISSET_POST(('edit'))) || (REQUEST_ISSET_POST(('del')))) {
+} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del'))) {
// Load all data
$OUT = ""; $SW = 2;
foreach (REQUEST_POST('id') as $id => $sel) {
'curr' => htmlspecialchars($curr)
);
- if (REQUEST_ISSET_POST(('edit'))) {
+ if (REQUEST_ISSET_POST('edit')) {
// Edit entry
$OUT .= LOAD_TEMPLATE("admin_list_sponsor_pay_edit_row", true, $content);
} else {
define('__SPONSOR_ROWS', $OUT);
// Load main template depending on mode (edit/delete)
- if (REQUEST_ISSET_POST(('edit'))) {
+ if (REQUEST_ISSET_POST('edit')) {
// Load main edit template
LOAD_TEMPLATE("admin_list_sponsor_pay_edit");
} else {
}
// Edit or delete button hit?
-if (REQUEST_ISSET_POST(('edit'))) {
+if (REQUEST_ISSET_POST('edit')) {
// Show entries for editing
ADMIN_EDIT_ENTRIES_CONFIRM(
REQUEST_POST('id'),
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
}
- } elseif (REQUEST_ISSET_POST(('del'))) {
+ } elseif (REQUEST_ISSET_POST('del')) {
// Delete tasks
foreach (REQUEST_POST('task') as $id => $sel) {
if (REQUEST_GET('type') == "deleted") {
LOAD_TEMPLATE("admin_list_wernis_main", false, $OUT);
} else {
// Nothing to display!
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_ADMIN_NO_TRANSFERS);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_ADMIN_NO_TRANSFERS'));
}
// Free the result
// Prepare message
$MSG = USER_ACCOUNT_UNLOCKED_1.REQUEST_GET('uid').USER_ACCOUNT_UNLOCKED_2;
$ACT = true;
- } elseif (REQUEST_ISSET_POST(('del'))) {
+ } elseif (REQUEST_ISSET_POST('del')) {
// Delete the account
$ACT = true;
LOAD_INC_ONCE("inc/modules/admin/what-del_user.php");
}
} else {
// List access logfiles
- $dir = PATH.getConfig('logs_base')."/";
+ $dir = constant('PATH') . getConfig('logs_base') . "/";
if (is_dir($dir)) {
// logs directory does exist
OUTPUT_HTML("<ol>");
// Get count of (maybe) selected menu points
$chk = 0;
-if (REQUEST_ISSET_POST(('sel'))) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $chk = SELECTION_COUNT(REQUEST_POST('sel'));
// List all menu points and make them editable
-if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) {
+if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
// Edit menu entries
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
// Load template
LOAD_TEMPLATE("admin_mmenu_edit");
-} elseif ((REQUEST_ISSET_POST(('del'))) && ($chk > 0) && (!IS_DEMO())) {
+} elseif ((REQUEST_ISSET_POST('del')) && ($chk > 0) && (!IS_DEMO())) {
// Del menu entries with or without confirmation
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
// Output template
LOAD_TEMPLATE("admin_settings_saved", false, $content);
-} elseif ((REQUEST_ISSET_POST(('del'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries here
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value) {
// Load main template
LOAD_TEMPLATE("admin_del_payments");
-} elseif ((REQUEST_ISSET_POST(('edit'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
+} elseif ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit entries
$SW = 2; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $value) {
}
// Check selection count
-if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if (IS_FORM_SENT()) {
// Fix older calls from add-new-banner-form
$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
}
LOAD_TEMPLATE("admin_settings_saved", false, $content);
-} elseif (($SEL > 0) && (REQUEST_ISSET_POST(('edit')))) {
+} elseif (($SEL > 0) && (REQUEST_ISSET_POST('edit'))) {
// Edit banner
$SW = ""; $OUT = "";
foreach (REQUEST_POST('sel') as $id => $sel) {
// Load main template
LOAD_TEMPLATE("admin_refbanner_edit");
} else {
- if (($SEL > 0) && (REQUEST_ISSET_POST(('del'))))
+ if (($SEL > 0) && (REQUEST_ISSET_POST('del')))
{
// Delete banner
foreach (REQUEST_POST('sel') as $id => $sel) {
// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
-while (list($id, $act) = SQL_FETCHROW($result_fix))
-{
+while (list($id, $act) = SQL_FETCHROW($result_fix)) {
// Store act value for later usage in sorting sub menus
$ACTIONS[] = $act;
// Check for selected themes
$SEL = 0;
-if (REQUEST_ISSET_POST(('sel'))) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
+if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
$OUT = "";
foreach (REQUEST_POST('sel') as $id => $sel) {
$sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
}
$OUT = getMessage('ADMIN_THEMES_UPDATED');
- } elseif (REQUEST_ISSET_POST(('del'))) {
+ } elseif (REQUEST_ISSET_POST('del')) {
// Delete themes
$sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_themes` WHERE id='".$id."' LIMIT 1";
$OUT = getMessage('ADMIN_THEMES_DELETED');
if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST(('lock')))) {
// Count checked checkboxes
$SEL = 0;
- if (REQUEST_ISSET_POST(('sel'))) {
+ if (REQUEST_ISSET_POST('sel')) {
// Are there checked boxes?
if (count(REQUEST_POST('sel')) > 0) {
// Count now... We use an own function for now
'ctime' => array()
);
- if (($response[3] != "[EOF]") && ($ONLINE['version'] == FULL_VERSION)) {
+ if (($response[3] != "[EOF]") && ($ONLINE['version'] == constant('FULL_VERSION'))) {
// We have found new patches (newer than FULL_VERSION)
$max = str_replace("\n", "", $response[sizeof($response) - 2]); $TOTAL_SIZE = 0;
</div>");
} else {
// Nothing to load, then we have no directory "usage"
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_USAGE_DIRECTORY_404, getConfig('usage_base')));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base')));
}
//
SEND_EMAIL(REQUEST_POST('email'), SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_ACTIVATION_LINK_SENT);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACTIVATION_LINK_SENT'));
} else {
// No account found or not UNCONFIRMED
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_ACTIVATION_LINK_404);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACTIVATION_LINK_404'));
}
// Free memory
array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_LOST_PASSWORD_SENT);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOST_PASSWORD_SENT'));
} else {
// No account found or not UNCONFIRMED
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_LOST_PASSWORD_404);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOST_PASSWORD_404'));
}
// Free memory
LOAD_URL("modules.php?module=sponsor");
} else {
// Cookie setup failed!
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSPOR_COOKIE_SETUP_FAILED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED'));
// Login formular and other links
LOAD_TEMPLATE("guest_sponsor_login");
}
} else {
// Account missing or wrong pass! We shall not find this out for the "hacker folks"...
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_LOGIN_FAILED_404_WRONG_PASS);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS'));
// Login formular and other links
LOAD_TEMPLATE("guest_sponsor_login");
LOAD_TEMPLATE("guest_sponsor_reg");
} else {
// Nothing added so far
- LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_PAYMENT_LIST_IS_EMPTY);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY'));
}
// Free memory
$result2 = SQL_QUERY_ESC("SELECT timestamp_ordered FROM `{!_MYSQL_PREFIX!}_user_stats`
WHERE userid=%s ORDER BY timestamp_ordered DESC LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
-if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1))
-{
+if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) {
// Mail order found!
list($stamp1) = SQL_FETCHROW($result1);
list($stamp2) = SQL_FETCHROW($result2);
if (empty($stamp1)) $stamp1 = 0;
if (empty($stamp2)) $stamp2 = 0;
- if ((($stamp1 + getConfig('holiday_lock')) > time()) || (($stamp2 + getConfig('holiday_lock')) > time()))
- {
+ if ((($stamp1 + getConfig('holiday_lock')) > time()) || (($stamp2 + getConfig('holiday_lock')) > time())) {
// Mail order is to close away!
REQUEST_UNSET_POST('ok');
- REQUEST_UNSET_POST(('stop'));
+ REQUEST_UNSET_POST('stop');
- if (($stamp1 + getConfig('holiday_lock')) > time())
- {
+ if (($stamp1 + getConfig('holiday_lock')) > time()) {
// Mail found in pool
$stamp = $stamp1;
- }
- else
- {
+ } else {
// Mail found in stats
$stamp = $stamp2;
}
// Display message and exit here
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_MEMBER_ORDER_1.MAKE_DATETIME($stamp, "1").HOLIDAY_MEMBER_ORDER_2);
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), MAKE_DATETIME($stamp, "1")));
return;
}
}
// Test both values
$TEST = $END - $START;
- if (($TEST < 0) || ($TEST > (getConfig('one_day') * getConfig('holiday_max'))) || ($START < time()) || ($END < time()))
- {
+ if (($TEST < 0) || ($TEST > (getConfig('one_day') * getConfig('holiday_max'))) || ($START < time()) || ($END < time())) {
// Time test failed
REQUEST_UNSET_POST('ok');
- }
- else
- {
+ } else {
// Everything went okay so let's store his request and send mails
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_holidays` (userid, holiday_start, holiday_end, comments) VALUES ('%s','%s','%s','%s')",
array($GLOBALS['userid'], $START, $END, REQUEST_POST('comments')), __FILE__, __LINE__);
// Send mail to member
$msg = LOAD_EMAIL_TEMPLATE("member_holiday_request", REQUEST_POST('comments'), $GLOBALS['userid']);
- SEND_EMAIL($GLOBALS['userid'], HOLIDAY_MEMBER_SUBJECT, $msg);
+ SEND_EMAIL($GLOBALS['userid'], getMessage('HOLIDAY_MEMBER_SUBJECT'), $msg);
// Send mail to all admins
- SEND_ADMIN_NOTIFICATION(HOLIDAY_ADMIN_SUBJECT, "admin_holiday_request", REQUEST_POST('comments'), $GLOBALS['userid']);
+ SEND_ADMIN_NOTIFICATION(getMessage('HOLIDAY_ADMIN_SUBJECT'), "admin_holiday_request", REQUEST_POST('comments'), $GLOBALS['userid']);
// Create task
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','%s','%s', UNIX_TIMESTAMP())",
- array($GLOBALS['userid'], HOLIDAY_ADMIN_SUBJECT, $msg), __FILE__, __LINE__);
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','{--HOLIDAY_ADMIN_SUBJECT--}','%s', UNIX_TIMESTAMP())",
+ array($GLOBALS['userid'], $msg), __FILE__, __LINE__);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_IS_ACTIVATED_NOW);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_IS_ACTIVATED_NOW'));
}
}
WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
// Send email to admin
- SEND_ADMIN_NOTIFICATION(HOLIDAY_ADMIN_DEAC_SUBJ, "admin_holiday_deactivated", array(), $GLOBALS['userid']);
+ SEND_ADMIN_NOTIFICATION(getMessage('HOLIDAY_ADMIN_DEAC_SUBJ'), "admin_holiday_deactivated", array(), $GLOBALS['userid']);
// Display message to user
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_MEMBER_DEACTIVATED_NOW);
- }
- else
- {
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW'));
+ } else {
// Display message to user
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_MEMBER_CANNOT_DEACTIVATE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE'));
}
- }
- elseif ($active == "Y")
- {
+ } elseif ($active == "Y") {
// To fast!
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_MEMBER_LOCKED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_LOCKED'));
}
}
LOAD_TEMPLATE("member_holiday_form");
break;
}
- }
- else
- {
+ } else {
// To fast!
- LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_MEMBER_LOCKED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_LOCKED'));
}
}
//
// Detect what the member wants to do
$MODE = "show"; // Show his data
if (REQUEST_ISSET_POST(('save'))) $MODE = "save"; // Save entered data
-if (REQUEST_ISSET_POST(('edit'))) $MODE = "edit"; // Edit data
+if (REQUEST_ISSET_POST('edit')) $MODE = "edit"; // Edit data
if (REQUEST_ISSET_POST(('notify'))) $MODE = "notify"; // Switch off notification
switch ($MODE)
// Nickname was submitted so let's check if it is not already in use
if (REQUEST_ISSET_POST(('nickname'))) {
// Check if nickname is valid
- $PATTERN = "[".__NICKNAME_PATTERN."]{".__NICKNAME_LENGTH.",}";
+ $PATTERN = "[".getConfig('nickname_pattern')."]{".getConfig('nickname_length').",}";
if (ereg($PATTERN, REQUEST_POST('nickname'), $array)) {
// Entered nickname is valid?
if ($array[0] == REQUEST_POST('nickname')) $VALID = true;
// Do we have already submit the form?
if (REQUEST_ISSET_POST(('nickname'))) {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".NICKNAME_IS_INVALID."</div");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--NICKNAME_IS_INVALID--}</div");
} // END - if
// Load Template
while ($data = SQL_FETCHARRAY($result)) {
// Prepare data for output
$rowContent = array(
- 'stamp' => MAKE_DATETIME($data['primera_timestamp'], "2"),
+ 'stamp' => MAKE_DATETIME($data['primera_timestamp'], "2"),
'points' => TRANSLATE_COMMA($data['primera_amount']),
- 'acc' => SQL_ESCAPE($data['primera_account']),
+ 'acc' => SQL_ESCAPE($data['primera_account']),
'status' => PRIMERA_TRANSFER_STATUS($data['primera_type']),
- 'raw_type' => strtolower($data['primera_type']),
+ 'raw_type' => strtolower($data['primera_type']),
'sw' => $SW,
);
// Is this enougth for a payout?
if ($points < getConfig('primera_min_payout')) {
// No, then abort here
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT, TRANSLATE_COMMA(getConfig('primera_min_payout'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'), TRANSLATE_COMMA(getConfig('primera_min_payout'))));
return;
}
SQL_FREERESULT($result);
} else {
// Invalid mode!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(PRIMERA_MEMBER_MODE_INVALID, REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
// Is the user ID and password set?
if (!REQUEST_ISSET_POST(('primera_nickname'))) {
// Nothing entered in Primus nickname
- LOAD_TEMPLATE("admin_settings_saved", false, PRIMERA_MEMBER_EMPTY_USERNAME);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_EMPTY_USERNAME'));
} elseif (!REQUEST_ISSET_POST(('primera_password'))) {
// Nothing entered in Primera password
- LOAD_TEMPLATE("admin_settings_saved", false, PRIMERA_MEMBER_EMPTY_PASSWORD);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_EMPTY_PASSWORD'));
} elseif (!REQUEST_ISSET_POST(('amount'))) {
// Nothing entered in amount
- LOAD_TEMPLATE("admin_settings_saved", false, PRIMERA_MEMBER_EMPTY_AMOUNT);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_EMPTY_AMOUNT'));
} elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) {
// Only numbers in amount!
- LOAD_TEMPLATE("admin_settings_saved", false, PRIMERA_MEMBER_INVALID_AMOUNT);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT'));
} elseif (REQUEST_POST('amount') < getConfig('primera_min_payout')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(PRIMERA_MEMBER_AMOUNT_SMALLER_MIN, bigintval(getConfig('primera_min_payout'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('primera_min_payout'))));
} elseif (REQUEST_POST('amount') > $points) {
// Not enougth points left!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED, bigintval(REQUEST_POST('amount')), bigintval($points)));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
} else {
// All is fine here so do the payout
$success = PRIMERA_EXECUTE_PAYOUT(REQUEST_POST('primera_nickname'), md5(REQUEST_POST('primera_password')), REQUEST_POST('amount'));
array(REQUEST_POST('primera_nickname'), $GLOBALS['userid']), __FILE__, __LINE__);
// All done!
- LOAD_TEMPLATE("admin_settings_saved", false, PRIMERA_MEMBER_PAYOUT_DONE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE'));
return;
} elseif ((GET_PRIMERA_ERROR_CODE() == "user_failed") || (GET_PRIMERA_ERROR_CODE() == "own_failed") || (GET_PRIMERA_ERROR_CODE() == "amount_failed") || (GET_PRIMERA_ERROR_CODE() == "api_amount_failed")) {
// Wrong login data
LOAD_TEMPLATE("admin_settings_saved", false, GET_PRIMERA_ERROR_MESSAGE());
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(PRIMERA_MEMBER_PAYOUT_FAILED, GET_PRIMERA_ERROR_MESSAGE()));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_FAILED'), GET_PRIMERA_ERROR_MESSAGE()));
}
}
break;
default: // Invalid mode!
DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode')));
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(PRIMERA_MEMBER_MODE_INVALID, REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
} // END - if
ADD_DESCR("member", __FILE__);
// Was the form submitted?
-if ((REQUEST_ISSET_POST(('edit'))) && (REQUEST_ISSET_POST(('id')))) {
+if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST(('id')))) {
// Okay, has the user entered some values?
if (REQUEST_ISSET_POST(('percents'))) {
// Revert german commta for testing
list($uid1, $gender1, $sname1, $fname1, $email1, $nick1) = SQL_FETCHROW($result);
list($uid2, $gender2, $sname2, $fname2, $email2, $nick2) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
+ // @TODO Rewrite all these constants to array elements
if ($uid1 == $GLOBALS['userid']) {
// Data row 1 is sender's data
- define('__SENDER_GENDER' , TRANSLATE_GENDER($gender1));
- define('__SENDER_NICK' , $nick1);
- define('__SENDER_SNAME' , $sname1);
- define('__SENDER_FNAME' , $fname1);
- define('__SENDER_EMAIL' , $email1);
+ define('__SENDER_GENDER' , TRANSLATE_GENDER($gender1));
+ define('__SENDER_NICK' , $nick1);
+ define('__SENDER_SNAME' , $sname1);
+ define('__SENDER_FNAME' , $fname1);
+ define('__SENDER_EMAIL' , $email1);
// Data row 2 is recpient's data
- define('__RECIPIENT_GENDER' , TRANSLATE_GENDER($gender2));
- define('__RECIPIENT_NICK' , $nick2);
- define('__RECIPIENT_SNAME', $sname2);
- define('__RECIPIENT_FNAME', $fname2);
- define('__RECIPIENT_EMAIL', $email2);
+ define('__RECIPIENT_GENDER', TRANSLATE_GENDER($gender2));
+ define('__RECIPIENT_NICK' , $nick2);
+ define('__RECIPIENT_SNAME' , $sname2);
+ define('__RECIPIENT_FNAME' , $fname2);
+ define('__RECIPIENT_EMAIL' , $email2);
// Prepare variables for testing
$TEST_NICK_SENDER = $nick1;
$TEST_NICK_REC = $nick2;
} else {
// Data row 2 is sender's data
- define('__SENDER_GENDER' , TRANSLATE_GENDER($gender2));
- define('__SENDER_NICK' , $nick2);
- define('__SENDER_SNAME' , $sname2);
- define('__SENDER_FNAME' , $fname2);
- define('__SENDER_EMAIL' , $email2);
+ define('__SENDER_GENDER' , TRANSLATE_GENDER($gender2));
+ define('__SENDER_NICK' , $nick2);
+ define('__SENDER_SNAME' , $sname2);
+ define('__SENDER_FNAME' , $fname2);
+ define('__SENDER_EMAIL' , $email2);
// Data row 1 is recpient's data
- define('__RECIPIENT_GENDER' , TRANSLATE_GENDER($gender1));
- define('__RECIPIENT_NICK' , $nick1);
- define('__RECIPIENT_SNAME', $sname1);
- define('__RECIPIENT_FNAME', $fname1);
- define('__RECIPIENT_EMAIL', $email1);
+ define('__RECIPIENT_GENDER', TRANSLATE_GENDER($gender1));
+ define('__RECIPIENT_NICK' , $nick1);
+ define('__RECIPIENT_SNAME' , $sname1);
+ define('__RECIPIENT_FNAME' , $fname1);
+ define('__RECIPIENT_EMAIL' , $email1);
// Prepare variables for testing
$TEST_NICK_SENDER = $nick2;
define('__SENDER_UID' , $GLOBALS['userid']);
define('__RECIPIENT_UID' , REQUEST_POST('to_uid'));
- $SENDER = __SENDER_UID;
- $RECIPIENT = __RECIPIENT_UID;
+ $SENDER = constant('__SENDER_UID');
+ $RECIPIENT = constant('__RECIPIENT_UID');
if ($nick) {
- if (($TEST_NICK_SENDER != __SENDER_UID) && (!empty($TEST_NICK_SENDER))) {
- $SENDER = __SENDER_NICK;
+ if (($TEST_NICK_SENDER != constant('__SENDER_UID')) && (!empty($TEST_NICK_SENDER))) {
+ $SENDER = constant('__SENDER_NICK');
}
- if (($TEST_NICK_REC != __RECIPIENT_UID) && (!empty($TEST_NICK_REC))) {
- $RECIPIENT = __RECIPIENT_NICK;
+ if (($TEST_NICK_REC != constant('__RECIPIENT_UID')) && (!empty($TEST_NICK_REC))) {
+ $RECIPIENT = constant('__RECIPIENT_NICK');
}
}
SUB_POINTS("transfer", $GLOBALS['userid'], REQUEST_POST('points'));
// First send email to recipient
- $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", "", __RECIPIENT_UID);
- SEND_EMAIL(__RECIPIENT_EMAIL, TRANSFER_MEMBER_RECIPIENT_SUBJ.": ".$SENDER, $msg);
+ $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", "", constant('__RECIPIENT_UID'));
+ SEND_EMAIL(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ').": ".$SENDER, $msg);
// Second send email to sender
- $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", "", __SENDER_UID);
- SEND_EMAIL(__SENDER_EMAIL, TRANSFER_MEMBER_SENDER_SUBJ.": ".$RECIPIENT, $msg);
+ $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", "", constant('__SENDER_UID'));
+ SEND_EMAIL(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
// At last send admin mail(s)
- $ADMIN_SUBJ = sprintf("%s (%s->%s)", TRANSFER_ADMIN_SUBJECT, $SENDER, $RECIPIENT);
+ $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
SEND_ADMIN_NOTIFICATION($ADMIN_SUBJ, "admin_transfer_points");
// Transfer is completed
- LOAD_TEMPLATE("admin_settings_saved", false, TRANSFER_COMPLETED."<br /><a href=\"{!URL!}/modules.php?module=login&what=transfer\">".TRANSFER_CONTINUE_OVERVIEW."</a>");
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>");
} elseif (!$valid_code) {
// Invalid Touring code!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">".TRANSFER_INVALID_CODE."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>");
REQUEST_UNSET_POST('ok');
} elseif (!$valid_pass) {
// Wrong password entered
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">".TRANSFER_INVALID_PASSWORD."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>");
REQUEST_UNSET_POST('ok');
} elseif (!$valid_amount) {
// Too much points entered
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">".TRANSFER_INVALID_POINTS."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>");
REQUEST_UNSET_POST('ok');
} elseif (!$valid_reason) {
// No transfer reason entered
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">".TRANSFER_INVALID_REASON."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>");
REQUEST_UNSET_POST('ok');
} elseif (!$valid_recipient) {
// No recipient selected
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">".TRANSFER_INVALID_RECIPIENT."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>");
REQUEST_UNSET_POST('ok');
} elseif (!$valid_data) {
// No recipient selected
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">".TRANSFER_INVALID_DATA."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>");
REQUEST_UNSET_POST('ok');
}
}
{
case "list_in":
$sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
- $NOTHING = TRANSFER_NO_INCOMING_TRANSFERS;
- define('__TRANSFER_SUM', TRANSFER_TOTAL_INCOMING);
- define('__TRANSFER_TITLE', TRANSFER_LIST_INCOMING);
+ $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
+ define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_INCOMING'));
+ define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING'));
break;
case "list_out":
$sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
- $NOTHING = TRANSFER_NO_OUTGOING_TRANSFERS;
- define('__TRANSFER_SUM', TRANSFER_TOTAL_OUTGOING);
- define('__TRANSFER_TITLE', TRANSFER_LIST_OUTGOING);
+ $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
+ define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_OUTGOING'));
+ define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_OUTGOING'));
break;
}
// Nothing for in and out
$OUT = "<tr>
<td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, TRANSFER_NO_INOUT_TRANSFERS)."
+ ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
</td>
</tr>";
}
define('__TRANSFER_TOTAL_VALUE', $total);
// Set title
- define('__TRANSFER_TITLE', TRANSFER_LIST_ALL);
+ define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL'));
// Set "balance" word
- define('__TRANSFER_SUM', TRANSFER_TOTAL_BALANCE);
+ define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE'));
// Load final template
LOAD_TEMPLATE("member_transfer_list");
$opt_in = REQUEST_POST('opt_in');
// "Settings saved..."
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_done\">".SETTINGS_SAVED."</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
}
switch ($opt_in)
case "Y":
define('__TRANSFER_ALLOW_Y', " checked=\"checked\"");
define('__TRANSFER_ALLOW_N', "");
- define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=new\">".TRANSFER_NOW_LINK."</a>");
+ define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=new\">{--TRANSFER_NOW_LINK--}</a>");
break;
case "N":
define('__TRANSFER_ALLOW_Y', "");
define('__TRANSFER_ALLOW_N', " checked=\"checked\"");
- define('__TRANSFER_NEW_LINK', TRANSFER_PLEASE_ALLOW_OPT_IN);
+ define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
break;
}
// Load newest transaction
list($newest) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- define('__TRANSFER_SETTINGS_CONTENT', TRANSFER_LATEST_IS_1.MAKE_DATETIME($newest, "3").TRANSFER_LATEST_IS_2);
+ define('__TRANSFER_SETTINGS_CONTENT', sprintf(getMessage('TRANSFER_LATEST_IS'), MAKE_DATETIME($newest, "3")));
}
// Load template
$content['uid'] = $GLOBALS['userid'];
// Get timestamp from insert
- $content['user_status'] = sprintf(MEMBER_MAIL_BONUS_CONFIRMED_ON,
+ $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
MAKE_DATETIME(USER_STATS_GET_TIMESTAMP("bonusid", $content['id']), "2")
);
$content['uid'] = $GLOBALS['userid'];
// Get timestamp from insert
- $content['user_status'] = sprintf(MEMBER_MAIL_NORMAL_CONFIRMED_ON,
+ $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
MAKE_DATETIME(USER_STATS_GET_TIMESTAMP("mailid", $content['id']), "2")
);
WHERE s.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');
break;
case "BONUS":
$result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 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');
break;
default: // Unknown type detected!
// Subject line found?
if (empty($subject)) {
// No subject line!
- $subject = DEFAULT_SUBJECT_LINE;
+ $subject = getMessage('DEFAULT_SUBJECT_LINE');
} else {
// Compile it
$subject = COMPILE_CODE($subject);
$sender = bigintval($sender);
} elseif ($type == "bonusid") {
// Is admin
- $sender = _ADMIN_SHORT;
+ $sender = getMessage('_ADMIN_SHORT');
} else {
// Deleted
- $sender = EMAIL_STATUS_DELETED;
+ $sender = getMessage('EMAIL_STATUS_DELETED');
}
// Prepare data for template
SQL_FREERESULT($result);
} else {
// Invalid mode!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
// Is the user ID and password set?
if (!REQUEST_ISSET_POST(('wds66_id'))) {
// Nothing entered in WDS66 user ID
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_USERNAME);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME'));
} elseif (!REQUEST_ISSET_POST(('wds66_password'))) {
// Nothing entered in WDS66 password
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD'));
} elseif (!REQUEST_ISSET_POST(('amount'))) {
// Nothing entered in amount
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT'));
} elseif (REQUEST_POST('wds66_id') != bigintval(REQUEST_POST('wds66_id'))) {
// Only numbers in account ID!
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_USERNAME);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_INVALID_USERNAME'));
} elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) {
// Only numbers in amount!
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT'));
} else {
// Check input data depending on the mode and execute the requested mode
switch (REQUEST_GET('mode')) {
case "withdraw": // Widthdraws WDS66 -> This exchange
if (REQUEST_POST('amount') < getConfig('wernis_min_withdraw')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval(getConfig('wernis_min_withdraw'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('wernis_min_withdraw'))));
} else {
// All is fine here so do the withdraw
$success = WERNIS_EXECUTE_WITHDRAW(REQUEST_POST('wds66_id'), md5(REQUEST_POST('wds66_password')), REQUEST_POST('amount'));
array(bigintval(REQUEST_POST('wds66_id')), $GLOBALS['userid']), __FILE__, __LINE__);
// All done!
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_WITHDRAW_DONE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
return;
} elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed")) {
// Wrong login data
LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
}
}
break;
case "payout": // Payout this exchange -> WDS66
if (REQUEST_POST('amount') < getConfig('wernis_min_payout')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval(getConfig('wernis_min_payout'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), bigintval(getConfig('wernis_min_payout'))));
} elseif (REQUEST_POST('amount') > $points) {
// Not enougth points left!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED, bigintval(REQUEST_POST('amount')), bigintval($points)));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
} else {
// All is fine here so do the withdraw
$success = WERNIS_EXECUTE_PAYOUT(REQUEST_POST('wds66_id'), REQUEST_POST('amount'));
array(bigintval(REQUEST_POST('wds66_id')), $GLOBALS['userid']), __FILE__, __LINE__);
// All done!
- LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_PAYOUT_DONE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));
return;
} elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed") || (GET_WERNIS_ERROR_CODE() == "api_amount_failed")) {
// Wrong login data
LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
}
}
break;
default: // Invalid mode!
DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode')));
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
}