From 70b993e3f0cd47e3350fe86b75219e510dc56d0b Mon Sep 17 00:00:00 2001 From: quix0r Date: Wed, 4 Mar 2009 05:16:24 +0000 Subject: [PATCH] More constant rewrites --- inc/databases.php | 2 +- inc/language/de.php | 6 +- inc/language/holiday_de.php | 6 +- inc/language/transfer_de.php | 3 +- inc/libs/payout_functions.php | 2 +- inc/modules/admin/admin-inc.php | 69 +++++------- inc/modules/admin/what-adminedit.php | 6 +- inc/modules/admin/what-admins_contct.php | 8 +- inc/modules/admin/what-admins_edit.php | 8 +- inc/modules/admin/what-admins_mails.php | 6 +- inc/modules/admin/what-config_admins.php | 25 +++-- inc/modules/admin/what-config_cats.php | 4 +- inc/modules/admin/what-config_email.php | 4 +- inc/modules/admin/what-config_mods.php | 4 +- inc/modules/admin/what-config_payouts.php | 6 +- inc/modules/admin/what-config_points.php | 13 ++- .../admin/what-config_rallye_prices.php | 6 +- inc/modules/admin/what-del_email.php | 6 +- inc/modules/admin/what-del_holiday.php | 30 ++--- inc/modules/admin/what-del_transfer.php | 2 +- inc/modules/admin/what-del_user.php | 2 +- inc/modules/admin/what-edit_sponsor.php | 2 +- inc/modules/admin/what-edit_user.php | 2 +- inc/modules/admin/what-extensions.php | 9 +- inc/modules/admin/what-guestedit.php | 6 +- inc/modules/admin/what-list_bank_package.php | 2 +- inc/modules/admin/what-list_beg.php | 2 +- inc/modules/admin/what-list_country.php | 4 +- inc/modules/admin/what-list_links.php | 2 +- inc/modules/admin/what-list_rallyes.php | 2 +- inc/modules/admin/what-list_sponsor_pay.php | 12 +- inc/modules/admin/what-list_surfbar_urls.php | 2 +- inc/modules/admin/what-list_task.php | 2 +- inc/modules/admin/what-list_wernis.php | 2 +- inc/modules/admin/what-lock_user.php | 2 +- inc/modules/admin/what-logs.php | 2 +- inc/modules/admin/what-memedit.php | 6 +- inc/modules/admin/what-payments.php | 4 +- inc/modules/admin/what-refbanner.php | 6 +- inc/modules/admin/what-repair_gmenu.php | 3 +- inc/modules/admin/what-theme_edit.php | 4 +- inc/modules/admin/what-unlock_emails.php | 2 +- inc/modules/admin/what-updates.php | 2 +- inc/modules/admin/what-usage.php | 2 +- inc/modules/guest/what-sponsor_login.php | 12 +- inc/modules/guest/what-sponsor_reg.php | 2 +- inc/modules/member/what-holiday.php | 56 ++++------ inc/modules/member/what-mydata.php | 2 +- inc/modules/member/what-nickname.php | 4 +- inc/modules/member/what-primera.php | 28 ++--- inc/modules/member/what-refback.php | 2 +- inc/modules/member/what-transfer.php | 103 +++++++++--------- inc/modules/member/what-unconfirmed.php | 14 +-- inc/modules/member/what-wernis.php | 28 ++--- 54 files changed, 262 insertions(+), 289 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index 0921116be7..1d69f84613 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -98,7 +98,7 @@ define('SERVER_URL', "http://www.mxchange.org"); // 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)); diff --git a/inc/language/de.php b/inc/language/de.php index 6e2c3c3d1b..7209f9f378 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -740,7 +740,7 @@ define('ADMIN_REGISTER_EXTENSION_TITLE', "Erweiterung direkt registrieren"); 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 %s 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."); @@ -1203,9 +1203,7 @@ define('FILTER_FAILED_NOT_REMOVED', "Die Filterfunktion %s konnte nicht a define('FILTER_FLUSH_FAILED_NO_DATABASE', "Kann die Filterketten nicht speichern. Datenbank fehlt!"); // Status changes -define('ADMIN_STATUS_CHANGED_1', "Es wurden "); -define('ADMIN_STATUS_CHANGED_2', " von "); -define('ADMIN_STATUS_CHANGED_3', " Einträgen geändert."); +define('ADMIN_STATUS_CHANGED', "Es wurden %s von %s Einträgen geändert."); // ?> diff --git a/inc/language/holiday_de.php b/inc/language/holiday_de.php index 3f7b887ddc..cad193a294 100644 --- a/inc/language/holiday_de.php +++ b/inc/language/holiday_de.php @@ -56,8 +56,7 @@ define('HOLIDAY_ADMIN_DELETE_NOTE', "Bitte beachten Sie, dass beim vorzeitigen B 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 "); -define('HOLIDAY_ADMIN_MULTI_DEL_2', " Mitglied(-ern) beendet!"); +define('HOLIDAY_ADMIN_MULTI_DEL', "Urlaub von %s 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!"); @@ -69,8 +68,7 @@ define('HOLIDAY_MEMBER_CANNOT_DEACTIVATE', "Konnte Ihre Urlaubsschaltung nicht a 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: "); -define('HOLIDAY_MEMBER_ORDER_2', ""); +define('HOLIDAY_MEMBER_ORDER', "Sie können derzeit Ihre Urlaubsschaltung nicht verändern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: %s"); 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"); diff --git a/inc/language/transfer_de.php b/inc/language/transfer_de.php index 197a14d506..aa4e16c377 100644 --- a/inc/language/transfer_de.php +++ b/inc/language/transfer_de.php @@ -73,8 +73,7 @@ define('TRANSFER_MEMBER_SENDER_SUBJ', "{!POINTS!}-Ueberweisung an Mitglied"); 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 "); -define('TRANSFER_LATEST_IS_2', ""); +define('TRANSFER_LATEST_IS', "Einstellung gesperrt, letzte Überweisung war am %s"); 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."); diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index 5d886f1f09..9ab7329ec7 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -57,7 +57,7 @@ ORDER BY type", array($points), __FUNCTION__, __LINE__); if ($points >= $mpoi) { // Ok we found one $P = $points * $rate - 0.5; - OUTPUT_HTML("
  • {--PAYOUT_IN--}: ".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")
  • "); + OUTPUT_HTML("
  • {--PAYOUT_IN--}: ".$type." ({--PAYOUT_MAX--} ".round($P)." ".$type.")
  • "); } } diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index f96c247a98..f73c5c7782 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -349,25 +349,21 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { } $OUT .= " -  · "; - if (($menu == $act) && (empty($wht))) - { +  · "; + if (($menu == $act) && (empty($wht))) { $OUT .= ""; - } - else - { + } else { $OUT .= "["; } + $OUT .= $title; - if (($menu == $act) && (empty($wht))) - { + + if (($menu == $act) && (empty($wht))) { $OUT .= ""; - } - else - { + } else { $OUT .= "]"; } - $OUT .= " + $OUT .= " \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__); @@ -381,53 +377,47 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) { \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 .= " + $OUT .= "\n"; } } @@ -652,7 +642,8 @@ function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default="") { $handle = opendir(sprintf("%sinc/modules/%s/", constant('PATH'), $menu)) or mxchange_die("Cannot load menu ".$menu."!"); // Init the selection box - $OUT = " + \n"; // Walk through all files while ($file = readdir($handle)) { @@ -772,7 +763,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") { } // 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')); @@ -1001,7 +992,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu 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 @@ -1091,7 +1082,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc 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 diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 66f53c3321..1abebd0849 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -50,10 +50,10 @@ if (REQUEST_ISSET_GET(('sub'))) // 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); @@ -101,7 +101,7 @@ if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) { // 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); diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index 65e1f69cdf..7e13e8dfff 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -40,7 +40,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // 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 @@ -56,8 +56,8 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('admin')))) { } // 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")) { @@ -70,7 +70,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('admin')))) { 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')); } // diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index d3a151b791..57190ffde1 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -41,10 +41,10 @@ if ((!defined('__SECURITY')) || (!IS_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')); @@ -53,13 +53,13 @@ if (REQUEST_ISSET_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 { diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index fddbc9a0ae..fe95d6e405 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -40,7 +40,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // 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')); @@ -101,7 +101,7 @@ if (REQUEST_ISSET_POST(('edit'))) 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 @@ -171,7 +171,7 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__); 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')); } } diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 4f459c95d1..89a973b41a 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -41,9 +41,9 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { 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) { @@ -103,7 +103,7 @@ if ((REQUEST_ISSET_POST(('edit'))) && ($SEL > 0)) { // 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) { @@ -186,7 +186,7 @@ VALUES ('%s','%s','%s','%s')", 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")) { @@ -197,18 +197,18 @@ VALUES ('%s','%s','%s','%s')", } // 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 @@ -256,7 +256,16 @@ VALUES ('%s','%s','%s','%s')", 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"); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 2789835efb..5ba6ac5b9a 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -103,7 +103,7 @@ if (REQUEST_ISSET_POST(('add'))) { // 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) { @@ -128,7 +128,7 @@ if (REQUEST_ISSET_POST(('add'))) { // 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) diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 7048cd0a8f..6c06e0f951 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -93,7 +93,7 @@ if (REQUEST_ISSET_POST(('add_max'))) { // 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) @@ -120,7 +120,7 @@ if (REQUEST_ISSET_POST(('add_max'))) { // 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) { diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index 9f3b23c195..4b31635375 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -41,7 +41,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { 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) { @@ -80,7 +80,7 @@ if (REQUEST_ISSET_POST(('edit'))) { 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'))) { diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index d15f8ae59f..3156f0d7ec 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -77,7 +77,7 @@ VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')", $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 @@ -132,7 +132,7 @@ WHERE id='".$id."' LIMIT 1", // 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 @@ -140,7 +140,7 @@ WHERE id='".$id."' LIMIT 1", 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 = ""; diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index ae54e81cda..d94e18fec4 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -88,13 +88,13 @@ if (IS_FORM_SENT()) { $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": @@ -102,7 +102,7 @@ if (IS_FORM_SENT()) { 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; } @@ -148,7 +148,7 @@ WHERE mails_confirmed < %s", $REF, $REF)); runFilterChain('run_sqls'); // Entry saved... - $message = SETTINGS_SAVED; + $message = getMessage('SETTINGS_SAVED'); // Destroy config cache file here... rebuildCacheFiles("config", "config"); @@ -193,7 +193,8 @@ WHERE mails_confirmed < %s", $REF, $REF)); // 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) { @@ -218,7 +219,7 @@ WHERE mails_confirmed < %s", $REF, $REF)); // 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) { diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 73e182fdc6..91fe4c618a 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -109,7 +109,7 @@ VALUES ('%s','%s','%s','%s')", 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) { @@ -151,7 +151,7 @@ VALUES ('%s','%s','%s','%s')", 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')); @@ -238,7 +238,7 @@ VALUES ('%s','%s','%s','%s')", } // 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 { diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index 899eaeefa3..e980e2e767 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -113,12 +113,12 @@ WHERE s.pool_id=%s LIMIT 1", // 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) )); } @@ -128,7 +128,7 @@ WHERE s.pool_id=%s LIMIT 1", } } 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 diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index 8fa89f5218..1cc10d1094 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__); // 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) @@ -78,40 +78,33 @@ WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // 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 @@ -119,11 +112,10 @@ WHERE userid=%s LIMIT 1", array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE // 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')); } + // ?> diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index 6cfeda596a..5df9d0123d 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -41,7 +41,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']) || (!IS_ADMIN())) // 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')); diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 08ea5c04e9..ed7682ebad 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -41,7 +41,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { 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__); diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 205f315ae6..ff68e05684 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -99,7 +99,7 @@ if ((REQUEST_ISSET_GET(('id'))) && (REQUEST_ISSET_GET(('mode')))) { 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')) { diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 3934d67c65..ad0e07740f 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -59,7 +59,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET(('uid')))) // 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 = ""; diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 41f88a439a..9b2e17a70b 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", __FILE__); // 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 @@ -66,7 +66,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) { 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 @@ -299,8 +299,7 @@ case "register": // Register new extension // 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')); @@ -329,7 +328,7 @@ case "register": // Register new extension 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... diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index d5486ef469..df50fcd505 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -50,10 +50,10 @@ if (REQUEST_ISSET_GET(('sub'))) { // 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); @@ -99,7 +99,7 @@ if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) // 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); diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index e6d2c99a8f..1a55861a6e 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -47,7 +47,7 @@ if ((REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id'))) && (count(REQ 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'), diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 28e8f6abaa..ab4b87de35 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -111,7 +111,7 @@ ORDER BY beg_points DESC, last_online DESC, userid", 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 diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 2fb61b22b2..3d3c3806c9 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -75,9 +75,9 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ '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"; diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index e3697ab279..242a00c02b 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // 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 diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 3ed7e88846..37d54c8fca 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -149,7 +149,7 @@ WHERE id='".$id."' LIMIT 1", } } -if (REQUEST_ISSET_POST(('edit'))) { +if (REQUEST_ISSET_POST('edit')) { // Check for selections $SEL = SELECTION_COUNT(REQUEST_POST('sel')); if ($SEL > 0) { diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index cd7a8e117e..e9cb3ea777 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -52,12 +52,12 @@ if (REQUEST_ISSET_POST(('add'))) { 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'))) { @@ -124,7 +124,7 @@ if (REQUEST_ISSET_POST(('add'))) { // 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) { @@ -146,7 +146,7 @@ if (REQUEST_ISSET_POST(('add'))) { '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 { @@ -166,7 +166,7 @@ if (REQUEST_ISSET_POST(('add'))) { 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 { diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 6f9c4379c9..ed42872f93 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -53,7 +53,7 @@ if ((REQUEST_POST_COUNT() > 0) && ((!REQUEST_ISSET_POST(('id'))) || (!is_array(R } // 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'), diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 06ae256575..7ff74e062a 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -101,7 +101,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L 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") { diff --git a/inc/modules/admin/what-list_wernis.php b/inc/modules/admin/what-list_wernis.php index 99066dc9e8..b80e5b257a 100644 --- a/inc/modules/admin/what-list_wernis.php +++ b/inc/modules/admin/what-list_wernis.php @@ -70,7 +70,7 @@ if (SQL_NUMROWS($result) > 0) { 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 diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index aff963e0b4..ecb47ae081 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -105,7 +105,7 @@ if (REQUEST_ISSET_GET(('uid'))) { // 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"); diff --git a/inc/modules/admin/what-logs.php b/inc/modules/admin/what-logs.php index e3bce0b26e..8cecfde44e 100644 --- a/inc/modules/admin/what-logs.php +++ b/inc/modules/admin/what-logs.php @@ -84,7 +84,7 @@ if (REQUEST_ISSET_GET(('access'))) { } } 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("
      "); diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 038b52fd0c..4d86acd021 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -50,10 +50,10 @@ if (REQUEST_ISSET_GET(('sub'))) { // 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); @@ -93,7 +93,7 @@ if ((REQUEST_ISSET_POST(('edit'))) && ($chk > 0) && (!IS_DEMO())) { // 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); diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index 174395cf6a..0b2c08ff71 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -84,7 +84,7 @@ if (IS_FORM_SENT()) { // 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) { @@ -109,7 +109,7 @@ if (IS_FORM_SENT()) { // 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) { diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 229a8beadf..ba4d56c81c 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -49,7 +49,7 @@ if ((!REQUEST_ISSET_POST(('url'))) || (!REQUEST_ISSET_POST(('alternate')))) { } // 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 @@ -95,7 +95,7 @@ VALUES ('%s','%s','%s')", $content = "{--SETTINGS_NOT_SAVED--}"; } 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) { @@ -123,7 +123,7 @@ VALUES ('%s','%s','%s')", // 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) { diff --git a/inc/modules/admin/what-repair_gmenu.php b/inc/modules/admin/what-repair_gmenu.php index d62431b232..7475df7fec 100644 --- a/inc/modules/admin/what-repair_gmenu.php +++ b/inc/modules/admin/what-repair_gmenu.php @@ -44,8 +44,7 @@ $ACTIONS = array(); // 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; diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index c815f43986..28bf8512e9 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -45,7 +45,7 @@ ADD_DESCR("admin", __FILE__); // 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) { @@ -59,7 +59,7 @@ if ($SEL > 0) { $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'); diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 644d36a984..00e3bb80b4 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -52,7 +52,7 @@ ORDER BY `timestamp` ASC", __FILE__, __LINE__); 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 diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index 16f3a6a352..4a1c8d7806 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -83,7 +83,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ '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; diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index ad62821070..c61606a27e 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -111,7 +111,7 @@ if ((!empty($FQFN)) && (FILE_READABLE($FQFN))) { "); } 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'))); } // diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index afdc57186e..ae9999f57b 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -152,10 +152,10 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", 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 @@ -199,10 +199,10 @@ WHERE id='%s' LIMIT 1", 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 @@ -230,7 +230,7 @@ WHERE id='%s' AND password='%s' LIMIT 1", 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"); @@ -245,7 +245,7 @@ WHERE id='%s' AND password='%s' LIMIT 1", } } 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"); diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index ee9b518b38..1b0aefd274 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -400,7 +400,7 @@ ORDER BY pay_name", __FILE__, __LINE__); 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 diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index f44ea6a6b8..4b2c0ca334 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -53,33 +53,28 @@ WHERE sender=%s ORDER BY timestamp DESC LIMIT 1", array($GLOBALS['userid']), __F $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; } } @@ -96,13 +91,10 @@ if (IS_FORM_SENT()) // 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__); @@ -123,17 +115,17 @@ WHERE userid=%s LIMIT 1", // 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')); } } @@ -171,21 +163,17 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); 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')); } } @@ -259,11 +247,9 @@ WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); 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')); } } // diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 259ca95b4a..b71c4af1f6 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -50,7 +50,7 @@ define('UID_VALUE', $GLOBALS['userid']); $URL = ""; // 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) diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index b759afedd1..2a4c2edc91 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -50,7 +50,7 @@ if (IS_FORM_SENT()) { // 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; @@ -83,7 +83,7 @@ if ($VALID) { // Do we have already submit the form? if (REQUEST_ISSET_POST(('nickname'))) { - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".NICKNAME_IS_INVALID."{--NICKNAME_IS_INVALID--} 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, ); @@ -123,7 +123,7 @@ if (REQUEST_GET('mode') == "pay") { // 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; } @@ -146,7 +146,7 @@ if (REQUEST_GET('mode') == "pay") { 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; } @@ -158,22 +158,22 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { // 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')); @@ -195,21 +195,21 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { 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 diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index a0b735485f..4f751c7c2f 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -55,7 +55,7 @@ if (getConfig('refback_enabled') != "Y") { 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 diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 838aa5d78d..738ca29ba8 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -108,36 +108,37 @@ case "new": // Start new transfer 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; @@ -148,15 +149,15 @@ case "new": // Start new transfer 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'); } } @@ -182,42 +183,42 @@ case "new": // Start new transfer 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."
      ".TRANSFER_CONTINUE_OVERVIEW.""); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('TRANSFER_COMPLETED')."
      {--TRANSFER_CONTINUE_OVERVIEW--}"); } elseif (!$valid_code) { // Invalid Touring code! - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".TRANSFER_INVALID_CODE."
      "); + LOAD_TEMPLATE("admin_settings_saved", false, "
      {--TRANSFER_INVALID_CODE--}
      "); REQUEST_UNSET_POST('ok'); } elseif (!$valid_pass) { // Wrong password entered - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".TRANSFER_INVALID_PASSWORD."
      "); + LOAD_TEMPLATE("admin_settings_saved", false, "
      {--TRANSFER_INVALID_PASSWORD--}
      "); REQUEST_UNSET_POST('ok'); } elseif (!$valid_amount) { // Too much points entered - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".TRANSFER_INVALID_POINTS."
      "); + LOAD_TEMPLATE("admin_settings_saved", false, "
      {--TRANSFER_INVALID_POINTS--}
      "); REQUEST_UNSET_POST('ok'); } elseif (!$valid_reason) { // No transfer reason entered - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".TRANSFER_INVALID_REASON."
      "); + LOAD_TEMPLATE("admin_settings_saved", false, "
      {--TRANSFER_INVALID_REASON--}
      "); REQUEST_UNSET_POST('ok'); } elseif (!$valid_recipient) { // No recipient selected - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".TRANSFER_INVALID_RECIPIENT."
      "); + LOAD_TEMPLATE("admin_settings_saved", false, "
      {--TRANSFER_INVALID_RECIPIENT--}
      "); REQUEST_UNSET_POST('ok'); } elseif (!$valid_data) { // No recipient selected - LOAD_TEMPLATE("admin_settings_saved", false, "
      ".TRANSFER_INVALID_DATA."
      "); + LOAD_TEMPLATE("admin_settings_saved", false, "
      {--TRANSFER_INVALID_DATA--}
      "); REQUEST_UNSET_POST('ok'); } } @@ -299,16 +300,16 @@ case "list_out": // List only outgoing transactions { 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; } @@ -435,7 +436,7 @@ array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); // Nothing for in and out $OUT = "
    "; } @@ -447,10 +448,10 @@ array($GLOBALS['userid'], getConfig('transfer_max')), __FILE__, __LINE__); 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"); @@ -503,7 +504,7 @@ case "": // Overview page $opt_in = REQUEST_POST('opt_in'); // "Settings saved..." - LOAD_TEMPLATE("admin_settings_saved", false, "
    ".SETTINGS_SAVED."
    "); + LOAD_TEMPLATE("admin_settings_saved", false, "
    {--SETTINGS_SAVED--}
    "); } switch ($opt_in) @@ -511,13 +512,13 @@ case "": // Overview page case "Y": define('__TRANSFER_ALLOW_Y', " checked=\"checked\""); define('__TRANSFER_ALLOW_N', ""); - define('__TRANSFER_NEW_LINK', "".TRANSFER_NOW_LINK.""); + define('__TRANSFER_NEW_LINK', "{--TRANSFER_NOW_LINK--}"); 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; } @@ -534,7 +535,7 @@ LIMIT 1", array(getConfig('transfer_timeout'), $GLOBALS['userid']), __FILE__, __ // 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 diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index 88249052cc..5b2ebb2aec 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -67,7 +67,7 @@ WHERE id=%s LIMIT 1", $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") ); @@ -100,7 +100,7 @@ WHERE s.id=%s LIMIT 1", $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") ); @@ -138,13 +138,13 @@ ON s.pool_id=p.id 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! @@ -160,7 +160,7 @@ LIMIT 1", // 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); @@ -172,10 +172,10 @@ LIMIT 1", $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 diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 3cee441699..7f3cedff75 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -191,7 +191,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) { 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; } @@ -200,26 +200,26 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { // 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')); @@ -233,14 +233,14 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { 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; @@ -248,10 +248,10 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { 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')); @@ -264,21 +264,21 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { 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; } } -- 2.39.5
    -  --> "; - if ($readable === true) - { - if ($wht == $wht_sub) - { +  --> "; + if ($readable === true) { + if ($wht == $wht_sub) { $OUT .= ""; - } - else - { + } else { $OUT .= "["; } - } - else - { + } else { $OUT .= ""; } + $OUT .= $title_what; - if ($readable === true) - { - if ($wht == $wht_sub) - { + + if ($readable === true) { + if ($wht == $wht_sub) { $OUT .= ""; - } - else - { + } else { $OUT .= "]"; } - } - else - { + } else { $OUT .= ""; } - $OUT .= "
    - ".LOAD_TEMPLATE("admin_settings_saved", true, TRANSFER_NO_INOUT_TRANSFERS)." + ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."