]> git.mxchange.org Git - mailer.git/commitdiff
More constant rewrites
authorquix0r <quix0r@mxchange.org>
Wed, 4 Mar 2009 05:16:24 +0000 (05:16 +0000)
committerquix0r <quix0r@mxchange.org>
Wed, 4 Mar 2009 05:16:24 +0000 (05:16 +0000)
54 files changed:
inc/databases.php
inc/language/de.php
inc/language/holiday_de.php
inc/language/transfer_de.php
inc/libs/payout_functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-admins_contct.php
inc/modules/admin/what-admins_edit.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_cats.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-config_payouts.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-del_holiday.php
inc/modules/admin/what-del_transfer.php
inc/modules/admin/what-del_user.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-edit_user.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-list_bank_package.php
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_wernis.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-logs.php
inc/modules/admin/what-memedit.php
inc/modules/admin/what-payments.php
inc/modules/admin/what-refbanner.php
inc/modules/admin/what-repair_gmenu.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-updates.php
inc/modules/admin/what-usage.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/member/what-holiday.php
inc/modules/member/what-mydata.php
inc/modules/member/what-nickname.php
inc/modules/member/what-primera.php
inc/modules/member/what-refback.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/modules/member/what-wernis.php

index 0921116be7ad2803b3aa9d926a43a2cf32e2f6ff..1d69f84613566d40e09d4dd5edbb8eae4aca1637 100644 (file)
@@ -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));
 
index 6e2c3c3d1beefb1bc376faa7231bfce5bdaf0aa7..7209f9f37864f7a8cd1d5aa9c9849bb21eb91d12 100644 (file)
@@ -740,7 +740,7 @@ define('ADMIN_REGISTER_EXTENSION_TITLE', "Erweiterung direkt registrieren");
 define('ADMIN_SELECTED_TASKS_ASSIGN', "Zum Bearbeiten ausgew&auml;hlte Tasks");
 define('ADMIN_REG_FAILED_INVALID', "Registrierung fehlgeschlagen: Ung&uuml;tige ID &uuml;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.");
@@ -1203,9 +1203,7 @@ define('FILTER_FAILED_NOT_REMOVED', "Die Filterfunktion <u>%s</u> 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 <u>");
-define('ADMIN_STATUS_CHANGED_2', "</u> von <u>");
-define('ADMIN_STATUS_CHANGED_3', "</u> Eintr&auml;gen ge&auml;ndert.");
+define('ADMIN_STATUS_CHANGED', "Es wurden <u>%s</u> von <u>%s</u> Eintr&auml;gen ge&auml;ndert.");
 
 //
 ?>
index 3f7b887ddccb5ef2178b02d37dbeb0bd0ab6033b..cad193a2944d4b1db9e5a45152880c34a392000b 100644 (file)
@@ -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 &uuml;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&ouml;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&ouml;nnen keine Mails versenden, da Ihre Urlaubsschaltung aktiviert ist!");
 define('HOLIDAY_MEMBER_TLOCK', "Urlaubsschaltung eingerichtet");
 define('HOLIDAY_MEMBER_LOCKED', "Sie k&ouml;nnen derzeit Ihre Urlaubsschaltung nicht wieder deaktivieren, da Sie diese erst vor Kurzem aktiviert haben.");
-define('HOLIDAY_MEMBER_ORDER_1', "Sie k&ouml;nnen derzeit Ihre Urlaubsschaltung nicht ver&auml;ndern, da Ihre letzte Mailbuchung zu kurz her ist! Letzte Buchung: <u>");
-define('HOLIDAY_MEMBER_ORDER_2', "</u>");
+define('HOLIDAY_MEMBER_ORDER', "Sie k&ouml;nnen derzeit Ihre Urlaubsschaltung nicht ver&auml;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");
index 197a14d506a7e13c8aa813f24a9ab16ba60a7b23..aa4e16c377225c33a0a21a93734d3a13778be708 100644 (file)
@@ -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', "&Uuml;berweisung vollst&auml;ndig.");
 define('TRANSFER_CONTINUE_OVERVIEW', "Weiter zur &Uuml;bersichtsseite...");
-define('TRANSFER_LATEST_IS_1', "Einstellung gesperrt, letzte &Uuml;berweisung war am <strong>");
-define('TRANSFER_LATEST_IS_2', "</strong>");
+define('TRANSFER_LATEST_IS', "Einstellung gesperrt, letzte &Uuml;berweisung war am <strong>%s</strong>");
 define('TRANSFER_LIST_ALL', "Gesamte &Uuml;berweisungsliste anzeigen");
 define('TRANSFER_NO_INCOMING_TRANSFERS', "Keine eingehenden &Uuml;berweisungen gefunden.");
 define('TRANSFER_NO_OUTGOING_TRANSFERS', "Keine ausgehenden &Uuml;berweisungen gefunden.");
index 5d886f1f0993d661a62c88f25163ffc0cc3636c0..9ab7329ec72f39bdf6b3bcce7ca92983758f03dd 100644 (file)
@@ -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("<li>{--PAYOUT_IN--}: <strong><a href=\"{!URL!}/modules.php?module=login&amp;what=payout&amp;payout=".$id."\">".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")</a></strong></li>");
+                                       OUTPUT_HTML("<li>{--PAYOUT_IN--}: <strong><a href=\"{!URL!}/modules.php?module=login&amp;what=payout&amp;payout=".$id."\">".$type." ({--PAYOUT_MAX--} ".round($P)." ".$type.")</a></strong></li>");
                                }
                        }
 
index f96c247a98d1e07dbe9edf4f3e6bdc095520c4fe..f73c5c7782f40c452769ac04fabbe07a0b04019c 100644 (file)
@@ -349,25 +349,21 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                                }
                                $OUT .= "<tr>
        <td class=\"admin_menu\" colspan=\"2\">
-               <NOBR>&nbsp;<strong>&middot;</strong>&nbsp;";
-                               if (($menu == $act) && (empty($wht)))
-                               {
+               <nobr>&nbsp;<strong>&middot;</strong>&nbsp;";
+                               if (($menu == $act) && (empty($wht))) {
                                        $OUT .= "<strong>";
-                               }
-                                else
-                               {
+                               } else {
                                        $OUT .= "[<a href=\"{!URL!}/modules.php?module=admin&amp;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__);
@@ -381,53 +377,47 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                <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>&nbsp;<strong>--&gt;</strong>&nbsp;";
-                                                       if ($readable === true)
-                                                       {
-                                                               if ($wht == $wht_sub)
-                                                               {
+               <nobr>&nbsp;<strong>--&gt;</strong>&nbsp;";
+                                                       if ($readable === true) {
+                                                               if ($wht == $wht_sub) {
                                                                        $OUT .= "<strong>";
-                                                               }
-                                                                else
-                                                               {
+                                                               } else {
                                                                        $OUT .= "[<a href=\"{!URL!}/modules.php?module=admin&amp;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";
                                                }
                                        }
@@ -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 = "<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)) {
@@ -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
index 66f53c33210d4733106bd39643fe1dee4b5849c3..1abebd0849796287bc3758fb22226e1b074cbb3e 100644 (file)
@@ -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);
index 65e1f69cdf1aaf554eb76db3091332bf0b00d5af..7e13e8dfffe153d4a32f31ab850085e3547cc210 100644 (file)
@@ -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'));
 }
 
 //
index d3a151b79167580dc091b14fc6d30699b6c121a4..57190ffde1c1c6e65a3ec14d14bea424cf6d2545 100644 (file)
@@ -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 {
index fddbc9a0aed0cf7487f8ba6c1ae59a971cc709c9..fe95d6e4055efca1a503eaaa135198601ee39209 100644 (file)
@@ -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'));
        }
 }
 
index 4f459c95d108f8ba2d9ab41ceeb4884b0b4e7e16..89a973b41a448e40402111cc62a12ff8a6bf5968 100644 (file)
@@ -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");
index 2789835efb00b024e7124982ff5a728209ce9014..5ba6ac5b9af639d0b7d6fc387ef096fab3036e5c 100644 (file)
@@ -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)
index 7048cd0a8f1650afdca780f04e94a77283893b09..6c06e0f951183042a090b2c5fa7f8b5179c2d570 100644 (file)
@@ -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) {
index 9f3b23c19516dfa3e630ff08b043ed54cb9087d5..4b3163537561517dc54dfea9b7119266afcc7dcd 100644 (file)
@@ -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'))) {
index d15f8ae59fc5c8b0bafe00ebad6f048ea9698c2d..3156f0d7ec761b25da9069edc91be4cf90758eac 100644 (file)
@@ -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 = "";
index ae54e81cda0a5bca0a884b12122c5d36c42856f4..d94e18fec4da62f6170b57656160ab29be657de8 100644 (file)
@@ -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) {
index 73e182fdc68c2943320a3c93d9255a51a1067c87..91fe4c618a77fdd2552b2cc8670d4ad93fd6827f 100644 (file)
@@ -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 {
index 899eaeefa35895bfdfa84c0b43e54ae8e2966366..e980e2e767462def6484ea9b7ce4ede4627bb089 100644 (file)
@@ -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
index 8fa89f5218ad4fcadf5d0c97517d6f06b867d641..1cc10d10942ace1f9504933bc44068316f7575cd 100644 (file)
@@ -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'));
 }
+
 //
 ?>
index 6cfeda596acb3120c31e96e6557502caaf9b92d6..5df9d0123ddae436cae973a2f691685dba0c8c4a 100644 (file)
@@ -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'));
index 08ea5c04e9e48bd7df41c1c7d40f4cf3b5d41c06..ed7682ebadd17a2a5d91a2cfaa041a45438d32e1 100644 (file)
@@ -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__);
index 205f315ae689abab90ee294665882214320f1b4d..ff68e05684dda090b3d6a61b3e1f6ec6bac90b9c 100644 (file)
@@ -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'))
                        {
index 3934d67c65a60a0b9fb1e9cd7ee56467feb3aee0..ad0e07740fc0904df00b878b750f70467a0e7fa7 100644 (file)
@@ -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 = "";
index 41f88a439a17deea70d1a12dab6f834b592f794e..9b2e17a70b0888df31fda50c3350bf42767a7a43 100644 (file)
@@ -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...
index d5486ef469369c2dd29d156a0830576f0694d71c..df50fcd50582533110ebf5fc81235f0d34087316 100644 (file)
@@ -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);
index e6d2c99a8fc28371ff6ad0d640733aa92da52879..1a55861a6ed0f30fafcc83e906d237305a587487 100644 (file)
@@ -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'),
index 28e8f6abaaa58a0f561280cb9a35c97c183e8586..ab4b87de3588b014c08845248f24cdd5ad3bf500 100644 (file)
@@ -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
index 2fb61b22b26a1659580df61e34e651062f2a9388..3d3c3806c968aa525e918cdbf4580d01cbcf6e55 100644 (file)
@@ -75,9 +75,9 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
                'url'   => "modules.php?module=admin&amp;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";
index e3697ab279d6bdc9a5c8e5d47504585527ddec60..242a00c02b322e049b907159befcfdfe3ccd6291 100644 (file)
@@ -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
index 3ed7e88846d1a60151216f3661b229f1455134fe..37d54c8fcaa23675d059ef57f7b265afb452ed66 100644 (file)
@@ -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) {
index cd7a8e117e06dd15f5e89deda0fabd83cb4aaaa2..e9cb3ea77757620f6ac6d5d4f85142f37719c0eb 100644 (file)
@@ -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 {
index 6f9c4379c9acef2c5e25132e369b798e456f1257..ed42872f93d66a158cf7507108ef23831c8e17f1 100644 (file)
@@ -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'),
index 06ae256575dd9a0e1a0899d360b2f283b7fb40ae..7ff74e062a92857e3c569d3de732591a21fe1541 100644 (file)
@@ -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") {
index 99066dc9e8883c4e43755d98e9f64e34e3341547..b80e5b257ad9d6ccf714a574525c5d8f52edd1c5 100644 (file)
@@ -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
index aff963e0b4a95e311a637110fa0754e50aac0eb9..ecb47ae0812a686b89d2c8d8417016a1db09a440 100644 (file)
@@ -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");
index e3bce0b26e81d01353f3957a530e05c80d2ac1fd..8cecfde44e2756ad755546d1194c30e0d35c9437 100644 (file)
@@ -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("<ol>");
index 038b52fd0ce5f14591554aaf5336b00339a0ed20..4d86acd021bd2ddc05e9a93d5e1d93d1752126d4 100644 (file)
@@ -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);
index 174395cf6ab534c685e71fbeaa4c0ead95591ed4..0b2c08ff71482498812ecb34444dbfb04392aae5 100644 (file)
@@ -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) {
index 229a8beadf8aeef470ce83a04fb2c42a70287b07..ba4d56c81cab3206abf9c22e4d9dbce9d51fdbd6 100644 (file)
@@ -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 = "<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) {
@@ -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) {
index d62431b2328fa4a7f67134e79bde68e030c6f7ac..7475df7fec6b6861020630fec6eaf6a2872c0dfb 100644 (file)
@@ -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;
 
index c815f4398612562cecb2fbcc0908d7813555598f..28bf8512e9e7e048f29e109bcedd856b5bbacd17 100644 (file)
@@ -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');
index 644d36a9840c63bcbd5b2e5646053c7bd3eb1c8a..00e3bb80b4bb4618defda91d375551855ca68bae 100644 (file)
@@ -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
index 16f3a6a3524d7498a3bd76b9a87c1682c08de8f2..4a1c8d780671e3798e050c6c3114df3526690fb5 100644 (file)
@@ -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;
 
index ad6282107095ae8e410f9e5dc3bd4dc7a633d51f..c61606a27ebffdfc1e49e75e4b0ebacc3e5e334b 100644 (file)
@@ -111,7 +111,7 @@ if ((!empty($FQFN)) && (FILE_READABLE($FQFN))) {
 </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')));
 }
 
 //
index afdc57186ebb4b703704cfb96e29c4aaf5829625..ae9999f57bc45359c1476474b3505bcbdec58210 100644 (file)
@@ -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");
index ee9b518b38efe78f7a3cfba164342ce7c000c618..1b0aefd2746a3c22000e8c2cf024ebb48fb2941b 100644 (file)
@@ -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
index f44ea6a6b8dbdea48d33ffaacae6618eafba82f5..4b2c0ca3342725b8138909673f53f9ee4cfac0d2 100644 (file)
@@ -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'));
        }
 }
 //
index 259ca95b4a70b00a7d44171b4b5a38f29bc5548e..b71c4af1f678382cfce1c0bd12eec1413f80b61d 100644 (file)
@@ -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)
index b759afedd15168d70581fc47803bf9f8e5d0c2b6..2a4c2edc9156b0e8328e65fb4e06772921fbca19 100644 (file)
@@ -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, "<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
index 38d28f0a1ae773f672925e4bc739d2e5a1b02a0e..b89deb4f415e5afdbb112f77293833b3d26fb1f7 100644 (file)
@@ -89,11 +89,11 @@ if (!REQUEST_ISSET_GET(('mode'))) {
                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,
                        );
 
@@ -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
index a0b735485f91e16e1dd8de993e1c30de7b2b7cea..4f751c7c2f23cf3177f7413a2da25c2f5f2ac42f 100644 (file)
@@ -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
index 838aa5d78d78e656984a23c8fef685fb7c7cf395..738ca29ba8fa0486ee7df1e45c708015f2d8d310 100644 (file)
@@ -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."<br /><a href=\"{!URL!}/modules.php?module=login&amp;what=transfer\">".TRANSFER_CONTINUE_OVERVIEW."</a>");
+                       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&amp;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');
                }
        }
@@ -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 = "<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>";
        }
@@ -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, "<div class=\"member_done\">".SETTINGS_SAVED."</div>");
+               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
        }
 
        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', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=new\">".TRANSFER_NOW_LINK."</a>");
+               define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;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;
        }
 
@@ -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
index 88249052ccb9097b3fe3806ca102f6fd732439fa..5b2ebb2aec13b5e6cc5ad7cbeeb6bcde3c9a3e71 100644 (file)
@@ -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
index 3cee4416996f701a07d886f47645cc73d354671e..7f3cedff750071dd5a5c2f05cca73151d0791861 100644 (file)
@@ -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;
                }
        }