New functions introduced, several rewrites:
authorRoland Häder <roland@mxchange.org>
Wed, 25 Nov 2009 16:26:08 +0000 (16:26 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 25 Nov 2009 16:26:08 +0000 (16:26 +0000)
- New function verifyExpertSettings() added which checks if the admin is aware
  of altering so-called expert settings, which may raise malfuntion in your
  mailer
- Several rewrites on XHTML
- More double quotes converted to single
- Other smaller issues fixed (e.g. non-working deletion of bonus mails)
- TODOs.txt updated

148 files changed:
.gitattributes
DOCS/TODOs.txt
birthday_confirm.php
inc/classes/cachesystem.class.php
inc/classes/rdf.class.php
inc/config-global.php
inc/databases.php
inc/db/lib-mysql3.php
inc/extensions-functions.php
inc/extensions/ext-admins.php
inc/extensions/ext-cache.php
inc/filters.php
inc/functions.php
inc/inc-functions.php
inc/install-inc.php
inc/language-functions.php
inc/language/bonus_de.php
inc/language/de.php
inc/language/install_de.php
inc/language/logs_de.php
inc/language/order_de.php
inc/language/primera_de.php
inc/language/refback_de.php
inc/language/sponsor_de.php
inc/language/transfer_de.php
inc/language/usage_de.php
inc/language/wernis_de.php
inc/libs/active_functions.php
inc/libs/admins_functions.php
inc/libs/bonus_functions.php
inc/libs/cache_functions.php
inc/libs/html_mail_functions.php
inc/libs/jackpot_functions.php
inc/libs/network_functions.php
inc/libs/payout_functions.php
inc/libs/primera_functions.php
inc/libs/rallye_functions.php
inc/libs/removeip_functions.php
inc/libs/security_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/libs/wernis_functions.php
inc/load_cache.php
inc/modules/admin.php
inc/modules/admin/action-
inc/modules/admin/action-network.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-add_points.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-chk_regs.php
inc/modules/admin/what-config_cats.php
inc/modules/admin/what-config_home.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-config_payouts.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_sponsor.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_autopurge.php
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_bonus.php
inc/modules/admin/what-list_cats.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_doubler.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_network_types.php
inc/modules/admin/what-list_networks.php
inc/modules/admin/what-list_notifications.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_refs.php
inc/modules/admin/what-list_sponsor.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/admin/what-list_sponsor_pays.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-list_yoomedia_tm.php
inc/modules/admin/what-lock_sponsor.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-logs.php
inc/modules/admin/what-memedit.php
inc/modules/admin/what-overview.php
inc/modules/admin/what-repair_amnu.php
inc/modules/admin/what-repair_cats.php
inc/modules/admin/what-repair_gmnu.php
inc/modules/admin/what-repair_mmnu.php
inc/modules/admin/what-sub_points.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/modules/admin/what-unlock_sponsor.php
inc/modules/admin/what-updates.php
inc/modules/admin/what-usage.php
inc/modules/admin/what-user_contct.php
inc/modules/admin/what-usr_online.php
inc/modules/guest/action-
inc/modules/guest/what-login.php
inc/modules/guest/what-rallyes.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/member/action-account.php
inc/modules/member/action-bank.php
inc/modules/member/action-extras.php
inc/modules/member/action-logout.php
inc/modules/member/action-main.php
inc/modules/member/action-order.php
inc/modules/member/action-rals.php
inc/modules/member/action-stats.php
inc/modules/member/action-surfbar.php
inc/modules/member/what-categories.php
inc/modules/member/what-holiday.php
inc/modules/member/what-mydata.php
inc/modules/member/what-nickname.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/modules/member/what-points.php
inc/modules/member/what-primera.php
inc/modules/member/what-rallyes.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
inc/modules/sponsor/account.php
inc/modules/sponsor/settings.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/phpmailer/test/phpmailer_test.php
inc/wrapper-functions.php
install.php
mailid_top.php
modules.php
templates/de/emails/del-user.tpl
templates/de/html/admin/admin_expert_settings_form.tpl [new file with mode: 0644]
templates/de/html/admin/admin_overview_list.tpl
templates/de/html/admin/admin_overview_row.tpl
templates/de/html/guest/guest_login.tpl
templates/de/html/guest/guest_nickname_login.tpl
templates/de/html/member/member_mydata_locked.tpl [deleted file]
view.php

index b14fa007c5909ca4d532d415e2cc7372a47826ca..92b973fc9e77c95181332380f7c9659f714b4c3f 100644 (file)
@@ -1015,6 +1015,7 @@ templates/de/html/admin/admin_edit_user.tpl -text
 templates/de/html/admin/admin_email_archiv.tpl -text
 templates/de/html/admin/admin_email_archiv_row.tpl -text
 templates/de/html/admin/admin_email_nav_row.tpl -text
+templates/de/html/admin/admin_expert_settings_form.tpl -text
 templates/de/html/admin/admin_ext_notes.tpl -text
 templates/de/html/admin/admin_ext_reg_form.tpl -text
 templates/de/html/admin/admin_ext_sql_row.tpl -text
@@ -1482,7 +1483,6 @@ templates/de/html/member/member_menu_title.tpl -text
 templates/de/html/member/member_menu_whats.tpl -text
 templates/de/html/member/member_mydata_button.tpl -text
 templates/de/html/member/member_mydata_edit.tpl -text
-templates/de/html/member/member_mydata_locked.tpl -text
 templates/de/html/member/member_mydata_overview.tpl -text
 templates/de/html/member/member_newsletter.tpl -text
 templates/de/html/member/member_nickname_form.tpl -text
index e477d96ca62dac61a3017c64d0c1ebbb98614a7d..828cff526d7138b7fc24161a53dc895b2514b307 100644 (file)
 ./inc/filters.php:538:                         case 'config': // @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
 ./inc/functions.php:1002:// @TODO $simple is deprecated
 ./inc/functions.php:1037:      // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
-./inc/functions.php:2435:// @TODO Please describe this function
-./inc/functions.php:2453:      searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
+./inc/functions.php:2437:// @TODO Please describe this function
+./inc/functions.php:2455:      searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
 ./inc/functions.php:253:       // @TODO Remove this sanity-check if all is fine
-./inc/functions.php:2567:              // @TODO Add a little more infos here
+./inc/functions.php:2569:              // @TODO Add a little more infos here
 ./inc/functions.php:256:       // @TODO Try to rewrite all $DATA to $content
-./inc/functions.php:2668:                      // @TODO Rewrite this old lost code to a template
-./inc/functions.php:2757:                      // @TODO Are these convertions still required?
-./inc/functions.php:2775:// @TODO Rewrite this function to use readFromFile() and writeToFile()
-./inc/functions.php:3653:// @TODO Lame description for this function
-./inc/functions.php:3675:                      // @TODO Move this in a filter
-./inc/functions.php:3793:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2651:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:2674:                      // @TODO Rewrite this old lost code to a template
+./inc/functions.php:2763:                      // @TODO Are these convertions still required?
+./inc/functions.php:2781:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:3659:// @TODO Lame description for this function
+./inc/functions.php:3681:                      // @TODO Move this in a filter
+./inc/functions.php:3799:      // @TODO This is still very static, rewrite it somehow
 ./inc/functions.php:468:       // @TODO Do only use $content, not $DATA or raw variables
 ./inc/functions.php:538:               // @TODO Extension 'msg' does not exist
 ./inc/functions.php:607:// @TODO Rewrite this to an extension 'smtp'
 ./inc/install-functions.php:62:        // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1150:// @TODO Rewrite these two constants
-./inc/language/de.php:1166:// @TODO Rewrite these five constants
-./inc/language/de.php:848:// @TODO Are these constants longer used?
-./inc/language-functions.php:228:      // @TODO These are all valid languages, again hard-coded
+./inc/language/de.php:1154:// @TODO Rewrite these two constants
+./inc/language/de.php:1170:// @TODO Rewrite these five constants
+./inc/language/de.php:850:// @TODO Are these constants longer used?
+./inc/language-functions.php:233:      // @TODO These are all valid languages, again hard-coded
 ./inc/language-functions.php:45:// @TODO Rewrite all language constants to this function.
 ./inc/language/holiday_de.php:49:// @TODO Rewrite these two constants to one
 ./inc/language/rallye_de.php:113:// @TODO Rewrite following two lines to one
 ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings             *
 ./inc/language/refback_de.php:45:// @TODO Rewrite these constants to one
 ./inc/language/sponsor_de.php:118:// @TODO Rewrite these four constants to one and use sprintf()
-./inc/libs/admins_functions.php:418:           // @TODO This can be, somehow, rewritten
+./inc/libs/admins_functions.php:426:           // @TODO This can be, somehow, rewritten
 ./inc/libs/beg_functions.php:57:               // @TODO Try to rewrite the following unset()
 ./inc/libs/bonus_functions.php:215:                    // @TODO Try to find a way for rewriting this constant
 ./inc/libs/bonus_functions.php:303:            // @TODO This query isn't right, it will only update if the user was for a longer time away!
 ./inc/libs/rallye_functions.php:718:   $EXPIRE = 3; // @TODO The hard-coded value...
 ./inc/libs/rallye_functions.php:782:           // @TODO Rewrite this to our API function
 ./inc/libs/refback_functions.php:60:           // @TODO Try to rewrite the following unset()
-./inc/libs/surfbar_functions.php:1491:         // @TODO This can be somehow rewritten
-./inc/libs/surfbar_functions.php:944:  // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:1496:         // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:949:  // @TODO Invalid salt should be refused
 ./inc/libs/task_functions.php:244:             // @TODO These can be rewritten to filter
 ./inc/libs/task_functions.php:52:// @TODO Move all extension-dependent queries into filters
 ./inc/libs/user_functions.php:137:     // @TODO These two constants are no longer used, maybe we reactivate this code?
 ./inc/libs/user_functions.php:224:// @TODO Double-check configuration entry here
 ./inc/libs/user_functions.php:319:                     // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
-./inc/libs/user_functions.php:342:                     // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
-./inc/libs/user_functions.php:415:     // @TODO We should try to rewrite this to fetchUserData() somehow
+./inc/libs/user_functions.php:343:                     // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
+./inc/libs/user_functions.php:416:     // @TODO We should try to rewrite this to fetchUserData() somehow
 ./inc/libs/yoomedia_functions.php:64:  $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
 ./inc/load_config.php:76:      // @TODO Rewrite them to avoid this else block
 ./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php           *
 ./inc/modules/admin/admin-inc.php:423:                                 // @TODO Rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/admin/admin-inc.php:429:                                                 // @TODO ACL is 'allow'... hmmm
 ./inc/modules/admin/admin-inc.php:531:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
-./inc/modules/admin/admin-inc.php:544:         // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
-./inc/modules/admin/overview-inc.php:160:                              // @TODO Rewrite this to a filter
-./inc/modules/admin/overview-inc.php:274:                              // @TODO Rewrite this to something with include files and/or filter
-./inc/modules/admin/overview-inc.php:312:                                              // @TODO This may also be rewritten to include files
-./inc/modules/admin/overview-inc.php:314:                                                      default: // @TODO Unknown support mode
-./inc/modules/admin/overview-inc.php:435:                      // @TODO Try to move this in includes
+./inc/modules/admin/admin-inc.php:545:         // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
+./inc/modules/admin/overview-inc.php:163:                              // @TODO Rewrite this to a filter
+./inc/modules/admin/overview-inc.php:277:                              // @TODO Rewrite this to something with include files and/or filter
+./inc/modules/admin/overview-inc.php:315:                                              // @TODO This may also be rewritten to include files
+./inc/modules/admin/overview-inc.php:317:                                                      default: // @TODO Unknown support mode
+./inc/modules/admin/overview-inc.php:438:                      // @TODO Try to move this in includes
 ./inc/modules/admin/overview-inc.php:44:// @TODO This function does also check for uncompleted tasks
 ./inc/modules/admin/what-add_guestnl_cat.php:48:       // @TODO Check if category does already exist
 ./inc/modules/admin/what-add_surfbar_url.php:56:       // @TODO Find all convertSelectionsToTimestamp() calls and rewrite postRequestElement() calls to $postData
@@ -86,7 +87,8 @@
 ./inc/modules/admin/what-admins_mails.php:60:                          // @TODO Can this be rewritten???
 ./inc/modules/admin/what-bonus.php:47:// @TODO Unused at the moment
 ./inc/modules/admin/what-config_admins.php:145:        // @TODO Rewrite this to filter 'run_sqls'
-./inc/modules/admin/what-config_mods.php:135:          // @TODO Rewritings: mod->module in template
+./inc/modules/admin/what-config_mods.php:140:          // @TODO Rewritings: mod->module in template
+./inc/modules/admin/what-config_mods.php:56:                   // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function
 ./inc/modules/admin/what-config_rallye_prices.php:208:                         // @TODO Rewritings: level->price_level, infos->info in template
 ./inc/modules/admin/what-config_rallye_prices.php:225:                 // @TODO Rewrite these two constants
 ./inc/modules/admin/what-config_register.php:67:       // @TODO Move this HTML code into a template
 ./inc/modules/admin/what-holiday_list.php:47:// @TODO Unused at the moment
 ./inc/modules/admin/what-list_autopurge.php:54:// @TODO Rewrite those lines to filter
 ./inc/modules/admin/what-list_autopurge.php:84:                // @TODO Rewritings: surname->surname,family->family in templates
-./inc/modules/admin/what-list_cats.php:55:             // @TODO No longer needed? define('__CATS_BASE'   , "<a href=\"{%url=modules.php?module=admin&amp;userid=");
+./inc/modules/admin/what-list_cats.php:55:             // @TODO No longer needed? define('__CATS_BASE'   , '<a href="{%url=modules.php?module=admin&amp;userid=');
 ./inc/modules/admin/what-list_links.php:56:            // @TODO Try to rewrite this to a filter
 ./inc/modules/admin/what-list_links.php:88:                            // @TODO Find a way to rewrite this. See some lines above for different queries
 ./inc/modules/admin/what-list_links.php:97:                                    // @TODO Rewrite this to includes/filter
 ./inc/modules/guest/what-login.php:107:        // @TODO Move this HTML code into a template
 ./inc/modules/guest/what-mediadata.php:182:// @TODO Rewrite all these if-blocks to filters
 ./inc/modules/guest/what-mediadata.php:69:     // @TODO Find a better formular than this one
-./inc/modules/guest/what-rallyes.php:90:       // @TODO Reactivate this: $content['admin'] = "<a href=\"{%url=modules.php?module=index&amp;what=impressum&amp;admin=" . $adminId . "%}\">" . $login . "</a>";
+./inc/modules/guest/what-rallyes.php:90:       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $adminId . '%}">' . $login . '</a>';
 ./inc/modules/guest/what-register.php:192:     // @TODO Rewrite these all to a single filter
 ./inc/modules/guest/what-register.php:270:     // @TODO Rewrite this to a filter
 ./inc/modules/guest/what-register.php:286:             // @TODO Rewrite this to addPointsDirectly()
 ./inc/modules/member/what-bonus.php:56:        // @TODO Rewrite this to a filter
 ./inc/modules/member/what-categories.php:128:          // @TODO Rewrite this to use $OUT .= ...
 ./inc/modules/member/what-doubler.php:55:// @TODO The '*100' is in the way to get moved into the template
-./inc/modules/member/what-order.php:443:                       // @TODO Rewrite this to a filter
-./inc/modules/member/what-payout.php:240:                                      // @TODO Rewrite this to a filter
+./inc/modules/member/what-order.php:449:                       // @TODO Rewrite this to a filter
+./inc/modules/member/what-order.php:64:// @TODO Rewrite this to a filter
+./inc/modules/member/what-payout.php:220:                                      // @TODO Rewrite this to a filter
 ./inc/modules/member/what-points.php:54:// @TODO Should we rewrite this to a filter?
-./inc/modules/member/what-rallyes.php:90:      // @TODO Reactivate this: $content['admin'] = "<a href=\"{%url=modules.php?module=index&amp;what=impressum&amp;admin=" . $content['admin_id'] . "%}\">" . $content['login'] . "</a>";
+./inc/modules/member/what-rallyes.php:90:      // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
 ./inc/modules/member/what-reflinks.php:53:// @TODO Move this into a filter
 ./inc/modules/member/what-stats.php:118:               // @TODO Rewrite in template: clix->clicks
 ./inc/modules/member/what-transfer.php:135:                            // @TODO Rewrite this to a filter
 ./inc/modules/member/what-unconfirmed.php:142: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/order.php:75:            // @TODO Unused: 2,4
 ./inc/monthly/monthly_bonus.php:68:    // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1546:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1770:                  // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:2098:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:2128:// @TODO Fix inconsistency between last_module and getWhat()
-./inc/mysql-manager.php:224:                   // @TODO Nothing helped???
-./inc/mysql-manager.php:259:                   // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:552:   // @TODO Try to rewrite this to one or more functions
+./inc/mysql-manager.php:1554:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:1646:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:2105:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:2146:// @TODO Fix inconsistency between last_module and getWhat()
+./inc/mysql-manager.php:228:                   // @TODO Nothing helped???
+./inc/mysql-manager.php:263:                   // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:556:   // @TODO Try to rewrite this to one or more functions
 ./inc/mysql-manager.php:93:// @TODO Can we cache this?
 ./inc/reset/reset_beg.php:50:// @TODO This should be converted in a daily beg rallye
 ./inc/reset/reset_birthday.php:91:                     // @TODO 4 is hard-coded here, should we move it out in config?
 ./inc/wrapper-functions.php:127:// @TODO Implement $compress
 ./inc/wrapper-functions.php:134:// @TODO Implement $decompress
-./inc/wrapper-functions.php:401:// @TODO Do some more sanity check here
+./inc/wrapper-functions.php:406:// @TODO Do some more sanity check here
 ./mailid.php:134:                                      // @TODO Rewrite this to a filter
 ./mailid.php:214:      // @TODO Rewrite this to a dynamic include or so
 ./mailid.php:94:               // @TODO Rewrite this to a filter
 ./templates/de/html/surfbar/surfbar_frame_top.tpl:23:// @TODO Try to rewrite this JavaScript to js.php?js=surfbar_frame_top (wouldn't be easy)
 ### ### DEPRECATION FOLLOWS: ### ###
 ./inc/modules/admin/admin-inc.php:532:// @DEPRECATED
-./templates/de/html/member/member_mydata_locked.tpl:1:<!-- @DEPRECATED //-->
 ### ### template-warnings.log follows: ### ###
 Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/menu/menu_what_end.tpl, line: 1 in 
 Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/menu/menu_what_end.tpl, line: 2 in 
index 7e4750f2094bf6d319d51f51d664d5ebc717e83f..2f1aedc0386e45e69884d362a08c6c3bd4a9e423 100644 (file)
@@ -106,7 +106,7 @@ if (SQL_NUMROWS($result) == 1) {
                $content['message'] = loadTemplate('birthday_msg', true, $data);
        } else {
                // Unconfirmed / locked accounts cannot get points
-               $content['message'] = sprintf(getMessage('BIRTHDAY_CANNOT_STATUS'), translateUserStatus($data['status']));
+               $content['message'] = getMaskedMessage('BIRTHDAY_CANNOT_STATUS', translateUserStatus($data['status']));
        }
 } else {
        // Cannot load data!
index 4ee0cb0d22f5a46897f38773e9c9667b9458570f..a8223aa640d60dabaf3d4e8ac73859c910011cbc 100644 (file)
@@ -231,7 +231,7 @@ class CacheSystem {
                // Is the cache file there?
                if ($this->isCacheReadable()) {
                        // Load cache file
-                       require($this->fqfn);
+                       include($this->fqfn);
 
                        // Is there an array?
                        if (isset($this->data[$this->name])) {
@@ -257,7 +257,7 @@ class CacheSystem {
                } else {
                        // Cache file not found or not readable
                        debug_report_bug($this->name);
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_LOAD'), $this->fqfn));
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMaskedMessage('CACHE_CANNOT_LOAD', $this->fqfn));
 
                        // Try to remove it
                        $this->removeCacheFile();
@@ -312,7 +312,7 @@ class CacheSystem {
                                $this->rebuilt[$this->name] = true;
                        } else {
                                // Not removed!
-                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".sprintf(getMessage('CACHE_CANNOT_UNLINK'), $this->fqfn));
+                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMaskedMessage('CACHE_CANNOT_UNLINK', $this->fqfn));
                        }
                } // END - if
        }
index 95190ff85bdafb28e2185127d6f4cd56266a8a60..17de9f14c8f419043051b7c38d3eee9b5f5e4f53 100644 (file)
@@ -664,7 +664,7 @@ class fase4_rdf {
                        }
                        $this->_output .= "<a href=\"".$this->_citem['link']."\" ";
                        if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                       $this->_output .= ">".$this->_cut_string($this->_citem['link'])."</a>";
+                       $this->_output .= ">".$this->_cut_string($this->_citem['link']) . '</a>';
                        $this->_output .= "</td></tr>\n";
                        $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n";
                        $this->_output .= "</table></td></tr>";
index b7e81697432905203c2f5f9b6fd28e095bbc29db..e86fd7328d269b9d769274ce15b48e6416ce2acf 100644 (file)
@@ -61,7 +61,7 @@ $PATH = str_replace("\\", '/', substr(dirname(__FILE__), 0, -3));
 
 // Some very important function includes
 foreach (array('config','wrapper','inc','stats') as $inc) {
-       require($PATH . 'inc/' . $inc . '-functions.php');
+       include($PATH . 'inc/' . $inc . '-functions.php');
 } // END - foreach
 
 // Auto-detection... (patched by "Stelzi" aka. profi-concept, thanks again!)
index 50455b04a3b67846be0fca8c0d8431e4b9d4cfde..3f211dc09848bde239a5ad0c6b1e7df0548dcb46 100644 (file)
@@ -42,40 +42,40 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // System-wide return codes
-addCode('WRONG_PASS'        , 0x001);
-addCode('WRONG_ID'          , 0x002);
-addCode('STATUS_LOCKED'     , 0x003);
-addCode('STATUS_UNCONFIRMED', 0x004);
-addCode('UNKNOWN_STATUS'    , 0x005);
-addCode('CNTR_FAILED'       , 0x008);
-addCode('LOGOUT_DONE'       , 0x008);
-addCode('LOGOUT_FAILED'     , 0x009);
-addCode('URL_TLOCK'         , 0x00a);
-addCode('URL_FOUND'         , 0x00b);
-addCode('OVERLENGTH'        , 0x00c);
-addCode('SUBJ_URL'          , 0x00d);
-addCode('BLIST_URL'         , 0x00e);
-addCode('NO_RECS_LEFT'      , 0x00f);
-addCode('INVALID_TAGS'      , 0x010);
-addCode('MORE_POINTS'       , 0x011);
-addCode('COOKIES_DISABLED'  , 0x012);
-addCode('DATA_INVALID'      , 0x013);
-addCode('POSSIBLE_INVALID'  , 0x014);
-addCode('ACCOUNT_LOCKED'    , 0x015);
-addCode('USER_404'          , 0x016);
-addCode('STATS_404'         , 0x017);
-addCode('ALREADY_CONFIRMED' , 0x018);
-addCode('ERROR_MAILID'      , 0x019);
-addCode('EXTENSION_PROBLEM' , 0x01a);
-addCode('MORE_RECEIVERS1'   , 0x01b);
-addCode('MORE_RECEIVERS2'   , 0x01c);
-addCode('MORE_RECEIVERS3'   , 0x01d);
-addCode('INVALID_URL'       , 0x01e);
-addCode('MENU_NOT_VALID'    , 0x01f);
-addCode('LOGIN_FAILED'      , 0x020);
-addCode('BEG_SAME_AS_OWN'   , 0x021);
-addCode('UNHANDLED_STATUS'  , 0x022);
-addCode('MODULE_MEM_ONLY'   , 0x023);
+addCode('WRONG_PASS'         , 0x001);
+addCode('WRONG_ID'           , 0x002);
+addCode('ACCOUNT_LOCKED'     , 0x003);
+addCode('ACCOUNT_UNCONFIRMED', 0x004);
+addCode('UNKNOWN_STATUS'     , 0x005);
+addCode('CNTR_FAILED'        , 0x008);
+addCode('LOGOUT_DONE'        , 0x008);
+addCode('LOGOUT_FAILED'      , 0x009);
+addCode('URL_TLOCK'          , 0x00a);
+addCode('URL_FOUND'          , 0x00b);
+addCode('OVERLENGTH'         , 0x00c);
+addCode('SUBJ_URL'           , 0x00d);
+addCode('BLIST_URL'          , 0x00e);
+addCode('NO_RECS_LEFT'       , 0x00f);
+addCode('INVALID_TAGS'       , 0x010);
+addCode('MORE_POINTS'        , 0x011);
+addCode('COOKIES_DISABLED'   , 0x012);
+addCode('DATA_INVALID'       , 0x013);
+addCode('POSSIBLE_INVALID'   , 0x014);
+addCode('USER_404'           , 0x016);
+addCode('STATS_404'          , 0x017);
+addCode('ALREADY_CONFIRMED'  , 0x018);
+addCode('ERROR_MAILID'       , 0x019);
+addCode('EXTENSION_PROBLEM'  , 0x01a);
+addCode('MORE_RECEIVERS1'    , 0x01b);
+addCode('MORE_RECEIVERS2'    , 0x01c);
+addCode('MORE_RECEIVERS3'    , 0x01d);
+addCode('INVALID_URL'        , 0x01e);
+addCode('MENU_NOT_VALID'     , 0x01f);
+addCode('LOGIN_FAILED'       , 0x020);
+addCode('BEG_SAME_AS_OWN'    , 0x021);
+addCode('UNHANDLED_STATUS'   , 0x022);
+addCode('MODULE_MEM_ONLY'    , 0x023);
+addCode('UNKNOWN_ERROR'      , 0x024);
 
 // Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
 setConfigEntry('SERVER_URL', 'http://www.mxchange.org');
index ab53b7041b94b2a85a1aff213e561a91bb5aa69b..735e6dd89943b4a5b34f2c81ce42d13e5d238ff1 100644 (file)
@@ -285,7 +285,7 @@ function SQL_QUERY_ESC ($qstring, $data, $F, $L, $run=true, $strip=true, $secure
        // Debugging
        //
        //* DEBUG: */ $fp = fopen(getConfig('CACHE_PATH') . 'escape_debug.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write debug.log!");
-       //* DEBUG: */ fwrite($fp, $F.'('.$L."): ".str_replace("\r", '', str_replace("\n", " ", $eval))."\n");
+       //* DEBUG: */ fwrite($fp, $F.'('.$L."): ".str_replace("\r", '', str_replace("\n", ' ', $eval))."\n");
        //* DEBUG: */ fclose($fp);
 
        if ($run === true) {
index e1ccca57d11507a857823d0397eb97f0cadd86bb..e26f462871cd34ea878f7241832808b70cd0635c 100644 (file)
@@ -475,19 +475,19 @@ function isExtensionActive ($ext_name) {
        if ((isInstallationPhase()) || (empty($ext_name))) return false;
 
        // Not active is the default
-       $active = 'N';
+       $data['ext_active'] = 'N';
 
        // Check cache
        if (isset($GLOBALS['cache_array']['extension']['ext_active'][$ext_name])) {
                // Load from cache
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "CACHE! ext_name={$ext_name}");
-               $active = $GLOBALS['cache_array']['extension']['ext_active'][$ext_name];
+               $data['ext_active'] = $GLOBALS['cache_array']['extension']['ext_active'][$ext_name];
 
                // Count cache hits
                incrementStatsEntry('cache_hits');
        } elseif (isset($GLOBALS['ext_loaded'][$ext_name])) {
                // @TODO Extension is loaded, what next?
-               app_die(__FUNCTION__, __LINE__, "LOADED:$ext_name");
+               app_die(__FUNCTION__, __LINE__, 'LOADED:' . $ext_name);
        } elseif (($ext_name == 'cache') || (!isExtensionInstalled('cache'))) {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}");
                // Load from database
@@ -497,15 +497,15 @@ function isExtensionActive ($ext_name) {
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
                        // Load entry
-                       list($active) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free result
                SQL_FREERESULT($result);
 
                // Write cache array
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".$ext_name."[DB]: {$active}");
-               $GLOBALS['cache_array']['extension']['ext_active'][$ext_name] = $active;
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".$ext_name."[DB]: ".$data['ext_active']."");
+               $GLOBALS['cache_array']['extension']['ext_active'][$ext_name] = $data['ext_active'];
        } else {
                // Extension not active!
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".$ext_name.": Not active!");
@@ -513,16 +513,16 @@ function isExtensionActive ($ext_name) {
        }
 
        // Debug message
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name={$ext_name},active={$active}");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "ext_name=".$ext_name.",active=".$data['ext_active']."");
 
        // Is this extension activated? (For admins we always have active extensions...)
-       return ($active == 'Y');
+       return ($data['ext_active'] == 'Y');
 }
 
 // Get version from extensions
 function getExtensionVersion ($ext_name, $force = false) {
        // By default no extension is found
-       $ext_ver = 'false';
+       $data['ext_version'] = 'false';
 
        // Empty extension name should be fixed!
        if (empty($ext_name)) {
@@ -532,13 +532,13 @@ function getExtensionVersion ($ext_name, $force = false) {
 
        // Extensions are all inactive during installation
        if (isInstallationPhase()) return '';
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": ext_name={$ext_name}");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": ext_name=".$ext_name."");
 
        // Is the cache written?
        if (isset($GLOBALS['cache_array']['extension']['ext_version'][$ext_name])) {
                // Load data from cache
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": CACHE!");
-               $ext_ver = $GLOBALS['cache_array']['extension']['ext_version'][$ext_name];
+               $data['ext_version'] = $GLOBALS['cache_array']['extension']['ext_version'][$ext_name];
 
                // Count cache hits
                incrementStatsEntry('cache_hits');
@@ -551,7 +551,7 @@ function getExtensionVersion ($ext_name, $force = false) {
                // Is the extension there?
                if (SQL_NUMROWS($result) == 1) {
                        // Load entry
-                       list($ext_ver) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                } elseif (isDebugModeEnabled()) {
                        // Not found!
                        logDebugMessage(__FUNCTION__, __LINE__, sprintf(": Cannot find extension %s in database!", $ext_name));
@@ -561,18 +561,18 @@ function getExtensionVersion ($ext_name, $force = false) {
                SQL_FREERESULT($result);
 
                // Set cache
-               $GLOBALS['cache_array']['extension']['ext_version'][$ext_name] = $ext_ver;
+               $GLOBALS['cache_array']['extension']['ext_version'][$ext_name] = $data['ext_version'];
        }
 
        // Extension version should not be invalid
-       if (($ext_ver == 'false') && ($force === false)) {
+       if (($data['ext_version'] == 'false') && ($force === false)) {
                // Please report this trouble
                debug_report_bug(sprintf("Extension <strong>%s</strong> has empty version!", $ext_name));
        } // END - if
 
        // Return result
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": ret={$ext_ver}");
-       return $ext_ver;
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, ": ret={$data['ext_version']}");
+       return $data['ext_version'];
 }
 
 // Updates a given extension with current extension version to latest version
@@ -730,12 +730,12 @@ function addExtensionVerboseSqlTable ($title = '', $dashed = '', $switch = false
 // Get extension name from id
 function getExtensionName ($ext_id) {
        // Init extension name
-       $ret = '';
+       $data['ext_name'] = '';
 
        // Is cache there?
        if (isset($GLOBALS['cache_array']['extension']['ext_name'][$ext_id])) {
                // Load from cache
-               $ret = $GLOBALS['cache_array']['extension']['ext_name'][$ext_id];
+               $data['ext_name'] = $GLOBALS['cache_array']['extension']['ext_name'][$ext_id];
 
                // Count cache hits
                incrementStatsEntry('cache_hits');
@@ -747,7 +747,7 @@ function getExtensionName ($ext_id) {
                // Is the entry there?
                if (SQL_NUMROWS($result) == 1) {
                        // Get the extension's name from database
-                       list($ret) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free result
@@ -755,47 +755,47 @@ function getExtensionName ($ext_id) {
        }
 
        // Did we find some extension?
-       if (empty($ret)) {
+       if (empty($data['ext_name'])) {
                // We should fix these all!
                debug_report_bug(__FUNCTION__ . ': ext_name is empty. ext_id=' . $ext_id);
        } // END - if
 
        // Return the extension name
-       return $ret;
+       return $data['ext_name'];
 }
 
 // Get extension id from name
 function getExtensionId ($ext_name) {
        // Init id number
-       $ret = '0';
+       $data['ext_id'] = '0';
 
        // Do we have cache?
        if (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) {
                // Load from cache
-               $ret = $GLOBALS['cache_array']['extension']['ext_id'][$ext_name];
+               $data['ext_id'] = $GLOBALS['cache_array']['extension']['ext_id'][$ext_name];
 
                // Count cache hits
                incrementStatsEntry('cache_hits');
        } else {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `id` AS ext_id FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_name`='%s' LIMIT 1",
                        array($ext_name), __FUNCTION__, __LINE__);
 
                // Is the entry there?
                if (SQL_NUMROWS($result) == 1) {
                        // Get the extension's id from database
-                       list($ret) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free result
                SQL_FREERESULT($result);
 
                // Cache it
-               $GLOBALS['cache_array']['extension']['ext_id'][$ext_name] = $ret;
+               $GLOBALS['cache_array']['extension']['ext_id'][$ext_name] = $data['ext_id'];
        }
 
        // Return value
-       return $ret;
+       return $data['ext_id'];
 }
 
 // Determines wether the given extension name is valid
@@ -906,7 +906,7 @@ function createNewExtensionTask ($adminId, $subject, $ext) {
        // Not installed and do we have created a task for the admin?
        if ((determineTaskIdBySubject($subject) == '0') && (!isExtensionInstalled($ext))) {
                // Set default message if ext-foo is missing
-               $message = sprintf(getMessage('ADMIN_EXT_TEXT_FILE_MISSING'), $ext);
+               $message = getMaskedMessage('ADMIN_EXT_TEXT_FILE_MISSING', $ext);
 
                // Template file
                $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
@@ -969,13 +969,13 @@ function ifModuleHasMenu ($mod, $forceDb = false) {
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
                        // Load "has_menu" column
-                       list($has_menu) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
 
                        // Fake cache... ;-)
-                       $GLOBALS['cache_array']['extension']['ext_menu'][$mod] = $has_menu;
+                       $GLOBALS['cache_array']['extension']['ext_menu'][$mod] = $data['has_menu'];
 
                        // Does it have a menu?
-                       $ret = ($has_menu == 'Y');
+                       $ret = ($data['has_menu'] == 'Y');
                } // END  - if
 
                // Free memory
@@ -993,45 +993,45 @@ function ifModuleHasMenu ($mod, $forceDb = false) {
 // Determines the task id for given extension
 function determineExtensionTaskId ($ext_name) {
        // Default is not found
-       $task_id = '0';
+       $data['task_id'] = '0';
 
        // Search for extension task's id
-       $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `task_type`='EXTENSION' AND `subject`='[%s:]' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `id` AS task_id FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `task_type`='EXTENSION' AND `subject`='[%s:]' LIMIT 1",
                array($ext_name), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
                // Task found so load task's id and register extension...
-               list($task_id) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
        } // END - if
 
        // Free result
        SQL_FREERESULT($result);
 
        // Return it
-       return $task_id;
+       return $data['task_id'];
 }
 
 // Determines the task id for given subject
 function determineTaskIdBySubject ($subject) {
        // Default is not found
-       $task_id = '0';
+       $data['task_id'] = '0';
 
        // Search for task id
-       $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `id` AS task_id FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1",
                array($subject), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
                // Task found so load task's id and register extension...
-               list($task_id) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
        } // END - if
 
        // Free result
        SQL_FREERESULT($result);
 
        // Return it
-       return $task_id;
+       return $data['task_id'];
 }
 
 // Add updates notes for given version
index 733922c5fffbd95ac210181319c1514d7b94f34f..7b8b8b98f9abde6530469565219a7596d11e5913 100644 (file)
@@ -42,10 +42,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version of this extension
-setThisExtensionVersion('0.7.2');
+setThisExtensionVersion('0.7.3');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2'));
+setExtensionVersionHistory(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -63,7 +63,7 @@ switch (getExtensionMode()) {
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='admins'");
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`");
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP default_acl");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `default_acl`");
 
                // Remove filters
                unregisterFilter('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, getExtensionDryRun());
@@ -308,6 +308,14 @@ PRIMARY KEY (id)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Schreibweise korregiert.");
                                break;
+
+                       case '0.7.3': // SQL queries for v0.7.2
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `expert_settings` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `expert_warning` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Experten-Einstellungen sind nun hinzugekommen.");
+                               break;
                } // END - switch
                break;
 
index 91cbff076727e0c82b2718e13c62db0572984c61..a53cb55f9973cb1c5895fbe563cee064ce301724 100644 (file)
@@ -230,7 +230,7 @@ switch (getExtensionMode()) {
 
                        case '0.2.4': // SQL queries for v0.2.4
                                // SQL commands to run
-                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_cache')");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_cache' LIMIT 1");
 
                                // Remove config entries
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_themes`");
index 8cc35e42937455baa353d9e5aabc18c64ab59c02..b3c41423c408b1c595889abd2b462b3315d9c85e 100644 (file)
@@ -509,7 +509,7 @@ function FILTER_COMPILE_EXTENSION ($code) {
                                                        // User data found
                                                        $functionName = "getFetchedUserData('userid', " . $matches[4][$key] . ", " . $callback . "')";
                                                } // END - if
-                                       } elseif ((!empty($callback)) && (isMember())) {
+                                       } elseif ((!empty($callback)) && (isUserDataValid())) {
                                                // "Call-back" alias column for current logged in user's data
                                                $functionName = "getUserData('" . $callback . "')";
                                        }
index cc3c83d5f3754330c93f29192e9119d0c8031515..41789fdc06a81327de61bfeda17cd4ff9d6afa9c 100644 (file)
@@ -750,7 +750,7 @@ function translateYesNo ($yn) {
 // Translates the "pool type" into human-readable
 function translatePoolType ($type) {
        // Default?type is unknown
-       $translated = sprintf(getMessage('POOL_TYPE_UNKNOWN'), $type);
+       $translated = getMaskedMessage('POOL_TYPE_UNKNOWN', $type);
 
        // Generate constant
        $constName = sprintf("POOL_TYPE_%s", $type);
@@ -841,7 +841,7 @@ function translateUserStatus ($status) {
 
                default:
                        logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
-                       $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
+                       $ret = getMaskedMessage('UNKNOWN_STATUS', $status);
                        break;
        } // END - switch
 
@@ -1476,7 +1476,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
 
                if (ereg('Y', $display) || (empty($display))) {
                        // Generate year selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_ye\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ye\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 10; $idx++) {
                                $OUT .= "    <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $Y) $OUT .= ' selected="selected"';
@@ -1484,12 +1484,12 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_ye\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_ye" value="0" />';
                }
 
                if (ereg('M', $display) || (empty($display))) {
                        // Generate month selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_mo\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mo\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 11; $idx++)
                        {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
@@ -1498,12 +1498,12 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_mo\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_mo" value="0" />';
                }
 
                if (ereg('W', $display) || (empty($display))) {
                        // Generate week selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_we\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_we\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 4; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $W) $OUT .= ' selected="selected"';
@@ -1511,12 +1511,12 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_we\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_we" value="0" />';
                }
 
                if (ereg('D', $display) || (empty($display))) {
                        // Generate day selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_da\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_da\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 31; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $D) $OUT .= ' selected="selected"';
@@ -1524,12 +1524,12 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_da\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_da" value="0" />';
                }
 
                if (ereg('h', $display) || (empty($display))) {
                        // Generate hour selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_ho\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ho\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 23; $idx++)    {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $h) $OUT .= ' selected="selected"';
@@ -1537,12 +1537,12 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_ho\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_ho" value="0" />';
                }
 
                if (ereg('m', $display) || (empty($display))) {
                        // Generate minute selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_mi\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mi\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 59; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $m) $OUT .= ' selected="selected"';
@@ -1550,12 +1550,12 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_mi\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_mi" value="0" />';
                }
 
                if (ereg('s', $display) || (empty($display))) {
                        // Generate second selection
-                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_se\" size=\"1\">\n";
+                       $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_se\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 59; $idx++) {
                                $OUT .= "  <option class=\"mini_select\" value=\"" . $idx."\"";
                                if ($idx == $s) $OUT .= ' selected="selected"';
@@ -1563,7 +1563,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        }
                        $OUT .= "  </select></td>\n";
                } else {
-                       $OUT .= "<input type=\"hidden\" name=\"" . $prefix."_se\" value=\"0\" />\n";
+                       $OUT .= '<input type="hidden" name="' . $prefix . '_se" value="0" />';
                }
                $OUT .= "</tr>\n";
                $OUT .= "</table>\n";
@@ -1583,21 +1583,21 @@ function createTimestampFromSelections ($prefix, $postData) {
        $TEST = date('Y', time()) / 4;
        $M1   = date('m', time());
        // If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
-       if ((floor($TEST) == $TEST) && ($M1 == "02") && ($postData[$prefix."_mo"] > "02"))  $SWITCH = getConfig('ONE_DAY');
+       if ((floor($TEST) == $TEST) && ($M1 == '02') && ($postData[$prefix . '_mo'] > '02'))  $SWITCH = getConfig('ONE_DAY');
        // First add years...
-       $ret += $postData[$prefix."_ye"] * (31536000 + $SWITCH);
+       $ret += $postData[$prefix . '_ye'] * (31536000 + $SWITCH);
        // Next months...
-       $ret += $postData[$prefix."_mo"] * 2628000;
+       $ret += $postData[$prefix . '_mo'] * 2628000;
        // Next weeks
-       $ret += $postData[$prefix."_we"] * 604800;
+       $ret += $postData[$prefix . '_we'] * 604800;
        // Next days...
-       $ret += $postData[$prefix."_da"] * 86400;
+       $ret += $postData[$prefix . '_da'] * 86400;
        // Next hours...
-       $ret += $postData[$prefix."_ho"] * 3600;
+       $ret += $postData[$prefix . '_ho'] * 3600;
        // Next minutes..
-       $ret += $postData[$prefix."_mi"] * 60;
+       $ret += $postData[$prefix . '_mi'] * 60;
        // And at last seconds...
-       $ret += $postData[$prefix."_se"];
+       $ret += $postData[$prefix . '_se'];
        // Return calculated value
        return $ret;
 }
@@ -1724,19 +1724,19 @@ function sendGetRequest ($script, $data = array()) {
        $host = extractHostnameFromUrl($script);
 
        // Add data
-       $scriptData = http_build_query($data, '', '&');
+       $body = http_build_query($data, '', '&');
 
        // Do we have a question-mark in the script?
        if (strpos($script, '?') === false) {
                // No, so first char must be question mark
-               $scriptData = '?' . $scriptData;
+               $body = '?' . $body;
        } else {
                // Ok, add &
-               $scriptData = '&' . $scriptData;
+               $body = '&' . $body;
        }
 
        // Add script data
-       $script .= $scriptData;
+       $script .= $body;
 
        // Generate GET request header
        $request  = 'GET /' . trim($script) . ' HTTP/1.1' . getConfig('HTTP_EOL');
@@ -1747,8 +1747,11 @@ function sendGetRequest ($script, $data = array()) {
        } else {
                $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('VERSION') . getConfig('HTTP_EOL');
        }
-       $request .= 'Content-Type: text/plain' . getConfig('HTTP_EOL');
+       $request .= 'Accept: text/plain;q=0.8' . getConfig('HTTP_EOL');
+       $request .= 'Accept-Charset: UTF-8,*' . getConfig('HTTP_EOL');
        $request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL');
+       $request .= 'Content-Type: text/plain' . getConfig('HTTP_EOL');
+       $request .= 'Content-Length: '.strlen($body) . getConfig('HTTP_EOL');
        $request .= 'Connection: Close' . getConfig('HTTP_EOL') . getConfig('HTTP_EOL');
 
        // Send the raw request
@@ -1771,18 +1774,17 @@ function sendPostRequest ($script, $postData) {
        $host = extractHostnameFromUrl($script);
 
        // Construct request
-       $data = http_build_query($postData, '', '&');
+       $body = http_build_query($postData, '', '&');
 
        // Generate POST request header
        $request  = 'POST /' . trim($script) . ' HTTP/1.1' . getConfig('HTTP_EOL');
        $request .= 'Host: ' . $host . getConfig('HTTP_EOL');
        $request .= 'Referer: ' . getConfig('URL') . '/admin.php' . getConfig('HTTP_EOL');
        $request .= 'User-Agent: ' . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL');
-       $request .= 'Content-Type: application/x-www-form-urlencoded' . getConfig('HTTP_EOL');
-       $request .= 'Content-length: ' . strlen($data) . getConfig('HTTP_EOL');
        $request .= 'Cache-Control: no-cache' . getConfig('HTTP_EOL');
+       $request .= 'Content-Type: application/x-www-form-urlencoded' . getConfig('HTTP_EOL');
        $request .= 'Connection: Close' . getConfig('HTTP_EOL') . getConfig('HTTP_EOL');
-       $request .= $data;
+       $request .= $body;
 
        // Send the raw request
        $response = sendRawRequest($host, $request);
@@ -2310,7 +2312,7 @@ function generateErrorCodeFromUserStatus ($status='') {
        $errorCode = getCode('UNKNOWN_STATUS');
 
        // Generate constant name
-       $codeName = sprintf("ID_%s", $status);
+       $codeName = sprintf("ACCOUNT_%s", strtoupper($status));
 
        // Is the constant there?
        if (isCodeSet($codeName)) {
@@ -2600,39 +2602,40 @@ function getMessageFromErrorCode ($code) {
        $message = '';
        switch ($code) {
                case '': break;
-               case getCode('LOGOUT_DONE')       : $message = getMessage('LOGOUT_DONE'); break;
-               case getCode('LOGOUT_FAILED')     : $message = '<span class="guest_failed">{--LOGOUT_FAILED--}</span>'; break;
-               case getCode('DATA_INVALID')      : $message = getMessage('MAIL_DATA_INVALID'); break;
-               case getCode('POSSIBLE_INVALID')  : $message = getMessage('MAIL_POSSIBLE_INVALID'); break;
-               case getCode('ACCOUNT_LOCKED')    : $message = getMessage('MEMBER_ACCOUNT_LOCKED_UNC'); break;
-               case getCode('USER_404')          : $message = getMessage('USER_404'); break;
-               case getCode('STATS_404')         : $message = getMessage('MAIL_STATS_404'); break;
-               case getCode('ALREADY_CONFIRMED') : $message = getMessage('MAIL_ALREADY_CONFIRMED'); break;
-               case getCode('WRONG_PASS')        : $message = getMessage('LOGIN_WRONG_PASS'); break;
-               case getCode('WRONG_ID')          : $message = getMessage('LOGIN_WRONG_ID'); break;
-               case getCode('STATUS_LOCKED')     : $message = getMessage('LOGIN_STATUS_LOCKED'); break;
-               case getCode('STATUS_UNCONFIRMED'): $message = getMessage('LOGIN_STATUS_UNCONFIRMED'); break;
-               case getCode('COOKIES_DISABLED')  : $message = getMessage('LOGIN_COOKIES_DISABLED'); break;
-               case getCode('BEG_SAME_AS_OWN')   : $message = getMessage('BEG_SAME_UID_AS_OWN'); break;
-               case getCode('LOGIN_FAILED')      : $message = getMessage('LOGIN_FAILED_GENERAL'); break;
-               case getCode('MODULE_MEM_ONLY')   : $message = sprintf(getMessage('MODULE_MEM_ONLY'), getRequestElement('mod')); break;
-               case getCode('OVERLENGTH')        : $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break;
-               case getCode('URL_FOUND')         : $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break;
-               case getCode('SUBJ_URL')          : $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break;
-               case getCode('BLIST_URL')         : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), 0); break;
-               case getCode('NO_RECS_LEFT')      : $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break;
-               case getCode('INVALID_TAGS')      : $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break;
-               case getCode('MORE_POINTS')       : $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break;
-               case getCode('MORE_RECEIVERS1')   : $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); break;
-               case getCode('MORE_RECEIVERS2')   : $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); break;
-               case getCode('MORE_RECEIVERS3')   : $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min')); break;
-               case getCode('INVALID_URL')       : $message = getMessage('MEMBER_ENTER_INVALID_URL'); break;
+               case getCode('LOGOUT_DONE')        : $message = getMessage('LOGOUT_DONE'); break;
+               case getCode('LOGOUT_FAILED')      : $message = '<span class="guest_failed">{--LOGOUT_FAILED--}</span>'; break;
+               case getCode('DATA_INVALID')       : $message = getMessage('MAIL_DATA_INVALID'); break;
+               case getCode('POSSIBLE_INVALID')   : $message = getMessage('MAIL_POSSIBLE_INVALID'); break;
+               case getCode('USER_404')           : $message = getMessage('USER_404'); break;
+               case getCode('STATS_404')          : $message = getMessage('MAIL_STATS_404'); break;
+               case getCode('ALREADY_CONFIRMED')  : $message = getMessage('MAIL_ALREADY_CONFIRMED'); break;
+               case getCode('WRONG_PASS')         : $message = getMessage('LOGIN_WRONG_PASS'); break;
+               case getCode('WRONG_ID')           : $message = getMessage('LOGIN_WRONG_ID'); break;
+               case getCode('ACCOUNT_LOCKED')     : $message = getMessage('LOGIN_STATUS_LOCKED'); break;
+               case getCode('ACCOUNT_UNCONFIRMED'): $message = getMessage('LOGIN_STATUS_UNCONFIRMED'); break;
+               case getCode('COOKIES_DISABLED')   : $message = getMessage('LOGIN_COOKIES_DISABLED'); break;
+               case getCode('BEG_SAME_AS_OWN')    : $message = getMessage('BEG_SAME_UID_AS_OWN'); break;
+               case getCode('LOGIN_FAILED')       : $message = getMessage('LOGIN_FAILED_GENERAL'); break;
+               case getCode('MODULE_MEM_ONLY')    : $message = getMaskedMessage('MODULE_MEM_ONLY', getRequestElement('mod')); break;
+               case getCode('OVERLENGTH')         : $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break;
+               case getCode('URL_FOUND')          : $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break;
+               case getCode('SUBJ_URL')           : $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break;
+               case getCode('BLIST_URL')          : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), 0); break;
+               case getCode('NO_RECS_LEFT')       : $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break;
+               case getCode('INVALID_TAGS')       : $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break;
+               case getCode('MORE_POINTS')        : $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break;
+               case getCode('MORE_RECEIVERS1')    : $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); break;
+               case getCode('MORE_RECEIVERS2')    : $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); break;
+               case getCode('MORE_RECEIVERS3')    : $message = getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'); break;
+               case getCode('INVALID_URL')        : $message = getMessage('MEMBER_ENTER_INVALID_URL'); break;
+               case getCode('UNKNOWN_ERROR')      : $message = getMessage('LOGIN_UNKNOWN_ERROR'); break;
+               case getCode('UNKNOWN_STATUS')     : $message = getMessage('LOGIN_UNKNOWN_STATUS'); break;
 
                case getCode('ERROR_MAILID'):
                        if (isExtensionActive('mailid', true)) {
                                $message = getMessage('ERROR_CONFIRMING_MAIL');
                        } else {
-                               $message = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'mailid');
+                               $message = getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'mailid');
                        }
                        break;
 
@@ -2645,16 +2648,19 @@ function getMessageFromErrorCode ($code) {
                        break;
 
                case getCode('URL_TLOCK'):
+                       // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
                        $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
                                array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
 
                        // Load timestamp from last order
                        list($timestamp) = SQL_FETCHROW($result);
-                       $timestamp = generateDateTime($timestamp, 1);
 
                        // Free memory
                        SQL_FREERESULT($result);
 
+                       // Translate it for templates
+                       $timestamp = generateDateTime($timestamp, 1);
+
                        // Calculate hours...
                        $STD = round(getConfig('url_tlock') / 60 / 60);
 
@@ -2673,7 +2679,7 @@ function getMessageFromErrorCode ($code) {
 
                default:
                        // Missing/invalid code
-                       $message = sprintf(getMessage('UNKNOWN_MAILID_CODE'), $code);
+                       $message = getMaskedMessage('UNKNOWN_MAILID_CODE', $code);
 
                        // Log it
                        logDebugMessage(__FUNCTION__, __LINE__, $message);
@@ -3251,12 +3257,12 @@ function generateExtensionInactiveMessage ($ext_name) {
        } // END - if
 
        // Default message
-       $message = sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), $ext_name);
+       $message = getMaskedMessage('EXTENSION_PROBLEM_EXT_INACTIVE', $ext_name);
 
        // Is an admin logged in?
        if (isAdmin()) {
                // Then output admin message
-               $message = sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE'), $ext_name);
+               $message = getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE', $ext_name);
        } // END - if
 
        // Return prepared message
@@ -3272,12 +3278,12 @@ function generateExtensionNotInstalledMessage ($ext_name) {
        } // END - if
 
        // Default message
-       $message = sprintf(getMessage('EXTENSION_PROBLEM_EXT_NOT_INSTALLED'), $ext_name);
+       $message = getMaskedMessage('EXTENSION_PROBLEM_EXT_NOT_INSTALLED', $ext_name);
 
        // Is an admin logged in?
        if (isAdmin()) {
                // Then output admin message
-               $message = sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED'), $ext_name);
+               $message = getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED', $ext_name);
        } // END - if
 
        // Return prepared message
@@ -3532,7 +3538,7 @@ function determinePageTitle () {
                $TITLE = '';
 
                // Title decoration enabled?
-               if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." ";
+               if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left')) . ' ';
 
                // Do we have some extra title?
                if (isExtraTitleSet()) {
@@ -3564,7 +3570,7 @@ function determinePageTitle () {
                $pageTitle = '[-- ' . getConfig('MAIN_TITLE') . ' - ' . getModuleTitle(getModule()) . ' --]';
        } elseif ((isInstalled()) && (!isAdminRegistered())) {
                // Installed but no admin registered
-               $pageTitle = sprintf(getMessage('SETUP_OF_MXCHANGE'), getConfig('MAIN_TITLE'));
+               $pageTitle = getMessage('SETUP_OF_MXCHANGE');
        } elseif ((!isInstalled()) || (!isAdminRegistered())) {
                // Installation mode
                $pageTitle = getMessage('INSTALLATION_OF_MXCHANGE');
index d7cc03ecaaa31bfb8cd8927595e67b5a3186adee..54853e78ad893cc408c14917d074be4ccaf505c3 100644 (file)
@@ -121,7 +121,7 @@ function loadInclude ($inc) {
        } // END - if
 
        // Try to load it
-       require($GLOBALS['inc_loaded'][$inc]);
+       include($GLOBALS['inc_loaded'][$inc]);
 }
 
 // Loads an include file once
index e8a13231ec972bb8f007518db6e5ec5695bcc37f..8dbe1a834b57ca38979d826e5f7dd91709b9b929 100644 (file)
@@ -248,12 +248,12 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                if (getTotalFatalErrors() > 0) {
                                        $OUT = '';
                                        foreach (getFatalArray() as $value) {
-                                               $OUT .= "    <li>" . $value . "</li>\n";
+                                               $OUT .= '    <li>' . $value . '</li>';
                                        } // END foreach
                                        $content['fatal_errors'] = $OUT;
                                        $OUT = '';
                                        foreach ($mysql as $key => $value) {
-                                               $OUT .= "    <input type=\"hidden\" name=\"mysql[" . $key . "]\" value=\"" . $value . "\" />\n";
+                                               $OUT .= '    <input type="hidden" name="mysql[' . $key . ']" value="' . $value . '" />';
                                        } // END foreach
                                        $content['mysql_hidden'] = $OUT;
                                        $content['spath']      = postRequestElement('spath');
@@ -287,7 +287,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
 
                default:
                        logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestElement('page')));
-                       addTemplateToInstallContent('admin_settings_saved', "<div class=\"install_error\">{--WRONG_PAGE--}</div>");
+                       addTemplateToInstallContent('admin_settings_saved', '<div class="install_error">{--WRONG_PAGE--}</div>');
                        break;
        } // END - switch
 } else {
index 0de23e3d2dbc86bc7b4da838ec8760302300aef3..21dc3ed7cbe9a1c2ff2c758d3fc62f19dd5566de 100644 (file)
@@ -60,6 +60,11 @@ function getMessage ($messageId) {
        return $return;
 }
 
+// Getter for message string as a mask
+function getMaskedMessage ($messageId, $data) {
+       return sprintf(getMessage($messageId), $data);
+}
+
 // Init messages
 function initMessages () {
        $GLOBALS['messages'][getLanguage()] = array();
index 28e06c5563f3f47560d31d5a5f4bbf756cfbaf79..0017c134938edd5d5510929ad15f81918ad35034 100644 (file)
@@ -104,7 +104,7 @@ addMessages(array(
        'BONUS_STATS_TOTAL' => "100%-Klickratebonus",
        'BONUS_POINTS_DISABLED' => "Aktiv-Rallye derzeit nicht aktiv.",
        'BONUS_MEMBER_STATS_SUBJECT' => "Ihr Aktiv-Bonus wegen 100% Klickrate",
-       'BONUS_LOGIN_BONUS_ADDED' => "Login-Bonus mit <u>%s {?POINTS?}</u> verg&uuml;tet.",
+       'BONUS_LOGIN_BONUS_ADDED' => "Login-Bonus mit <u>{%config,translateComma=login_bonus%} {?POINTS?}</u> verg&uuml;tet.",
        'BONUS_LOGIN_BONUS_NOT_ADDED' => "Login-Bonus nicht verg&uuml;tet.",
        'LIST_UNCONFIRMED_BONUS_LINKS' => "Unbest. Bonus-Mail",
        'ADMIN_BONUS_MAIL_ALREADY_DELETED' => "Bonus-Mail bereits gel&ouml;scht.",
index a3ff6384cff4ec9cb688a13e2c32de7ee7419b99..c10b637c2516e389c973cb159e4d446baa173414 100644 (file)
@@ -242,7 +242,7 @@ addMessages(array(
        'POINTS_REF' => "Einmalige Referal-Gutschrift",
        'EDIT_REGFORM_SETTINGS' => "Einstellungen am Anmeldeformular",
        'LEAST_CATS' => "Mindestens auszuw&auml;hlende Kategorieanzahl",
-       'CATS_LEAST' => "Bitte w&auml;hlen Sie mehr Kategorien aus! Minimum ist: %s",
+       'CATS_LEAST' => "Bitte w&auml;hlen Sie mehr Kategorien aus! Minimum ist: <span class=\"data\">{?least_cats?}</span>",
        'EMAIL_ALREADY_DB' => "Sie haben sich bereits mit dieser Email-Adresse angemeldet, oder jemand anderes verwendet Ihre. Doppelte Anmeldungen sind bei uns verboten.",
        'REJECT_DOUBLE_EMAIL' => "Doppelt angemeldete Email-Adressen ablehnen?",
        'REJECT_DOUBLE_PASS' => "Gleiche Passw&ouml;rter bei der Anmeldung ablehnen? (Wird nicht angezeigt!)",
@@ -291,7 +291,7 @@ addMessages(array(
        'TOP' => "Nach oben",
        'YOUR_LOGIN' => "Ihre Login-Id lautet",
        'LOGIN_URL' => "URL zum Login",
-       'GUEST_WELCOME_MEMBER' => "Willkommen zum Login-Bereich f&uuml;r Mitglieder",
+       'GUEST_LOGIN_MEMBER' => "Einloggen zum Mitgliederbereich",
        'GUEST_ENTER_LOGIN' => "Login-Id",
        'GUEST_ENTER_PASSWORD' => "Passwort",
        'LOGIN_SUBMIT' => "Einloggen",
@@ -307,9 +307,11 @@ addMessages(array(
        'LOGIN_UNKNOWN_CODE' => "Unbekannter R&uuml;ckgabewert.",
        'LOGIN_WRONG_PASS' => "Falsches Passwort eingegben.",
        'LOGIN_WRONG_ID' => "Es wurde kein Account unter Ihren eingegebenen Logindaten gefunden.",
-       'LOGIN_STATUS_LOCKED' => "Ihr Account wurde gesperrt.",
+       'LOGIN_STATUS_LOCKED' => "Ihr Account wurde gesperrt. Sperrgrund: <span class=\"data\">{%user,lock_reason%}</span>, Sperrzeitpunkt: <span class=\"data\">{%user,lock_timestamp,generateDateTime%}</span>",
        'LOGIN_STATUS_UNCONFIRMED' => "Bitte best&auml;tigen Sie erst Ihre Email-Adresse! Haben Sie den Best&auml;tigungslink verloren? Links im Men&uuml; unter &quot;Best&auml;tigungslink&quot; k&ouml;nnen Sie ihn erneut anfordern.",
        'LOGIN_COOKIES_DISABLED' => "Sie haben in Ihrem Browser entweder die Cookies ausgeschaltet, oder die Sicherheitsstufe ist zu hoch eingestellt.",
+       'LOGIN_UNKNOWN_ERROR' => "Es ist ein unerwarteter Account-Status aufgetreten. Bitte melden Sie sich beim Support dieses {?mt_word2?}.",
+       'LOGIN_UNKNOWN_STATUS' => "Ihr Account weisst einen unbekannten Status auf. Bitte melden Sie sich beim Support dieses {?mt_word2?}.",
        'GUEST_REG_POINTS_1' => "F&uuml;r Ihre Anmeldung haben wir Ihnen als Willkommensgutschrift",
        'GUEST_REG_POINTS_2' => "{?POINTS?} gutgeschrieben. Sie k&ouml;nnen bereits jetzt schon Mails an die anderen Mitglieder verschicken - solange Empf&auml;nger auch erreichbar sind.",
        'GUEST_SELECT_LIFETIME' => "Wie lange soll Auto-Login aktiv sein?",
@@ -502,8 +504,8 @@ addMessages(array(
        'ACCOUNT_STATUS' => "Account-Status",
        'ACCOUNT_UNCONFIRMED' => "<span class=\"admin_failed\">Unbest&auml;tigt</span>",
        'ACCOUNT_CONFIRMED' => "<span class=\"admin_green\">Best&auml;tigt</span>",
-       'ACCOUNT_LOCKED' => "Gesperrt",
-       'ACCOUNT_DELETED' => "Gel&ouml;scht",
+       'ACCOUNT_LOCKED' => "<span class=\"admin_failed\">Gesperrt</span>",
+       'ACCOUNT_DELETED' => "<span class=\"admin_failed\">Gel&ouml;scht</span>",
        'ADMIN_ALL_ACCOUNTS' => "Alle Mitglieder-Accounts auflisten",
        'ADMIN_NO_NONE_REGISTERED' => "Ihre Suchkriterieren ergaben keine Treffer in der Mitgliederliste. ",
        'ADMIN_MEMBER_404' => "Mitglieds-Account <span class=\"data\">%s</span> existiert nicht.",
@@ -636,7 +638,7 @@ addMessages(array(
        'ADMIN_DEL_UNCONFIRMED_LINKS' => "Alle unbest&auml;tigten Mails l&ouml;schen",
        'ADMIN_LINKS_DELETED' => "Links f&uuml;r unbest&auml;tigte Mails wurden gel&ouml;scht.",
        'ADMIN_DEL_LINK_SUBJ' => "Ihr unbest&auml;tigen Mails wurden gel&ouml;scht.",
-       'MEMBER_LINKS_LEFT' => "Sie haben <span class=\"data\">%s</span> unbest&auml;tigte Mails. Bitte best&auml;tigen Sie diese zuerst. Wenn Sie weniger als <span class=\"data\">%s</span> Mails im Account haben, k&ouml;nnen Sie auch wieder buchen.",
+       'MEMBER_LINKS_LEFT' => "Sie haben <span class=\"data\">%s</span> unbest&auml;tigte Mails. Bitte best&auml;tigen Sie diese zuerst. Wenn Sie weniger als <span class=\"data\">{?unconfirmed?}</span> Mails im Account haben, k&ouml;nnen Sie auch wieder buchen.",
        'TODAY' => "Heute",
        'MEMBER_PROFILE_LOCKED' => "Sie k&ouml;nnen Ihren Account erst am <span class=\"data\">%s</span> wieder &auml;ndern.",
        'MEMBER_HAS_ZERO_MMAILS' => "Sie haben Ihren Empfang auf <strong>Urlaub</strong> stehen! Bitte stellen Sie unter &quot;Profildaten &auml;ndern&quot; den Empfang h&ouml;her ein.",
@@ -836,7 +838,7 @@ addMessages(array(
        'ADMIN_EDIT' => "&Auml;ndern",
        'ADMIN_EDIT_EXTENSIONS' => "&Auml;ndern von Erweiterungen",
        'POOL_DELETED' => "Bereinigt",
-       'ONLINE_TIMEOUT_IS' => "Die Liste zeigt die Besucher der letzten <span class=\"data\">%s</span> an.",
+       'ONLINE_TIMEOUT_IS' => "Die Liste zeigt die Besucher der letzten <span class=\"data\">{%config,createFancyTime=online_timeout%}</span> an.",
        'ADMIN_CONFIG_EXTENSIONS_SETTINGS' => "Erweiterungs-Management konfigurieren",
        'ADMIN_VERBOSE_SQL' => "SQL-Anweisungen beim Registrieren/Updates/Entfernen ausgeben",
        'ADMIN_REMOVING_THESE_EXTENSIONS' => "Diese Erweiterungen werden deinstalliert",
@@ -925,7 +927,7 @@ addMessages(array(
        'MEMBER_NO_MORE_RECEIVERS_FOUND' => "Es konnten nicht ausreichend genug empfangsbereite Mitglieder gefunden werden.",
        'ADMIN_USER_PROFILE_TITLE' => "Mitgliedsprofil aufrufen",
        'LIST_UNCONFIRMED_MEMBER_LINKS' => "Unbest&auml;tigte Maillinks eines Mitgliedes auflisten",
-       'MEMBER_ENTER_MORE_MIN_RECEIVERS' => "Geben Sie mehr als <span class=\"data\">%s</span> Empf&auml;nger ein.",
+       'MEMBER_ENTER_MORE_MIN_RECEIVERS' => "Geben Sie mehr als <span class=\"data\">{?order_min?}</span> Empf&auml;nger ein.",
        'NO_TEMPLATE_SUPPLIED' => "Keinen Template-Namen &uuml;bergeben! Fehler im Script erkannt. Bitte den Webmaster ({?WEBMASTER?}) verst&auml;ndigen.",
        '_OR' => "oder",
        'GUEST_NEW_PASSWORD_SEND' => "Neues Passwort ist zu Ihrem Postfach unterwegs.",
@@ -1061,6 +1063,8 @@ addMessages(array(
        'MXCHANGE_HAS_DIED' => "{?TITLE?} ist in Script/Funktion <span class=\"data\">%s</span>, Zeile <span class=\"data\">%s</span> mit folgender Meldung gestorben: <span class=\"data\">%s</span>",
        'ADMIN_CONFIG_POINTS_TITLE' => "Einstellungen f&uuml;r {?POINTS?}",
        'APP_DIE_TITLE' => "Fehler im Script erkannt!",
+       'ADMIN_CONTACT_LINK_TITLE' => "Kontakt zum Administrator",
+       'ADMIN_MAIL_NOTHING_DELETED' => "Die Mail mit der Id <span class=\"data\">%s</span weisst keine Mitglieder auf.",
 
        'ADMIN_SEND_RESET_LINK_TITLE' => "1/4: Administratorkennwort zur&uuml;cksetzen",
        'ADMIN_VALIDATE_HASH_TITLE' => "2/4: Validierung Iher Logindaten",
@@ -1204,6 +1208,15 @@ addMessages(array(
        'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei <strong><span class=\"data\">%s</span></strong> laden.",
        'CACHE_CANNOT_INITIALIZE' => "Konnte das Caching-System nicht initialisieren. Bitte die Dokumentation <strong>DOCS/de/cache/README.txt</strong> lesen.",
        'CACHE_CANNOT_UNLINK' => "Kann nicht die Cache-Datei <strong><span class=\"data\">%s</span></strong> vom Server entfernen.",
+
+       // Expert settings
+       'ADMIN_EXPERT_SETTINGS_STATUS_UPDATE' => "Ihr {?mt_word?} weisst nicht die n&ouml;tige Erweiterung <span class=\"data\">admins</span> mindestens in der Version <span class=\"data\">0.7.3</span> auf, um Experten-Einstellungen zu pr&uuml;fen. Bitte aktualisieren Sie Ihre {?mt_word?}-Installation.",
+       'ADMIN_EXPERT_SETTINGS_STATUS_FAILED' => "Es ist ein allgemeiner Fehler beim Pr&uuml;fen der Experteneinstellungen aufgetreten f&uuml;r den Sie vermutlich nichts k&ouml;nnen.",
+       'ADMIN_EXPERT_SETTINGS_STATUS_FORBIDDEN' => "Sie haben nicht die Berechtigung, Experten-Einstellungen zu &auml;ndern.",
+       'ADMIN_EXPERT_SETTINGS_TITLE' => "&Auml;nderungen von Experten-Einstellungen",
+       'ADMIN_EXPERT_SETTINGS_NOTE' => "Sie sind im Begriff Einstellungen zu &auml;ndern, die sehr sensibel sind und sich auf die Funktionalit&auml;t Ihres {?mt_word2?} negativ auswirken k&ouml;nnen. Sie sollten daher hier nichts &auml;ndern, solange Sie nicht wissen, was Sie da tun.",
+       'ADMIN_EXPERT_SETTINGS_MAKE_PERMANENT' => "Ja, ich weiss was ich tue und m&ouml;chte diesen Hinweis nicht mehr angezeigt bekommen.",
+       'ADMIN_EXPERT_SETTINGS_CONTINUE' => "Dennoch die Experten-Einstellungen aufrufen",
 ));
 
 // Description of all months
index 6596fa7597157e905f79967dc7af7515179e7fef..fc319fc30efeae6209bae4e2915e979e9c6a9110 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 // Language definitions
 addMessages(array(
        'INSTALLATION_OF_MXCHANGE' => "Installation von {?mt_word?}-Projekt-Script",
-       'SETUP_OF_MXCHANGE' => "Installation von {?mt_word?}-Projekt-Script - %s",
+       'SETUP_OF_MXCHANGE' => "Installation von {?mt_word?}-Projekt-Script - {?MAIN_TITLE?}",
        'INSTALL_MISSING_DUMPS' => "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644).",
        'INSTALL_ENABLE_BACKLINK' => "Backlink (=R&uuml;ckverlinkung zu mxchange.org setzen?) <em>rel=&quot;external&quot;</em> ist gesetzt. Bitte nicht den Backlink einbauen, und <strong>nofollow</strong> verwenden! Das schadet allen.",
        'WRONG_PAGE' => "Sie oder dieses Script haben eine falsche Seite ausgew&auml;hlt.",
index eeb77ef6b67f5b59309c84014c5e5bb22696dbb1..6cfcc358959795729cfb382d6bc0efe2c593c140 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 
 // Language definitions
 addMessages(array(
-       'ADMIN_LOGS_DIR_404' => "Das Verzeichnis mit den Zugriffslogb&uuml;chern konnte nicht gefunden werden! (<span class=\"data\">%s</span>) Vermutlich unterst&uuml;tzt Ihr Server dieses nicht.",
+       'ADMIN_LOGS_DIR_404' => "Das Verzeichnis mit den Zugriffslogb&uuml;chern konnte nicht gefunden werden! (<span class=\"data\">{?logs_base?}</span>) Vermutlich unterst&uuml;tzt Ihr Server dieses nicht.",
        'ADMIN_LOGFILE_NOT_READABLE' => "Das Logbuch <span class=\"data\">%s</span> konnte nicht geladen werden.",
        'ADMIN_UNKNOWN_LOGFILE_FORMAT' => "Das Logbuch <span class=\"data\">%s</span> hat ein ung&uuml;ltiges oder nicht unterst&uuml;tztes Format.",
 ));
index ebac809a24db32e69a8982ceb375dcac126f0f38..d353725732c42d1cabac5c352c7951ea9806cb83 100644 (file)
@@ -51,7 +51,7 @@ addMessages(array(
        'ADMIN_ORDER_ORDER' => "So viele wie auf Empfang eingestellt.",
        'MEMBER_ORDER_ALLOWED_RECEIVE' => "Sie k&ouml;nnen heute noch <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Mailbuchungen aufgeben.",
        'MEMBER_ORDER_ALLOWED_MAX' => "Sie k&ouml;nnen solange Mailbuchungen aufgeben, bis alle Mitglieder nicht mehr empfangsbereit sind.",
-       'MEMBER_ORDER_ALLOWED_UNKNOWN' => "Fehler in Konfiguration erkannt! cfg=<span class=\"data\">%s</span> Bitte den Administrator benachrichtigen.",
+       'MEMBER_ORDER_ALLOWED_UNKNOWN' => "Fehler in Konfiguration erkannt! cfg=<span class=\"data\">{?order_max_full?}</span> Bitte den Administrator benachrichtigen.",
        'ADMIN_ORDER_SELECTION_COLUMN' => "Tabellenspalte, nach der umsortiert werden soll",
        'ADMIN_ORDER_SELECTION_MODE' => "Sortierreihenfolge",
        'ADMIN_ORDER_SELECTION_SETTINGS' => "Auswahlverfahren der Empf&auml;nger",
index b9a0eb0f9fa4fe942da35048565d8f406c4dbc63..90de948b1f3bc3567ca9f1b34d54ef55b2000bdb 100644 (file)
@@ -90,7 +90,7 @@ addMessages(array(
 // Member messages
        'PRIMERA_MEMBER_NO_ACCOUNT' => "Noch kein Primus-Account? Hier entlang.",
        'PRIMERA_MEMBER_API_DATA_MISSING' => "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten m&uuml;ssen.",
-       'PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT' => "Sie haben nicht gen&uuml;gend Primera zum Auszahlen! Mindestens: <span class=\"data\">%s</span> Primera.",
+       'PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT' => "Sie haben nicht gen&uuml;gend Primera zum Auszahlen! Mindestens: <span class=\"data\">{%config,translateComma=primera_min_payout%}</span> Primera.",
        'PRIMERA_MEMBER_WITHDRAW_TITLE' => "Primera bei {?MAIN_TITLE?} einzahlen:",
        'PRIMERA_MEMBER_WITHDRAW_POINTS_ACCOUNT' => "Primera hier im Account:",
        'PRIMERA_MEMBER_WITHDRAW_MIN_POINTS' => "Mindest einzuzahlendes Primera-Guthaben:",
@@ -110,7 +110,7 @@ addMessages(array(
        'PRIMERA_MEMBER_EMPTY_AMOUNT' => "Sie haben keine zu &uuml;berweisende Betrag angegeben.",
        'PRIMERA_MEMBER_INVALID_USERNAME' => "Bitte nur Zahlen f&uuml;r den Primus-Usernamen eingeben.",
        'PRIMERA_MEMBER_INVALID_AMOUNT' => "Bitte nur Zahlen f&uuml;r den zu &uuml;berweisenden Betrag eingeben.",
-       'PRIMERA_MEMBER_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">%s</span> Primera an.",
+       'PRIMERA_MEMBER_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">{%config,translateComma=primera_min_payout%}</span> Primera an.",
        'PRIMERA_MEMBER_WITHDRAW_FAILED' => "Die Einzahlung hat nicht geklappt! R&uuml;ckmeldung f&uuml;r den Support: <em>%s</em>.",
        'PRIMERA_MEMBER_WITHDRAW_DONE' => "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)",
        'PRIMERA_MEMBER_PAYOUT_DONE' => "Auszahlung auf Primus-Portal erfolgreich abgeschlossen. :-)",
index f19ba493f9f0a79978fa043ad542a44397530fa3..04ae2278c322cbbb22dba3291e0c463e55005930 100644 (file)
@@ -84,7 +84,7 @@ addMessages(array(
        'MEMBER_REFBACK_ERROR_INVALID_PERCENTAGE' => "Prozentsatz ung&uuml;ltig. 0 bis 100 sind g&uuml;ltige Werte.",
        'MEMBER_REFBACK_ERROR_ID_MISMATCH' => "Die ausgew&auml;hlte Ref-Back id geh&ouml;rt Ihnen nicht.",
        'MEMBER_REFBACK_ERROR_NOT_UPDATED' => "Ref-Back nicht aktualisiert.",
-       'MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS' => "Sie k&ouml;nnen nur mindestens <span class=\"data\">%s&#37;</span> und maximal <span class=\"data\">%s&#37;</span> einstellen.",
+       'MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS' => "Sie k&ouml;nnen nur mindestens <span class=\"data\">{?refback_min_perc?}&#37;</span> und maximal <span class=\"data\">{?refback_max_perc?}&#37;</span> einstellen.",
        'MEMBER_REFBACK_DONE' => "Ref-Back eingestellt. Dieser ist ab jetzt g&uuml;ltig.",
 
 // Subject lines
index 235b287db3cc915bca8e55c68f94edc3d0134dd7..7ba818d2e3b57b8008379c21901fb0f102dbace4 100644 (file)
@@ -303,7 +303,7 @@ addMessages(array(
        'SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH' => "Die von Ihnen eingegebenen neuen Passw&ouml;rter stimmen nicht &uuml;berein.",
        'SPONSOR_PASSWORD_ONE_EMPTY' => "Erstes einzugebenes Passwort ist leer.",
        'SPONSOR_PASSWORD_TWO_EMPTY' => "Zweites einzugebenes Passwort ist leer.",
-       'SPONSOR_PASSWORD_TOO_SHORT' => "Eingegebenes Passwort entspricht nicht der Mindestl&auml;nge von <span class=\"data\">%s</span> Zeichen.",
+       'SPONSOR_PASSWORD_TOO_SHORT' => "Eingegebenes Passwort entspricht nicht der Mindestl&auml;nge von <span class=\"data\">{?pass_len?}</span> Zeichen.",
        'SPONSOR_ACCOUNT_DATA_NOT_SAVED' => "Ihre Daten wurden <u>nicht</u> gespeichert.",
 ));
 
index 187005f38e9e884abca266270c1ef5e44e27d904..0017198f427ad7b78a870c7c5eb7dad4fb32a11c 100644 (file)
@@ -57,6 +57,7 @@ addMessages(array(
        'TRANSFER_TO_MEMBER_NOW' => "Neue {?POINTS?}-&Uuml;berweisung starten",
        'TRANSFER_PLEASE_ALLOW_OPT_IN' => "Bitte erst Empfangen von &Uuml;berweisungen erlauben.",
        'TRANSFER_NOW_LINK' => "&Uuml;berweisung zum anderen Mitglied t&auml;tigen",
+       'TRANSFER_NOW_TITLE' => "Starten Sie hier eine &Uuml;berweisung von {?POINTS?} an ein anderes Mitglied.",
        'TRANSFER_SELECT_TARGET_UID' => "Empf&auml;nger ausw&auml;hlen",
        'TRANSFER_NO_ONE_ELSE_OPT_IN' => "Niemand weiteres m&ouml;chte &Uuml;berweisungen empfangen.",
        'TRANSFER_POINTS_MAXIMUM' => "Maximaler Betrag",
index 6aaba4c29ef9ff3c6c07d72c57ae175b92b9c72d..190278c98c093f5079faf57a7f70dbfed4e2adbf 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 
 // Language definitions
 addMessages(array(
-       'ADMIN_USAGE_DIRECTORY_404' => "Das Verzeichnis <span class=\"data\">%s</span> scheint auf Ihrem Server zu fehlen. Funktion nicht verf&uuml;gbar.",
+       'ADMIN_USAGE_DIRECTORY_404' => "Das Verzeichnis <span class=\"data\">{?usage_base?}</span> scheint auf Ihrem Server zu fehlen. Funktion nicht verf&uuml;gbar.",
 ));
 
 // [EOF]
index be22e94e0cb007200a8c9618bfba2e361a042389..7051460c76dfb15bb1db00543808aa505413dae2 100644 (file)
@@ -125,7 +125,8 @@ addMessages(array(
        'WERNIS_MEMBER_EMPTY_AMOUNT' => "Sie haben keine zu &uuml;berweisende Betrag angegeben.",
        'WERNIS_MEMBER_INVALID_USERNAME' => "Bitte nur Zahlen f&uuml;r den WDS66-Usernamen eingeben.",
        'WERNIS_MEMBER_INVALID_AMOUNT' => "Bitte nur Zahlen f&uuml;r den zu &uuml;berweisenden Betrag eingeben.",
-       'WERNIS_MEMBER_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">%s</span> Wernis an.",
+       'WERNIS_MEMBER_WITHDRAW_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">{%config,translateComma=wernis_min_withdraw%}</span> Wernis f&uuml;r die Einzahlung an.",
+       'WERNIS_MEMBER_PAYOUT_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">{%config,translateComma=wernis_min_payout%}</span> Wernis f&uuml;r die Auszahlung an.",
        'WERNIS_MEMBER_WITHDRAW_FAILED' => "Die Einzahlung hat nicht geklappt! R&uuml;ckmeldung f&uuml;r den Support: <em>%s</em>.",
        'WERNIS_MEMBER_WITHDRAW_DONE' => "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)",
        'WERNIS_MEMBER_PAYOUT_DONE' => "Auszahlung auf WDS66-Hauptaccount erfolgreich abgeschlossen. :-)",
index bdc32fa76dbb1910768bb3632e358df2b052c6d9..874bb68ef620835f42136c6e70de28ea3fb967cf 100644 (file)
@@ -47,7 +47,7 @@ function FILTER_ADD_LINK_ACTIVE_LIST () {
        if (isExtensionActive('online')) {
                // Init content
                $content = array(
-                       'menu' => "<a class=\"menu_blur\" href=\"{%url=modules.php?module=index&amp;what=active%}\">".getConfig('menu_blur_spacer').getMessage('GUEST_ACTIVE_LINK')."</a>",
+                       'menu' => '<a class="menu_blur" href="{%url=modules.php?module=index&amp;what=active%}">{%config=menu_blur_spacer%}' . getMessage('GUEST_ACTIVE_LINK') . '</a>',
                        'what' => 'active'
                );
 
index 60a9d02731580fa7ce22c4984e9801c76427e021..6a1116e65e23958ab90059b480896ceacbeb6b47 100644 (file)
@@ -154,7 +154,7 @@ LIMIT 1",
 }
 
 // Change a lot admin account
-function adminsChangeAdminAccount ($postData) {
+function adminsChangeAdminAccount ($postData, $element = '') {
        // Begin the update
        $cache_update = '0';
        foreach ($postData['login'] as $id => $login) {
@@ -162,7 +162,14 @@ function adminsChangeAdminAccount ($postData) {
                $id = bigintval($id);
 
                // When both passwords match update admin account
-               if ($postData['pass1'][$id] == $postData['pass2'][$id]) {
+               if ((!empty($element)) && (isset($postData[$element]))) {
+                       // Save this setting
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `%s`='%s' WHERE `id`=%s LIMIT 1",
+                               array($element, $postData[$element][$id], $id), __FILE__, __LINE__);
+
+                       // Admin account saved
+                       $message = getMessage('ADMIN_ACCOUNT_SAVED');
+               } elseif ($postData['pass1'][$id] == $postData['pass2'][$id]) {
                        // Save only when both passwords are the same (also when they are empty)
                        $add = ''; $cache_update = 1;
 
@@ -241,12 +248,12 @@ LIMIT 1",
                        // Passwords did not match
                        $message = getMessage('ADMINS_ERROR_PASS_MISMATCH');
                }
+       } // END - foreach
 
-               // Display message
-               if (!empty($message)) {
-                       loadTemplate('admin_settings_saved', false, $message);
-               }
-       }
+       // Display message
+       if (!empty($message)) {
+               loadTemplate('admin_settings_saved', false, $message);
+       } // END - if
 
        // Remove cache file
        runFilterChain('post_admin_edited', postRequestArray());
@@ -310,7 +317,7 @@ function adminsDeleteAdminAccount ($postData) {
 
                        // Get the admin's data
                        $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
-                       array($id), __FUNCTION__, __LINE__);
+                               array($id), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found
                                $content = SQL_FETCHARRAY($result);
@@ -392,6 +399,7 @@ function FILTER_ADD_EXTRA_SQL_DATA ($add = '') {
        if (getExtensionVersion('admins') >= '0.3.0') $add .= ', `default_acl` AS def_acl';
        if (getExtensionVersion('admins') >= '0.6.7') $add .= ', `la_mode`';
        if (getExtensionVersion('admins') >= '0.7.2') $add .= ', `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure';
+       if (getExtensionVersion('admins') >= '0.7.3') $add .= ', `expert_settings`, `expert_warning`';
 
        // Return it
        return $add;
@@ -461,5 +469,79 @@ function sendAdminsEmails ($subj, $template, $content, $userid) {
        SQL_FREERESULT($result);
 }
 
+// "Getter" for current admin's expert settings
+function getAminsExpertSettings () {
+       // Default is has not the right
+       $data['expert_settings'] = 'N';
+
+       // Get current admin login
+       $admin = getAdminLogin(getCurrentAdminId());
+
+       // Lookup settings in cache
+       if (isset($GLOBALS['cache_array']['admin']['expert_settings'][$admin])) {
+               // Use cache
+               $data['expert_settings'] = $GLOBALS['cache_array']['admin']['expert_settings'][$admin];
+
+               // Update cache hits
+               incrementStatsEntry('cache_hits');
+       } elseif (!isExtensionInstalled('cache')) {
+               // Load from database
+               $result = SQL_QUERY_ESC("SELECT `expert_settings` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
+                       array($admin), __FUNCTION__, __LINE__);
+
+               // Entry found?
+               if (SQL_NUMROWS($result) == 1) {
+                       // Fetch data
+                       $data = SQL_FETCHARRAY($result);
+
+                       // Set cache
+                       $GLOBALS['cache_array']['admin']['expert_settings'][$admin] = $data['expert_settings'];
+               } // END - if
+
+               // Free memory
+               SQL_FREERESULT($result);
+       }
+
+       // Return the result
+       return $data['expert_settings'];
+}
+
+// "Getter" for current admin's expert warning (if he wants to see them or not
+function getAminsExpertWarning () {
+       // Default is has not the right
+       $data['expert_warning'] = 'N';
+
+       // Get current admin login
+       $admin = getAdminLogin(getCurrentAdminId());
+
+       // Lookup warning in cache
+       if (isset($GLOBALS['cache_array']['admin']['expert_warning'][$admin])) {
+               // Use cache
+               $data['expert_warning'] = $GLOBALS['cache_array']['admin']['expert_warning'][$admin];
+
+               // Update cache hits
+               incrementStatsEntry('cache_hits');
+       } elseif (!isExtensionInstalled('cache')) {
+               // Load from database
+               $result = SQL_QUERY_ESC("SELECT `expert_warning` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
+                       array($admin), __FUNCTION__, __LINE__);
+
+               // Entry found?
+               if (SQL_NUMROWS($result) == 1) {
+                       // Fetch data
+                       $data = SQL_FETCHARRAY($result);
+
+                       // Set cache
+                       $GLOBALS['cache_array']['admin']['expert_warning'][$admin] = $data['expert_warning'];
+               } // END - if
+
+               // Free memory
+               SQL_FREERESULT($result);
+       }
+
+       // Return the result
+       return $data['expert_warning'];
+}
+
 // [EOF]
 ?>
index af551a1b82a40a81f378f4a6dd58682ce3a8244c..72b6b2e24d47c57dcca4ddbd237100a2b3bb4f55 100644 (file)
@@ -219,7 +219,7 @@ LIMIT 1",
                // No entries found!
                $OUT = "<tr>
   <td colspan=\"3\" align=\"center\" height=\"30\" class=\"bottom\">
-    <div class=\"guest_failed\">".sprintf(getMessage('BONUS_NO_RANKS'), $data)."</div>
+    <div class=\"guest_failed\">".getMaskedMessage('BONUS_NO_RANKS', $data)."</div>
   </td>
 </tr>\n";
        }
@@ -320,12 +320,10 @@ LIMIT 1",
 
        if (($bonus === true) && (getRequestElement('mode') == 'bonus')) {
                // Output message with added points
-               $GLOBALS['message'] .= "<div class=\"tiny\">
-  ".sprintf(getMessage('BONUS_LOGIN_BONUS_ADDED'), translateComma(getConfig('login_bonus')))."
-</div>";
+               $GLOBALS['message'] .= '<div class="tiny">' . getMessage('BONUS_LOGIN_BONUS_ADDED') . '</div>';
        } elseif (isExtensionActive('bonus')) {
                // No login bonus added!
-               $GLOBALS['message'] .= "<div class=\"member_failed\">{--BONUS_LOGIN_BONUS_NOT_ADDED--}</div>";
+               $GLOBALS['message'] .= '<div class="member_failed">{--BONUS_LOGIN_BONUS_NOT_ADDED--}</div>';
        }
 }
 
index 5181e879224817eb64cdbbdc2fa280d37270778f..03bc6437436eb10a2e9190a470f8b0d5f97b6f11 100644 (file)
@@ -61,7 +61,7 @@ function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
        if (!isCacheInstanceValid()) return false;
 
        // Remove cache
-       if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->removeCacheFile();
+       if ($GLOBALS['cache_instance']->loadCacheFile('admin')) $GLOBALS['cache_instance']->removeCacheFile();
 
        // Return the data
        return $data;
index f7a34e0298c62265c4641fb115faea5957fa0644..6d0870a748a6efe03726e445d3163b76599307da 100644 (file)
@@ -82,7 +82,7 @@ function insertUrlsIntoHtml ($text) {
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
-               $text = substr($text, 0, strpos($text, $check2))."<a href=\"".generateDerefererUrl($check)."\" target=\"_blank\">".$check."</a>".substr($text, strpos($text, $check2) + strlen($check));
+               $text = substr($text, 0, strpos($text, $check2)) . '<a href="' . generateDerefererUrl($check) . '" target="_blank">' . $check . '</a>' . substr($text, strpos($text, $check2) + strlen($check));
 
                // Finally remove the url from testing string (or we have a loop and maybe server overload!)
                $test = substr($test, strpos($test, $check) + strlen($check));
@@ -134,7 +134,7 @@ function insertUrlsIntoHtml ($text) {
                } // END - if
 
                // Now replace the email against anchor with mailto and pray...
-               $PARTS[] = $check2 . "<a href=\"" . generateEmailLink($check, 'user_data') . "\">" . $check . "</a>";
+               $PARTS[] = $check2 . '<a href="' . generateEmailLink($check, 'user_data') . '">' . $check . '</a>';
 
                // Remove email from testing string (see above why...)
                $test = substr($test, strlen($check));
index 55cbbb96bc970281b84f3d58663ba1aa23602fbd..fda58af1b5801eb93d03fd957e43d9048f837eda 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 // Getter for jackpot points
 function getJackpotPoints () {
        // Default is zero
-       $jackpot = '0.00000';
+       $data['points'] = '0.00000';
 
        // Read them
        $result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__);
@@ -56,14 +56,14 @@ function getJackpotPoints () {
                SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__);
        } else {
                // Read the line
-               list($jackpot) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
        }
 
        // Free result
        SQL_FREERESULT($result);
 
        // Return them
-       return $jackpot;
+       return $data['points'];
 }
 
 // Adds points to the jackpot
index 4953a1d097c1b2a14af07d150b7bacf226efaa0b..e173bad283bed37d2914c517f99cf0b91bee4d90 100644 (file)
@@ -199,7 +199,7 @@ function doAdminNetworkProcessAddnetworkForm () {
        // We can say here, the form is sent, so check if the network is already added
        if (isNetworkNameValid(postRequestElement('network_short_name'))) {
                // Already there
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_ALREADY_ADDED'), postRequestElement('network_short_name')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_ALREADY_ADDED', postRequestElement('network_short_name')));
                return;
        } // END - if
 
@@ -224,7 +224,7 @@ function doAdminNetworkProcessAddnetworkForm () {
                loadTemplate('admin_network_added', false, postRequestArray());
        } else {
                // Not added
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_DATA_NOT_ADDED'), postRequestElement('network_short_name')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_DATA_NOT_ADDED', postRequestElement('network_short_name')));
        }
 }
 
@@ -331,7 +331,7 @@ function doAdminNetworkProcessChangenetworkForm () {
                // Do we have updates?
                if ($updated > 0) {
                        // Updates done
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_UPDATED'), $updated));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_UPDATED', $updated));
                } else {
                        // Nothing changed
                        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_NOTHING_CHANGED'));
@@ -358,7 +358,7 @@ function doAdminNetworkProcessRemovenetworkForm () {
                // Do we have removes?
                if ($removed > 0) {
                        // Removals done
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_REMOVED'), $removed));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REMOVED', $removed));
                } else {
                        // Nothing removed
                        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_NOTHING_REMOVED'));
index 65eb2937ba9e8a8290886e609a0204919078fbd5..17f7b9c0ab4d3a61f0f1a6b8948bc45cd76093e3 100644 (file)
@@ -72,14 +72,14 @@ ORDER BY
                        loadTemplate('member_payout_list', true, $OUT);
                } else {
                        // No payout types setup so far
-                       loadTemplate('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div");
+                       loadTemplate('admin_settings_saved', false, '<div class="guest_failed">{--PAYOUT_NO_PAYOUT_TYPES--}</div>');
                }
 
                // Free memory
                SQL_FREERESULT($result);
        } else {
                // Points is empty
-               loadTemplate('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_POINTS_ENTERED--}</div");
+               loadTemplate('admin_settings_saved', false, '<div class="guest_failed">{--PAYOUT_NO_POINTS_ENTERED--}</div>');
        }
 }
 
index 29f15fd8c46fb7fabb993b515a72c96120b280c3..7d58b8ee74f06a23e26d31f26f74944eabdcb25a 100644 (file)
@@ -257,7 +257,7 @@ function executePrimeraWithdraw ($primusNick, $userMd5, $amount) {
        $api = new PrimeraApi($primusNick, $userMd5);
 
        // Prepare purpose
-       eval("\$purpose = \"".compileRawCode(sprintf(getMessage('PRIMERA_API_PURPOSE_WITHDRAW'), getSession('sponsorid')))."\";");
+       eval("\$purpose = \"".compileRawCode(getMaskedMessage('PRIMERA_API_PURPOSE_WITHDRAW', getSession('sponsorid')))."\";");
 
        // Pay the Primera
        return $api->payPrimera($primusNick, $amount, $purpose);
@@ -269,7 +269,7 @@ function executePrimeraPayout ($primusNick, $userMd5, $amount) {
        $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5'));
 
        // Prepare purpose
-       eval("\$purpose = \"".compileRawCode(sprintf(getMessage('PRIMERA_API_PURPOSE_PAYOUT'), getMemberId()))."\";");
+       eval("\$purpose = \"".compileRawCode(getMaskedMessage('PRIMERA_API_PURPOSE_PAYOUT', getMemberId()))."\";");
 
        // Pay the Primera
        return $api->payPrimera($primusNick, $amount, $purpose);
index cd86573a4c55f3f8630d33fcc4d8412b995103af..84f371605d47b34125f8c82a26a401a991681401 100644 (file)
@@ -131,7 +131,7 @@ VALUES (%s, %s, %s, %s)",
                if (($notify == 'Y') && ($un)) {
                        // Load email template and send it to the user
                        $message = loadEmailTemplate('member_rallye_notify', $content, $content['userid']);
-                       sendEmail($content['userid'], sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $message);
+                       sendEmail($content['userid'], getMaskedMessage('RALLYE_MEMBER_NOTIFY', $title), $message);
                } // END - if
        } // END - while
 
@@ -140,7 +140,7 @@ VALUES (%s, %s, %s, %s)",
        if ($notify == 'Y') $templ = 'admin_rallye_notify';
 
        // Send email to admin
-       sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, 0);
+       sendAdminNotification(getMaskedMessage('RALLYE_ADMIN_NOTIFY', $title), $templ, $prices, 0);
 
        // Free memory
        SQL_FREERESULT($result_user);
@@ -182,7 +182,7 @@ ORDER BY
                SQL_FREERESULT($result_prices);
        } else {
                // No prices???
-               $prices = sprintf(getMessage('RALLYE_MEMBER_NO_PRICES'), $mode);
+               $prices = getMaskedMessage('RALLYE_MEMBER_NO_PRICES', $mode);
        }
 
        // Add last line for email mode
@@ -364,7 +364,7 @@ LIMIT 1", __FUNCTION__, __LINE__);
 
                        // Send notification to member
                        $message = loadEmailTemplate('member_rallye_notify', $content, $userid);
-                       sendEmail($userid, sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $message);
+                       sendEmail($userid, getMaskedMessage('RALLYE_MEMBER_NOTIFY', $title), $message);
                } // END - if
 
                // Check if line is already included...
@@ -491,7 +491,7 @@ LIMIT 1",
 
                                // Load template
                                $message = loadEmailTemplate($template, $DATA, $userid);
-                               sendEmail($userid, sprintf(getMessage('RALLYE_MEMBER_EXPIRED_SUBJ'), $DATA['level']), $message);
+                               sendEmail($userid, getMaskedMessage('RALLYE_MEMBER_EXPIRED_SUBJ', $DATA['level']), $message);
                        } // END - if
 
                        // Count userid
@@ -510,7 +510,7 @@ LIMIT 1",
        }
 
        // Send mail to admin
-       sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_EXPIRED_SUBJ'), $title), $templ, $cnt, 0);
+       sendAdminNotification(getMaskedMessage('RALLYE_ADMIN_EXPIRED_SUBJ', $title), $templ, $cnt, 0);
 
        // Add task
        createNewTask('{--RALLYE_ADMIN_EXPIRED--}: ' . $title, '{--RALLYE_ADMIN_EXPIRED_TEXT--}', 'RALLYE_EXPIRED');
@@ -733,7 +733,7 @@ WHERE end_time <= (UNIX_TIMESTAMP() - {?ONE_DAY?} - %s) AND expired='Y'",
                        $content['now_time']    = generateDateTime(time(), 1);
 
                        // Send mail to admin
-                       sendAdminNotification(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), 'admin_rallye_purged', $content, 0);
+                       sendAdminNotification(getMaskedMessage('RALLYE_ADMIN_PURGED_SUBJ', $content['title']), 'admin_rallye_purged', $content, 0);
 
                        // Purge whole rallye
                        addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1",
@@ -866,7 +866,7 @@ function determineReferalRallyeMinimumUsers ($min_users) {
 
        if ($min_users > 0) {
                // Rallye ends when X members are totally in your exchange
-               $return = sprintf(getMessage('RALLYE_END_USERS'), $min_users);
+               $return = getMaskedMessage('RALLYE_END_USERS', $min_users);
        } // END - if
 
        // Return
@@ -880,7 +880,7 @@ function determineReferalRallyeMinimumPrices ($min_prices) {
 
        if ($min_prices > 0) {
                // Rallye ends when X members are totally in your exchange
-               $return = sprintf(getMessage('RALLYE_END_PRICES'), $min_prices);
+               $return = getMaskedMessage('RALLYE_END_PRICES', $min_prices);
        } // END - if
 
        // Return
index 4c6a4b2a48c23d54d8a4296b0021a6c41200ce03..8238c70fcb4f5d23f6a5230d0d869ca4fe87eeae 100644 (file)
@@ -139,7 +139,7 @@ function addAnonymityLevel () {
        $constantName = sprintf("REMOVEIP_LEVEL_%s", strtoupper($suffix));
 
        // Default message
-       $message = sprintf(getMessage('REMOVEIP_UNKNOWN_LEVEL'), $suffix);
+       $message = getMaskedMessage('REMOVEIP_UNKNOWN_LEVEL', $suffix);
 
        // Is that constant there?
        if (isMessageIdValid($constantName)) {
index 96e39998fe8a7ab061992afccee2df548db2ce40..bb87b1ae36b0925ff1b26bb31d11bbabd5b2c2bd 100644 (file)
@@ -89,7 +89,7 @@ if (!isset($_POST)) {
 } // END - if
 
 // Include IP-Filter here
-//require("/usr/share/php/ipfilter.php");
+//include("/usr/share/php/ipfilter.php");
 
 // Generate arrays which holds the relevante chars to replace
 $GLOBALS['security_chars'] = array(
index 7606738e22c41b0ecc2f6e7eac8abc4ace5d0473..7ef4e61a3067ac0bd876e60f9b99c13aa073d390 100644 (file)
@@ -176,7 +176,7 @@ function handlSponsorRequest (&$postData, $update=false, $messageArray=array(),
                                foreach ($postData as $k => $v) {
                                        // Do not add 'force' !
                                        if ($k != 'force') {
-                                               $OUT .= "<input type=\"hidden\" name=\"" . secureString($k) . "\" value=\"" . SQL_ESCAPE($v) . "\" />\n";
+                                               $OUT .= '<input type="hidden" name="' . secureString($k) . '" value="' . SQL_ESCAPE($v) . '" />';
                                        } // END - if
                                } // END - foreach
 
@@ -189,7 +189,7 @@ function handlSponsorRequest (&$postData, $update=false, $messageArray=array(),
                                return;
                        } else {
                                // Already added!
-                               $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND'), $postData['email']);
+                               $message = getMaskedMessage('SPONSOR_ALREADY_FOUND', $postData['email']);
                                $ret = 'already';
                        }
 
@@ -224,7 +224,7 @@ function sponsorTranslateUserStatus ($status) {
        } else {
                // Not found!
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
-               $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
+               $ret = getMaskedMessage('UNKNOWN_STATUS', $status);
        }
        return $ret;
 }
@@ -343,7 +343,7 @@ function addSponsorContent ($what) {
                loadIncludeOnce($INC);
        } else {
                // File not found!
-               $OUT .= loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what));
+               $OUT .= loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_CONTENT_404', $what));
        }
 
        // Return content
@@ -465,7 +465,7 @@ function saveSponsorData ($postData, $content) {
 
                default: // Unknown sponsor what value!
                        logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", getWhat()));
-                       $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), getWhat());
+                       $message = getMaskedMessage('SPONSOR_UNKNOWN_WHAT', getWhat());
                        $templ = ''; $subj = '';
                        break;
        }
index 95705bc254012b231b3772f5a595541696b29da0..5b2bca1ce726ea51b19db1c9c02d458ed9688d96 100644 (file)
@@ -835,7 +835,12 @@ INNER JOIN
 ON
        u.id=l.url_id
 WHERE
-       l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = '0')
+       l.userid=%s AND
+       (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND
+       (
+               ((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR
+               u.fixed_reload = '0'
+       )
 LIMIT 1",
                array(getMemberId()), __FUNCTION__, __LINE__
        );
index 0d9b52f82236798809e715e6a481a92aa51017bc..fb8fd95c230f57feebe447b997c7216993098f04 100644 (file)
@@ -86,7 +86,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'");
 
        if ($value > 0) {
-               $content['update_tasks'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_task&amp;type=updates%}\">".$value."</a>";
+               $content['update_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=updates%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -96,21 +96,21 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true);
 
        if ($value > 0) {
-               $content['confirmed_members'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_user&amp;status=confirmed%}\">".$value."</a>";
+               $content['confirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=confirmed%}">' . $value . '</a>';
        } // END - if
 
        // Unconfirmed accounts
        $value = countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true);
 
        if ($value > 0) {
-               $content['unconfirmed_members'] = "<a href=\"{%url=modules.php?module=admin&amp;what=chk_regs%}\">".$value."</a>";
+               $content['unconfirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=chk_regs%}">' . $value . '</a>';
        } // END - if
 
 
        // And locked accounts
        $value = countSumTotalData('LOCKED', 'user_data', 'userid', 'status', true);
        if ($value > 0) {
-               $content['locked_members'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_user&amp;status=locked%}\">".$value."</a>";
+               $content['locked_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=locked%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -119,7 +119,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData(0, 'task_system', 'id', 'assigned_admin', true, " AND `status` != 'DELETED'");
 
        if ($value > 0) {
-               $content['new_tasks'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_task&amp;type=unassigned%}\">".$value."</a>";
+               $content['new_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=unassigned%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -128,7 +128,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('CLOSED', 'task_system', 'id', 'status', true);
 
        if ($value > 0) {
-               $content['closed_tasks'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_task&amp;type=closed%}\">".$value."</a>";
+               $content['closed_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=closed%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -137,7 +137,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('DELETED', 'task_system', 'id', 'status', true);
 
        if ($value > 0) {
-               $content['deleted_tasks'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_task&amp;type=deleted%}\">".$value."</a>";
+               $content['deleted_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=deleted%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -146,7 +146,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('SOLVED', 'task_system', 'id', 'status', true, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId()));
 
        if ($value > 0) {
-               $content['solved_tasks'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_task&amp;type=solved%}\">".$value."</a>";
+               $content['solved_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=solved%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -155,7 +155,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'");
 
        if ($value > 0) {
-               $content['your_tasks'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_task%}\">".$value."</a>";
+               $content['your_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -164,7 +164,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('ADMIN', 'pool', 'id', 'data_type', true);
 
        if ($value > 0) {
-               $content['pending_mails'] = "<a href=\"{%url=modules.php?module=admin&amp;what=unlock_emails%}\">".$value."</a>";
+               $content['pending_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=unlock_emails%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -173,7 +173,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('TEMP', 'pool', 'id', 'data_type', true);
 
        if ($value > 0) {
-               $content['canceled_mails'] = "<a href=\"{%url=modules.php?module=admin&amp;what=email_details%}\">".$value."</a>";
+               $content['canceled_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_details%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -182,7 +182,7 @@ function outputAdvancedOverview (&$result_main) {
        $value = countSumTotalData('SEND', 'pool', 'id', 'data_type', true);
 
        if ($value > 0) {
-               $content['send_emails'] = "<a href=\"{%url=modules.php?module=admin&amp;what=email_archiv%}\">".$value."</a>";
+               $content['send_emails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_archiv%}">' . $value . '</a>';
        } // END - if
 
        //
@@ -193,7 +193,7 @@ function outputAdvancedOverview (&$result_main) {
                $value = countSumTotalData('DELETED', 'pool', 'id', 'data_type', true);
 
                if ($value > 0) {
-                       $content['purged_mails'] = "<a href=\"{%url=modules.php?module=admin&amp;what=email_details%}\">".$value."</a>";
+                       $content['purged_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_details%}">' . $value . '</a>';
                } // END - if
 
                //
@@ -204,10 +204,10 @@ function outputAdvancedOverview (&$result_main) {
                        $value = countSumTotalData('DELETED', 'bonus', 'id', 'data_type', true);
 
                        if ($value > 0) {
-                               $content['purged_bonus_mails'] = "<a href=\"{%url=modules.php?module=admin&amp;what=email_details%}\">".$value."</a>";
+                               $content['purged_bonus_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_details%}">' . $value . '</a>';
                        } // END - if
                } elseif (isExtensionActive('bonus')) {
-                       $content['purged_bonus_mails'] = sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED'), '0.1.8');
+                       $content['purged_bonus_mails'] = getMaskedMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8');
                } else {
                        $content['purged_bonus_mails'] = "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>";
                }
@@ -224,10 +224,10 @@ function outputAdvancedOverview (&$result_main) {
                $value = countSumTotalData('SEND', 'bonus', 'id', 'data_type', true, " AND `is_notify`='N'");
 
                if ($value > 0) {
-                       $content['send_bonus_mails'] = "<a href=\"{%url=modules.php?module=admin&amp;what=email_details%}\">".$value."</a>";
+                       $content['send_bonus_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_details%}">' . $value . '</a>';
                } // END - if
        } elseif (isExtensionActive('bonus')) {
-               $content['send_bonus_mails'] = sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED'), '0.1.8');
+               $content['send_bonus_mails'] = getMaskedMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8');
        } else {
                $content['send_bonus_mails'] = getMessage('ADMIN_EXT_BONUS_404');
        }
@@ -578,7 +578,7 @@ function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) {
 
                        if (($value > 0) && (!empty($WHATs[$key]))) {
                                if (empty($TITLEs[$key])) $TITLEs[$key] = getMessage('ADMIN_TASK_UNKNOWN_LIST_TITLE');
-                               $content['row_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=".$WHATs[$key]."%}\" title=\"".$TITLEs[$key]."%}\">".$value."</a>";
+                               $content['row_link'] = '<a href="{%url=modules.php?module=admin&amp;what=' . $WHATs[$key] . '%}" title="' . $TITLEs[$key] . '">' . $value . '</a>';
                        } else {
                                $content['row_link'] = '0';
                        }
index d837789fe8b07b16b95e17c368fd1c8e3056abbc..8a0ede3f2971e6964e21455db252627efc260413 100644 (file)
@@ -300,18 +300,18 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p
        if (!empty($content['userid'])) $userid = bigintval($content['userid']);
 
        // Is there an entry?
-       if (((isUserDataValid()) && (getUserData('status') == 'CONFIRMED') && (!empty($content['userid']))) || ($content['userid'] == $userid)) {
+       if ((isUserDataValid()) && (getUserData('status') == 'CONFIRMED') && (!empty($content['userid']))) {
                // Check for old MD5 passwords
-               if ((strlen($content['password']) == 32) && (md5($passwd) == $content['password'])) {
+               if ((strlen(getUserData('password')) == 32) && (md5($passwd) == getUserData('password'))) {
                        // Just set the hash to the password from DB... :)
-                       $content['hash'] = $content['password'];
+                       $content['hash'] = getUserData('password');
                } else {
                        // Hash password with improved way for comparsion
-                       $content['hash'] = generateHash($passwd, substr($content['password'], 0, -40));
+                       $content['hash'] = generateHash($passwd, substr(getUserData('password'), 0, -40));
                }
 
                // Does the password match the hash?
-               if ($content['hash'] == $content['password']) {
+               if ($content['hash'] == getUserData('password')) {
                        // New hashed password found so let's generate a new one
                        $content['hash'] = generateHash($passwd);
 
@@ -324,8 +324,9 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p
                        $GLOBALS['bonus_payed'] = false;
 
                        // Probe for last online timemark
-                       $probe = time() -  $content['last_online'];
-                       if (!empty($content['last_login'])) $probe = time() - $content['last_login'];
+                       $probe = time() -  getUserData('last_online');
+                       if (getUserData('last_login') > 0) $probe = time() - getUserData('last_login');
+
                        if ((isExtensionInstalledAndNewer('bonus', '0.2.2')) && ($probe >= getConfig('login_timeout'))) {
                                // Add login bonus to user's account
                                $add = ', `login_bonus`=`login_bonus`+{?login_bonus?}';
@@ -378,18 +379,18 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p
                        // Wrong password!
                        $errorCode = getCode('WRONG_PASS');
                }
-       } elseif (((isExtensionActive('nickname')) && (isNicknameUsed($content['userid'])) && (!empty($content['userid']))) || ($content['userid'] == $userid)) {
-               // Other account status?
-               if (fetchUserData($userid)) {
-                       // Create an error code from given status
-                       $errorCode = generateErrorCodeFromUserStatus(getUserData('status'));
-               } else {
-                       // id not found!
-                       $errorCode = getCode('WRONG_ID');
-               }
-       } elseif ($errorCode == '0') {
-               // id not found!
+       } elseif (getUserData('status') != 'CONFIRMED') {
+               // Create an error code from given status
+               $errorCode = generateErrorCodeFromUserStatus(getUserData('status'));
+
+               // Set userid in session
+               setSession('current_userid', getUserData('userid'));
+       } elseif (!isUserDataValid()) {
+               // User id not found!
                $errorCode = getCode('WRONG_ID');
+       } else {
+               // Unknown error
+               $errorCode = getCode('UNKNOWN_ERROR');
        }
 
        // Error code provided?
index 6e37a974bfdacf815b282fcd4070aef0904a86c1..5107b398590bbb718cc79ecec373b69a37c7418c 100644 (file)
@@ -54,7 +54,7 @@ function GET_WERNIS_ERROR_MESSAGE () {
                return $GLOBALS['wernis_data']['message'];
        } elseif (isset($GLOBALS['wernis_data']['status'])) {
                // Fall-back to status
-               return sprintf(getMessage('WERNIS_ERROR_STATUS'), $GLOBALS['wernis_data']['status']);
+               return getMaskedMessage('WERNIS_ERROR_STATUS', $GLOBALS['wernis_data']['status']);
        } else {
                // Something bad happend
                return getMessage('WERNIS_UNKNOWN_ERROR');
@@ -107,7 +107,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
                // Something bad happend... :(
                return array(
                        'status'  => 'request_error',
-                       'message' => sprintf(getMessage('WERNIS_API_REQUEST_ERROR'), $response[0])
+                       'message' => getMaskedMessage('WERNIS_API_REQUEST_ERROR', $response[0])
                );
        } // END - if
 
@@ -185,7 +185,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData =  array()) {
                                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown error %s from WDS66 API received.", $data[1]));
                                $return = array(
                                        'status'  => 'request_failed',
-                                       'message' => sprintf(getMessage('WERNIS_API_REQUEST_FAILED'), $data[1])
+                                       'message' => getMaskedMessage('WERNIS_API_REQUEST_FAILED', $data[1])
                                );
                                break;
                }
@@ -238,7 +238,7 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
        $result = false;
 
        // Prepare the purpose
-       eval("\$purpose = \"".compileRawCode(sprintf(getMessage('WERNIS_API_PURPOSE_WITHDRAW'), getMemberId()))."\";");
+       eval("\$purpose = \"".compileRawCode(getMaskedMessage('WERNIS_API_PURPOSE_WITHDRAW', getMemberId()))."\";");
 
        // Prepare the request data
        $requestData = array(
@@ -278,7 +278,7 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) {
        $result = false;
 
        // Prepare the purpose
-       eval("\$purpose = \"".compileRawCode(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), getMemberId()))."\";");
+       eval("\$purpose = \"".compileRawCode(getMaskedMessage('WERNIS_API_PURPOSE_PAYOUT', getMemberId()))."\";");
 
        // Prepare the request data
        $requestData = array(
@@ -314,7 +314,7 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) {
 // Translate the status IN/OUT
 function WERNIS_TRANSFER_STATUS ($status) {
        // Default status
-       $return = sprintf(getMessage('WERNIS_STATUS_UNKNWOWN'), $status);
+       $return = getMaskedMessage('WERNIS_STATUS_UNKNWOWN', $status);
        switch ($status) {
                case 'IN': // Withdraw
                        $return = getMessage('WERNIS_STATUS_WITHDRAW');
index 7b016bf38d57a7c06b1314109586c3df69cebd20..fb6c7aa633f69b24fe9d58d07ab044073b4b2337 100644 (file)
@@ -63,6 +63,9 @@ loadIncludeOnce('inc/loader/load_cache-filter.php');
 // Pre-load extensions cacher
 loadIncludeOnce('inc/loader/load_cache-extension.php');
 
+// Init filter system
+initFilterSystem();
+
 // Load all includes
 loadIncludePool('cache');
 
index e1a87b4fcc04999b1e8caf3238a307e1587a7a76..19c484adbd57a87f2480c505e3774a5d1df9afd2 100644 (file)
@@ -229,7 +229,7 @@ if (!isAdminRegistered()) {
 
                        case '404': // Administrator login not found
                                setRequestPostElement('ok', $ret);
-                               $ret = sprintf(getMessage('ADMIN_404'), postRequestElement('login'));
+                               $ret = getMaskedMessage('ADMIN_404', postRequestElement('login'));
                                destroyAdminSession();
                                break;
 
@@ -365,7 +365,7 @@ if (!isAdminRegistered()) {
 
                case '404': // Administrator login not found
                        setRequestPostElement('ok', $ret);
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_404'), getSession('admin_login')));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_404', getSession('admin_login')));
                        destroyAdminSession();
                        break;
 
index 8a1bb920d5fc1c69725afc86823f74020b715ef9..034c3b5e409213d69df42d6877c2b1092852392b 100644 (file)
@@ -50,7 +50,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the admin action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('ADMIN_WHAT_404'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('ADMIN_WHAT_404', getWhat()));
 }
 
 // [EOF]
index 761259090fbe5a1c16aef29f629c84219ed32f46..0fc8b602c104727c0363f2966c34612f360e34f7 100644 (file)
@@ -50,7 +50,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the admin action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('ADMIN_WHAT_404'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('ADMIN_WHAT_404', getWhat()));
 }
 
 // [EOF]
index 97aab22bfebb4c94ab3b1e4dcd38e076af164eaa..ac2747eb35c7a9d47637160bae69601b9677b32d 100644 (file)
@@ -307,14 +307,14 @@ LIMIT 1",
                        loadInclude($inc);
                } elseif ($GLOBALS['acl_allow'] === false) {
                        // Access denied
-                       loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACCESS_DENIED'), $what));
+                       loadTemplate('admin_menu_failed', false, getMaskedMessage('ADMIN_ACCESS_DENIED', $what));
                } else {
                        // Include file not found! :-(
-                       loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_404'), $action));
+                       loadTemplate('admin_menu_failed', false, getMaskedMessage('ADMIN_ACTION_404', $action));
                }
        } else {
                // Invalid action/what pair found!
-               loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $action . '/' . $what));
+               loadTemplate('admin_menu_failed', false, getMaskedMessage('ADMIN_ACTION_INVALID', $action . '/' . $what));
        }
 
        // Free memory
@@ -532,7 +532,8 @@ function addMemberSelectionBox ($def=0, $add_all=false, $return=false, $none=fal
 // @DEPRECATED
 function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') {
        $what = "`what` != ''";
-       if ($mode == 'action') $what = "(`what`='' OR `what` IS NULL) AND action !='login'";
+       if ($mode == 'action') $what = "(`what`='' OR `what` IS NULL) AND `action` !='login'";
+
        $result = SQL_QUERY_ESC("SELECT %s, `title` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$what." ORDER BY `sort` ASC",
                array($mode), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
@@ -613,9 +614,9 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
        $result = false;
        if ($alwaysAdd === false) {
                if (!empty($whereStatement)) {
-                       $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}".$tableName."` WHERE ".$whereStatement." LIMIT 1", __FUNCTION__, __LINE__);
+                       $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}" . $tableName . "` WHERE " . $whereStatement . " LIMIT 1", __FUNCTION__, __LINE__);
                } else {
-                       $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}".$tableName."` LIMIT 1", __FUNCTION__, __LINE__);
+                       $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}" . $tableName . "` LIMIT 1", __FUNCTION__, __LINE__);
                }
        } // END - if
 
@@ -751,10 +752,12 @@ function adminGetMenuMode () {
                // Load from database when version of 'admins' is enough
                $result = SQL_QUERY_ESC("SELECT la_mode FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array($adminId), __FUNCTION__, __LINE__);
+
+               // Do we have an entry?
                if (SQL_NUMROWS($result) == 1) {
                        // Load data
                        list($adminMode) = SQL_FETCHROW($result);
-               }
+               } // END - if
 
                // Free memory
                SQL_FREERESULT($result);
@@ -901,9 +904,9 @@ function adminListBuilder ($listType, $IDs, $table, $columns, $filterFunctions,
 
        // Load master template
        loadTemplate(sprintf("admin_%s_%s",
-       $listType,
-       $table
-       ), false, $OUT
+               $listType,
+               $table
+               ), false, $OUT
        );
 }
 
@@ -1092,7 +1095,7 @@ function adminEditEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctio
                                } // END - foreach
 
                                // Finish SQL command
-                               $sql = substr($sql, 0, -1) . " WHERE `".$idColumn."`=".bigintval($id)." LIMIT 1";
+                               $sql = substr($sql, 0, -1) . " WHERE `" . $idColumn . "`=" . bigintval($id) . " LIMIT 1";
 
                                // Run this query
                                SQL_QUERY($sql, __FUNCTION__, __LINE__);
@@ -1136,10 +1139,10 @@ function adminLockEntriesConfirm ($IDs, $table, $columns=array(), $filterFunctio
                // Shall we un-/lock here or list for locking?
                if ($lockNow === true) {
                        // Un-/lock entries
-                       adminBuilderStatusHandler("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray);
+                       adminBuilderStatusHandler('lock', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray);
                } else {
                        // List for editing
-                       adminListBuilder("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
+                       adminListBuilder('lock', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
                }
        } // END - if
 }
@@ -1151,10 +1154,10 @@ function adminUndeleteEntriesConfirm ($IDs, $table, $columns=array(), $filterFun
                // Shall we un-/lock here or list for locking?
                if ($undeleteNow === true) {
                        // Undelete entries
-                       adminBuilderStatusHandler("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray);
+                       adminBuilderStatusHandler('undelete', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray);
                } else {
                        // List for editing
-                       adminListBuilder("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
+                       adminListBuilder('undelete', $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
                }
        } // END - if
 }
@@ -1196,7 +1199,7 @@ function sendAdminPasswordResetLink ($email) {
        SQL_FREERESULT($result);
 
        // Generate hash for reset link
-       $content['hash'] = generateHash(getConfig('URL').':'.$content['id'].':'.$content['login'].':'.$content['password'], substr($content['password'], 10));
+       $content['hash'] = generateHash(getConfig('URL') . ':' . $content['id'] . ':' . $content['login'] . ':' . $content['password'], substr($content['password'], 10));
 
        // Remove some data
        unset($content['id']);
@@ -1297,17 +1300,24 @@ function adminUpdateTaskData ($id, $row, $data) {
 
        // Update the task
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `%s`='%s' WHERE `id`=%s LIMIT 1",
-               array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
+               array(
+                       $row,
+                       $data,
+                       bigintval($id)
+               ), __FUNCTION__, __LINE__);
 }
 
 // Checks wether if the admin menu has entries
 function ifAdminMenuHasEntries ($action) {
        return (
                ((
+                       // Is the entry set?
                        isset($GLOBALS['admin_menu_has_entries'][$action])
                ) && (
+                       // And do we have a menu for this action?
                        $GLOBALS['admin_menu_has_entries'][$action] === true
                )) || (
+                       // Login has always a menu
                        $action == 'login'
                )
        );
@@ -1323,7 +1333,7 @@ function adminCreateUserLink ($userid) {
        // Is the userid set correctly?
        if ($userid > 0) {
                // Create a link to that profile
-               return '{%url=modules.php?module=admin&amp;what=list_user&amp;userid='.bigintval($userid) . '%}';
+               return '{%url=modules.php?module=admin&amp;what=list_user&amp;userid=' . bigintval($userid) . '%}';
        } // END - if
 
        // Return a link to the user list
@@ -1333,7 +1343,7 @@ function adminCreateUserLink ($userid) {
 // Generate a "link" for the given admin id (admin_id)
 function generateAdminLink ($adminId) {
        // No assigned admin is default
-       $adminLink = "<span class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>";
+       $adminLink = '<span class="admin_note">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>';
 
        // Zero? = Not assigned
        if (bigintval($adminId) > 0) {
@@ -1345,14 +1355,14 @@ function generateAdminLink ($adminId) {
                        // Is the extension there?
                        if (isExtensionActive('admins')) {
                                // Admin found
-                               $adminLink = "<a href=\"".generateEmailLink(getAdminEmail($adminId), 'admins')."\">" . $login."</a>";
+                               $adminLink = '<a href="' . generateEmailLink(getAdminEmail($adminId), 'admins') . '" title="{--ADMIN_CONTACT_LINK_TITLE--}">' . $login . '</a>';
                        } else {
                                // Extension not found
-                               $adminLink = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'admins');
+                               $adminLink = getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'admins');
                        }
                } else {
                        // Maybe deleted?
-                       $adminLink = "<div class=\"admin_note\">".sprintf(getMessage('ADMIN_ID_404'), $adminId)."</div>";
+                       $adminLink = '<div class="admin_note">' . getMaskedMessage('ADMIN_ID_404', $adminId) . '</div>';
                }
        } // END - if
 
@@ -1360,5 +1370,73 @@ function generateAdminLink ($adminId) {
        return $adminLink;
 }
 
+// Verifies if the current admin has confirmed to alter expert settings
+//
+// Return values:
+// 'failed'    = Something goes wrong (default)
+// 'agreed'    = Has verified and and confirmed it to see them
+// 'forbidden' = Has not the proper right to alter them
+// 'update'    = Need to update extension 'admins'
+// 'ask'       = A form was send to the admin
+function doVerifyExpertSettings () {
+       // Default return status is failed
+       $return = 'failed';
+
+       // Is the extension installed and recent?
+       if (isExtensionInstalledAndNewer('admins', '0.7.3')) {
+               // Okay, load the status
+               $expertSettings = getAminsExpertSettings();
+
+               // Is he allowed?
+               if ($expertSettings == 'Y') {
+                       // Okay, does he want to see them?
+                       if (getAminsExpertWarning() == 'Y') {
+                               // Ask for them
+                               if (isFormSent()) {
+                                       // Is the element set, then we need to change the admin
+                                       if (isPostRequestElementSet('expert_settings')) {
+                                               // Get it and prepare final post data array
+                                               $postData['login'][getCurrentAdminId()] = getAdminLogin(getCurrentAdminId());
+                                               $postData['expert_warning'][getCurrentAdminId()] = 'N';
+
+                                               // Change it in the admin
+                                               adminsChangeAdminAccount($postData, 'expert_warning');
+
+                                               // Clear form
+                                               unsetPostRequestElement('ok');
+                                       } // END - if
+
+                                       // All fine!
+                                       $return = 'agreed';
+                               } else {
+                                       // Send form
+                                       loadTemplate('admin_expert_settings_form');
+
+                                       // Asked for it
+                                       $return = 'ask';
+                               }
+                       } else {
+                               // Do not display
+                               $return = 'agreed';
+                       }
+               } else {
+                       // Forbidden
+                       $return = 'forbidden';
+               }
+       } else {
+               // Out-dated extension or not installed
+               $return = 'update';
+       }
+
+       // Output message for other status than ask/agreed
+       if (($return != 'ask') && ($return != 'agreed')) {
+               // Output message
+               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_EXPERT_SETTINGS_STATUS_' . strtoupper($return)));
+       } // END - if
+
+       // Return status
+       return $return;
+}
+
 // [EOF]
 ?>
index 4266e3e2b8be8fc21aa3af4d41a1b9b0ea02af27..0b8b56becdb2463777a43bf48c5af4d685107e10 100644 (file)
@@ -152,8 +152,11 @@ LIMIT 1",
 
                                if ($adminId == '0') {
                                        // Assgin current admin to unassgigned task
-                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1",
-                                       array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
+                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s AND `assigned_admin`=0 LIMIT 1",
+                                               array(
+                                                       getCurrentAdminId(),
+                                                       bigintval($tid)
+                                               ), __FILE__, __LINE__);
                                } // END - if
 
                                $add = '';
@@ -161,7 +164,7 @@ LIMIT 1",
                                if ($type == 'SUPPORT_MEMBER') {
                                        $mode = substr($text, 0, strpos($text, ':'));
                                        $text = substr($text, strpos($text, ':') + 1);
-                                       $add = "<li>{--ADMIN_TASK_SUPPORT_MODE--}: <strong>".$mode."</strong></li>";
+                                       $add = "<li>{--ADMIN_TASK_SUPPORT_MODE--}: <strong>" . $mode . "</strong></li>";
                                } // END - if
 
                                // Is a userid assign?
@@ -172,7 +175,7 @@ LIMIT 1",
                                                $content = getUserDataArray();
 
                                                // Generate HTML list entry
-                                               $add = "<li>{--ADMIN_MEMBER_UID--}: <strong>".generateUserProfileLink($userid, 'user_data')." (<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender'])." ".$content['surname']." ".$content['family']."</a>)</strong></li>";
+                                               $add = "<li>{--ADMIN_MEMBER_UID--}: <strong>".generateUserProfileLink($userid, 'user_data')." (<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender']) . ' ' . $content['surname'] . ' ' . $content['family']."</a>)</strong></li>";
                                        } else {
                                                // Invalid userid, so log and zero it
                                                logDebugMessage(__FUNCTION__, __LINE__, 'Invalid userid=' . $userid . ' -> not found!');
@@ -203,7 +206,7 @@ LIMIT 1",
                                                // Is this non-productive?
                                                if (isExtensionProductive() === false) {
                                                        // Issue warning
-                                                       $text .= loadTemplate('admin_settings_saved', true, sprintf(getMessage('ADMIN_EXTENSION_IS_NON_PRODUCTIVE'), $ext_name));
+                                                       $text .= loadTemplate('admin_settings_saved', true, getMaskedMessage('ADMIN_EXTENSION_IS_NON_PRODUCTIVE', $ext_name));
                                                } // END - if
 
                                                // Set current extension name
@@ -287,7 +290,7 @@ LIMIT 1",
                                                        ));
                                                } else {
                                                        // Task is closed so nothing is todo
-                                                       $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n";
+                                                       $OUT .= '<div class="admin_failed">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>';
 
                                                        // Close task but not already closed, solved, deleted or update tasks
                                                        if ((!in_array($status, array('CLOSED','DELETED','SOLVED'))) && ($type != 'EXTENSION_UPDATE')) {
@@ -299,7 +302,7 @@ LIMIT 1",
 
                                        case 'EXTENSION_UPDATE': // Extension update
                                                // Extension updates are installed automatically
-                                               $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_EXTENSION_UPDATED--}</div>\n";
+                                               $OUT .= '<div class="admin_failed medium">{--ADMIN_EXTENSION_UPDATED--}</div>';
 
                                                // Close task
                                                if (($status != 'CLOSED') && ($status != 'DELETED')) {
@@ -313,7 +316,7 @@ LIMIT 1",
                                                switch ($mode) {
                                                        default: // @TODO Unknown support mode
                                                        logDebugMessage(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
-                                                       $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_SUPPORT_MODE'), $mode)."</div>\n";
+                                                       $OUT .= '<div class="admin_failed medium">' . getMaskedMessage('ADMIN_UNKNOWN_SUPPORT_MODE', $mode) . '</div>';
                                                        break;
                                                }
                                                break;
@@ -321,7 +324,7 @@ LIMIT 1",
                                        case 'PAYOUT_REQUEST': // Payout requests
                                                if (isExtensionActive('payout')) {
                                                        // Extension is installed so let him send a notification to the user
-                                                       $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `userid`=%s AND payout_timestamp=%s LIMIT 1",
+                                                       $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `userid`=%s AND `payout_timestamp`=%s LIMIT 1",
                                                                array(bigintval($userid), bigintval($created)), __FILE__, __LINE__);
                                                        list($pid) = SQL_FETCHROW($result_pay);
                                                        SQL_FREERESULT($result_pay);
@@ -337,11 +340,11 @@ LIMIT 1",
                                                                $OUT .= loadTemplate('admin_payout_overview_form', true, $content);
                                                        } else {
                                                                // Problem obtaining payout id
-                                                               $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n";
+                                                               $OUT .= '<div class="admin_failed medium">{--PAYOUT_OBTAIN_ID_FAILED--}</div>';
                                                        }
                                                } else {
                                                        // Extension is not installed
-                                                       $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n";
+                                                       $OUT .= '<div class="admin_failed medium">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>';
                                                }
                                                break;
 
@@ -362,11 +365,11 @@ LIMIT 1",
                                                                $OUT .= loadTemplate('admin_wernis_overview_form', true, $content);
                                                        } else {
                                                                // Problem obtaining wernis id
-                                                               $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n";
+                                                               $OUT .= '<div class="admin_failed medium">{--WERNIS_OBTAIN_ID_FAILED--}</div>';
                                                        }
                                                } else {
                                                        // Extension is not installed
-                                                       $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n";
+                                                       $OUT .= '<div class="admin_failed medium">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>';
                                                }
                                                break;
 
@@ -380,12 +383,12 @@ LIMIT 1",
 
                                        default: // Unknown task type
                                                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
-                                               $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n";
+                                               $OUT .= '<div class="admin_failed medium">' . sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id) . '</div>';
                                                break;
                                }
-                               $OUT .= "  </td>
-  <td width=\"1%\" class=\"switch_sw".$SW." bottom right\">&nbsp;</td>
-</tr>\n";
+                               $OUT .= '
+  </td>
+</tr>';
                        } // END - if
 
                        // Free result
@@ -409,7 +412,7 @@ LIMIT 1",
                        } elseif (isset($postData['del'])) {
                                // Delete tasks
                                foreach ($postData['sel'] as $id => $sel) {
-                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND assigned_admin IN (%s,0) LIMIT 1",
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `assigned_admin` IN (%s,0) LIMIT 1",
                                                array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                                }
                        } else {
@@ -447,7 +450,7 @@ LIMIT 1",
                                // Member found otherwise it's a system task
                                $content['userid'] = generateUserProfileLink($content['userid']);
                        } else {
-                               $content['userid'] = "<em>{--ADMIN_IS_SYSTEM_TASK--}</em>";
+                               $content['userid'] = '<em>{--ADMIN_IS_SYSTEM_TASK--}</em>';
                        }
 
                        // Prepare content
index a86d41efedd51e055656d6f4c302813c7511d9e7..069632197f7e325df8b59939f2aec550be93d710 100644 (file)
@@ -88,7 +88,7 @@ if (getRequestElement('userid') == 'all') {
                // Selected user does exist
                $content = getUserDataArray();
 
-               if ((isFormSent()) && (isPostRequestElementSet(('points')))) {
+               if ((isFormSent()) && (isPostRequestElementSet('points'))) {
                        // Add points and send an email to him...
                        addPointsDirectly('admin_single', bigintval(getRequestElement('userid')), bigintval(postRequestElement('points')));
 
@@ -105,7 +105,7 @@ if (getRequestElement('userid') == 'all') {
                        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
                } else {
                        // Prepare content
-                       $content['user']   = "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>";
+                       $content['user']   = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
                        $content['userid'] = bigintval(getRequestElement('userid'));
 
                        // Output template
@@ -113,7 +113,7 @@ if (getRequestElement('userid') == 'all') {
                }
        } else {
                // User not found!
-               loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
        }
 } else {
        // Output selection form with all confirmed user accounts listed
index 56e36a0db72e136f163f7666183bb4fe4bf97e23..de04b2d671ef3fb6ff4d376f34f6df33afff93cd 100644 (file)
@@ -157,7 +157,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
 `action`='%s',
 `what`='%s',
 `descr`='%s'
-WHERE ".$AND." AND id=%s LIMIT 1",
+WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(
                                $menu,
                                postRequestElement('sel_action', $sel),
@@ -213,9 +213,9 @@ WHERE ".$AND." AND id=%s LIMIT 1",
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__);
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__);
                }
        }
@@ -247,13 +247,13 @@ WHERE ".$AND." AND id=%s LIMIT 1",
                        $data['navi'] = '';
                        if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
                                // Is highest position
-                               $data['navi'] = "<a href=\"{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']+1) . "&amp;fid=" . $data['sort'] . "%}\">{--LOWER--}</a>";
+                               $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        } elseif ($cnt == $max) {
                                // Is lowest position
-                               $data['navi'] = "<a href=\"{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']-1) . "&amp;fid=" . $data['sort'] . "%}\">{--HIGHER--}</a>";
+                               $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
                        } elseif ($data['sort'] > 0) {
                                // Anything else between highest and lowest
-                               $data['navi'] = "<a href=\"{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']-1) . "&amp;fid=" . $data['sort'] . "%}\">{--HIGHER--}</a>/<a href=\"{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']+1) . "&amp;fid=" . $data['sort'] . "%}\">{--LOWER--}</a>";
+                               $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>/<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        }
 
                        // Fix empty elements for constant (fixes display bugs in Firefox)
index cb1b68f6120448dfcc2b3fb16757fe409b5e8d76..1875df63d5cfc62b9b2772023169ea1361c1a57c 100644 (file)
@@ -67,7 +67,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'gender'      => translateGender($content['gender']),
                        'surname'     => $content['surname'],
                        'family'      => $content['family'],
-                       'email'       => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>",
+                       'email'       => '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['email'] . '</a>',
                        'remote_addr' => $content['REMOTE_ADDR'],
                        'refid'       => $content['refid'],
                        'user_hash'   => $content['user_hash'],
index 5b5d0156a89968336c630ee03384b76f94933109..96b8cfd3e2f7a977d054333052dc2d5e58cd6130 100644 (file)
@@ -102,7 +102,7 @@ if (isPostRequestElementSet('add')) {
                        } // END - switch
                } else {
                        // Entry not saved
-                       $TEXT .= sprintf(getMessage('CATEGORY_NOT_SAVED'), $id);
+                       $TEXT .= getMaskedMessage('CATEGORY_NOT_SAVED', $id);
                }
        } // END - foreach
 
index 05c5f930346ac02b251ee2ae8a610daf370ac829..91d31bc0bd5e26d6be7405aacea91b8b8e627300 100644 (file)
@@ -55,7 +55,7 @@ switch ($sub) {
                        adminSaveSettingsFromPostData();
 
                        // Display continue link
-                       loadTemplate('admin_settings_saved', false, "<a href=\"{%url=modules.php?module=admin&amp;what=config_home&amp;sub=settings%}\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>");
+                       loadTemplate('admin_settings_saved', false, '<a href="{%url=modules.php?module=admin&amp;what=config_home&amp;sub=settings%}">{--ADMIN_CONTINUE_TO_CONFIG--}</a>');
                } else {
                        // Prepare data for the template
                        $content = array_fill(-1, 60, '');
@@ -88,13 +88,13 @@ ORDER BY `sort` ASC", __FILE__, __LINE__);
                // Process all entries
                while ($content = SQL_FETCHARRAY($result)) {
                        // Link for setting 'what' as new "home"
-                       $newHomeLink = "<a href=\"{%url=modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=" . $content['what'] . "%}\">{--_IS_NEW_HOME--}</a>";
+                       $newHomeLink = '<a href="{%url=modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=' . $content['what'] . '%}">{--_IS_NEW_HOME--}</a>';
 
                        // Is this current home?
                        if ($content['what'] == getConfig('index_home')) {
                                // Is current home
-                               $newHomeLink      = "<div class=\"admin_mark\">{--_IS_CURRENT_HOME--}</div>";
-                               $content['title'] = "<div class=\"admin_mark\">" . $content['title'] . "</div>";
+                               $newHomeLink      = '<div class="admin_mark">{--_IS_CURRENT_HOME--}</div>';
+                               $content['title'] = '<div class="admin_mark">' . $content['title'] . '</div>';
                        } // END - if
 
                        // Prepare content
index d2605ecc0ccfc68b6cf9b3634683aa59be654daf..fe79655097f2b6ebd68097b9359664a025001502 100644 (file)
@@ -53,26 +53,31 @@ if (isPostRequestElementSet('edit')) {
                // Edit selected modules
                foreach (postRequestElement('sel') as $id => $sel) {
                        // Load module data
-                       $result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($id)), __FILE__, __LINE__);
-                       list($mod, $title, $locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
+                       // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function
+                       $result = SQL_QUERY_ESC("SELECT `module`, `title`, `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1",
+                               array(bigintval($id)), __FILE__, __LINE__);
+
+                       // Load data
+                       $data = SQL_FETCHARRAY($result);
+
+                       // Free result
                        SQL_FREERESULT($result);
 
                        // Prepare array for the template
                        $content = array(
                                'sw'     => $SW,
-                               'mod'    => $mod,
+                               'mod'    => $data['module'],
                                'id'     => $id,
-                               'title'  => $title,
-                               'locked' => addSelectionBox('yn', $locked, 'locked', $id),
-                               'hidden' => addSelectionBox('yn', $hidden, 'hidden', $id),
-                               'admin'  => addSelectionBox('yn', $admin , 'admin' , $id),
-                               'mem'    => addSelectionBox('yn', $mem   , 'member', $id),
+                               'title'  => $data['title'],
+                               'locked' => addSelectionBox('yn', $data['locked']    , 'locked', $id),
+                               'hidden' => addSelectionBox('yn', $data['hidden']    , 'hidden', $id),
+                               'admin'  => addSelectionBox('yn', $data['admin_only'], 'admin' , $id),
+                               'mem'    => addSelectionBox('yn', $data['mem_only']  , 'member', $id),
                        );
 
                        // Load row template
                        $OUT .= loadTemplate('admin_mods_edit_row', true, $content);
-               }
+               } // END - foreach
 
                // Load main template
                loadTemplate('admin_mods_edit', false, $OUT);
index 5f8cef97471c46d5b6fef0f46fe8b56580fc27be..b75664a70102dbb7c926ba4c66ca662126cce992 100644 (file)
@@ -75,7 +75,7 @@ VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')",
                SQL_FREERESULT($result);
 
                // Does already exist
-               $message = "<div class=\"admin_failed\">{--ADMIN_PAYOUT_TYPE_ALREADY--}</div>";
+               $message = '<div class="admin_failed">{--ADMIN_PAYOUT_TYPE_ALREADY--}</div>';
        }
 }
 
@@ -224,7 +224,7 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
                // Load row template and switch color
                $OUT .= loadTemplate('admin_config_payouts_row', true, $content);
                $SW = 3 - $SW;
-       }
+       } // END - while
 
        // Free memory
        SQL_FREERESULT($result_type);
@@ -236,7 +236,7 @@ if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
 // Does your members request payouts?
 if ((SQL_NUMROWS($result_mem) > 0) && ($display)) {
        // Members has requested payouts
-       loadTemplate('admin_settings_saved', false, "<a href=\"{%url=modules.php?module=admin&amp;what=list_payouts%}\">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a></P>");
+       loadTemplate('admin_settings_saved', false, '<a href="{%url=modules.php?module=admin&amp;what=list_payouts%}">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a>');
 } elseif ($display) {
        // No member requests so far
        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS'));
index d2d36055e7ff346c00c9473bda1b28554e68dd42..fa48e37790ac32a46d893636d6d138919a4e3a6c 100644 (file)
@@ -39,7 +39,7 @@
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAdmin())) {
        die();
-}
+} // END - if
 
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
@@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__);
 if (isGetRequestElementSet('rallye')) {
        // Price submitted?
        if (isPostRequestElementSet('add')) {
-               if ((isPostRequestElementSet(('level'))) && ((isPostRequestElementSet(('points'))) || (isPostRequestElementSet(('info'))))) {
+               if ((isPostRequestElementSet(('level'))) && ((isPostRequestElementSet('points')) || (isPostRequestElementSet(('info'))))) {
                        // Submitted data is valid, but maybe we already have this price level?
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
                        array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__);
@@ -77,8 +77,8 @@ VALUES ('%s','%s','%s','%s')",
                        // Delete selected entries
                        foreach (postRequestElement('sel') as $id => $sel) {
                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
-                       }
+                                       array(bigintval($id)), __FILE__, __LINE__);
+                       } // END - foreach
 
                        // Output message
                        loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_DELETED'));
@@ -140,7 +140,7 @@ LIMIT 1",
                                // Load row template and switch color
                                $OUT .= loadTemplate('admin_config_rallye_edit_row', true, $content);
                                $SW = 3 - $SW;
-                       }
+                       } // END - foreach
                        $content['rows'] = $OUT;
 
                        // Prepare data for the main template
@@ -150,7 +150,7 @@ LIMIT 1",
                        loadTemplate('admin_config_rallye_edit', false, $content);
                } else {
                        // Nothing selected
-                       $content = sprintf(getMessage('RALLYE_NO_PRICES_SELECTED'), "<a href=\"{%url=modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=".getRequestElement('rallye')."%}\">", "</a>");
+                       $content = '{--RALLYE_NO_PRICES_SELECTED_1--}<a href="{%url=modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=' . getRequestElement('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}');
                        loadTemplate('admin_settings_saved', false, $content);
                }
        } elseif (isPostRequestElementSet('del')) {
@@ -179,7 +179,7 @@ LIMIT 1",
                                // Load row template and switch color
                                $OUT .= loadTemplate('admin_config_rallye_del_row', true, $content);
                                $SW = 3 - $SW;
-                       }
+                       } // END - foreach
                        $content['rows'] = $OUT;
 
                        // Prepare data for the main template
@@ -189,7 +189,7 @@ LIMIT 1",
                        loadTemplate('admin_config_rallye_del', false, $content);
                } else {
                        // Nothing selected
-                       $content = "{--RALLYE_NO_PRICES_SELECTED_1--}<a href=\"{%url=modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=".getRequestElement('rallye')."%}\">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}";
+                       $content = '{--RALLYE_NO_PRICES_SELECTED_1--}<a href="{%url=modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=' . getRequestElement('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}';
                        loadTemplate('admin_settings_saved', false, $content);
                }
        } else {
@@ -230,13 +230,13 @@ LIMIT 1",
 
                        // Load main template
                        loadTemplate('admin_config_rallye_prices', false, $content);
-               }
+               } // END - if
        }
 
        // Add form for adding new price level
        if (!isPostRequestElementSet('edit')) {
                loadTemplate('admin_add_rallye_prices', false, getRequestElement('rallye'));
-       }
+       } // END - if
 } else {
        // No rallye selected so display all available without prices
        $result = SQL_QUERY("SELECT
@@ -268,7 +268,7 @@ ORDER BY
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_list_rallye_prices_row', true, $content);
                        $SW = 3 - $SW;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
index 8a624faec50da212f601ac268175de4198459857..cc6a5e6760eca1abd19075711bae832c4f68a287 100644 (file)
@@ -117,12 +117,12 @@ LIMIT 1",
                                        // Output message
                                        if (getConfig('repay_deleted_mails') == 'REPAY') {
                                                // Repayed
-                                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
+                                               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_REPAYED',
                                                        translateComma($totalPoints)
                                                ));
                                        } else {
                                                // To jackpot
-                                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
+                                               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_TO_JACKPOT',
                                                        translateComma($totalPoints)
                                                ));
                                        }
@@ -132,7 +132,7 @@ LIMIT 1",
                                }
                        } else {
                                // Points shredded!
-                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_SHREDDED'), $totalPoints));
+                               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_POINTS_SHREDDED', translateComma($totalPoints)));
                        }
 
                        // Remove links from DB
@@ -141,7 +141,7 @@ LIMIT 1",
                        $cnt += SQL_AFFECTEDROWS();
 
                        // Load template for link
-                       loadTemplate('admin_settings_saved', false, "<a href=\"{%url=modules.php?module=admin&amp;what=del_email&amp;pid=" . bigintval(getRequestElement('mid')) . "%}\">{--ADMIN_REMOVE_STATS_ENTRY--}</a>");
+                       loadTemplate('admin_settings_saved', false, '<a href="{%url=modules.php?module=admin&amp;what=del_email&amp;pid=' . bigintval(getRequestElement('mid')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
                } // END - if
 
                // Free the result
@@ -153,7 +153,7 @@ LIMIT 1",
                $cnt += SQL_AFFECTEDROWS();
 
                // Output link for manually removing stats entry
-               outputHtml(sprintf(getMessage('ADMIN_DELETED_MAILS_COUNT'), $cnt));
+               outputHtml(getMaskedMessage('ADMIN_DELETED_MAILS_COUNT', $cnt));
        } else {
                // Mail already deleted!
                loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NORMAL_MAIL_ALREADY_DELETED'));
@@ -173,7 +173,7 @@ LIMIT 1",
        // Delete mail only once
        if (SQL_NUMROWS($result) == 1) {
                // Load data
-               list($id, $subject, $url, $timestamp, $sent) = SQL_FETCHROW($result);
+               $content = SQL_FETCHARRAY($result);
 
                // Reset sent mails for recipient(s)
                reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $sent);
@@ -190,10 +190,8 @@ LIMIT 1",
                $cnt += SQL_AFFECTEDROWS();
 
                // Prepare data for the template
-               $content['id']        = $id;
-               $content['subject']   = $subject;
-               $content['url']       = generateDerefererUrl($url);
-               $content['timestamp'] = generateDateTime($timestamp, 0);
+               $content['url']       = generateDerefererUrl($content['url']);
+               $content['timestamp'] = generateDateTime($content['timestamp'], 0);
                $content['cnt']       = $cnt;
 
                // Load template
@@ -213,7 +211,7 @@ LIMIT 1",
        // Delete mail only once
        if (SQL_NUMROWS($result) == 1) {
                // Load data
-               list ($id, $subject, $url, $timestamp) = SQL_FETCHROW($result);
+               $content = SQL_FETCHARRAY($result);
 
                // Init counter for deleted mails
                $cnt = '0';
@@ -227,10 +225,8 @@ LIMIT 1",
                $cnt += SQL_AFFECTEDROWS();
 
                // Prepare data for the template
-               $content['id']        = $id;
-               $content['subject']   = $subject;
-               $content['url']       = generateDerefererUrl($url);
-               $content['timestamp'] = generateDateTime($timestamp, 0);
+               $content['url']       = generateDerefererUrl($content['url']);
+               $content['timestamp'] = generateDateTime($content['timestamp'], 0);
                $content['cnt']       = $cnt;
 
                // Load template
index e0bfa4f348cb44bdd4df703a225cd42ef4924f95..9669af599cc814ecf761a7bc3b1ab16bb8449fa8 100644 (file)
@@ -90,7 +90,7 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
                        $cnt++;
                }
        }
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('HOLIDAY_ADMIN_MULTI_DEL', $cnt));
 } elseif (isGetRequestElementSet('userid')) {
        // Set default message
        $message = getMessage('HOLIDAY_ADMIN_SINGLE_404');
index 4a5c93c7557a89aeed3b4e79b367b3f47725b775..504c395577a24dca95808ec010388ef4b47ff78f 100644 (file)
@@ -71,7 +71,7 @@ if (isGetRequestElementSet('id')) {
                                array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
 
                        // Output message
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(getRequestElement('id'))));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_DELETED', bigintval(getRequestElement('id'))));
                } elseif (isPostRequestElementSet('no')) {
                        // Do not delete him...
                        redirectToUrl('modules.php?module=admin&amp;what=list_sponsor&amp;id='.bigintval(getRequestElement('id')));
@@ -88,7 +88,7 @@ if (isGetRequestElementSet('id')) {
                }
        } else {
                // Sponsor not found!
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id'))));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id'))));
        }
 
        // Free result
index d67a7bc278c01bb7b42749fcfa2de4ad4aa4d0b9..e752aae9f3b2a84b7b460f35f644421a9aef72b8 100644 (file)
@@ -109,7 +109,8 @@ $content['total'] = translateComma($total);
 $content['title'] = getMessage('TRANSFER_LIST_ALL');
 
 // Show delete button here
-$content['delete'] = "<input type=\"reset\" class=\"admin_reset\" value=\"{--UNDO_SELECTIONS--}\" />&nbsp;*&nbsp;<input type=\"submit\" name=\"del\" class=\"admin_delete\" value=\"{--TRANSFER_DELETE--}\" />";
+$content['delete'] = '<input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+<input type="submit" name="del" class="admin_delete" value="{--TRANSFER_DELETE--}" />';
 
 // Load final template
 loadTemplate('admin_list_transfer', false, $content);
index 092bd1f4b92db0126681d4347a9691e9829605f4..c455bbaed2336a7c4d9f4fc1e92a963240f03b15 100644 (file)
@@ -55,7 +55,7 @@ if ((isFormSent()) || ((isPostRequestElementSet('del')) && (isPostRequestElement
                loadTemplate('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED'));
        } else {
                // Account does not exists!
-               loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
        }
 } elseif (isPostRequestElementSet('no')) {
        // Do not delete him...
@@ -71,8 +71,8 @@ if ((isFormSent()) || ((isPostRequestElementSet('del')) && (isPostRequestElement
                        'email'   => generateEmailLink(getUserData('email'), 'user_data'),
                        'surname' => getUserData('surname'),
                        'family'  => getUserData('family'),
-                       'header'  => sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), getRequestElement('userid')),
-                       'text'    => sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), getRequestElement('userid')),
+                       'header'  => getMaskedMessage('ADMIN_HEADER_DEL_ACCOUNT', getRequestElement('userid')),
+                       'text'    => getMaskedMessage('ADMIN_TEXT_DEL_ACCOUNT', getRequestElement('userid')),
                        'userid'  => getRequestElement('userid')
                );
 
@@ -80,7 +80,7 @@ if ((isFormSent()) || ((isPostRequestElementSet('del')) && (isPostRequestElement
                loadTemplate('admin_del_user', false, $content);
        } else {
                // Account does not exists!
-               loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
        }
 }
 
index dece00741f06498382f7fa96499c37571fe045e2..c45ffdef0edf2fb003ec0c6f616f8d129239ae8d 100644 (file)
@@ -160,7 +160,7 @@ LIMIT 1",
 
                                default: // Unknown mode
                                        logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('mode')));
-                                       $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), getRequestElement('mode'));
+                                       $message = getMaskedMessage('ADMIN_SPONSOR_INVALID_MODE', getRequestElement('mode'));
                                        break;
                        }
 
@@ -170,17 +170,17 @@ LIMIT 1",
                        } // END - if
                } elseif (isFileReadable(sprintf("%stemplates/%s/html/admin/%s.tpl", getConfig('PATH'), getLanguage(), $TPL))) {
                        // Create mailto link
-                       $content['contact'] = "<a href=\"" . generateEmailLink($content['email'], 'sponsor_data') . "\">" . $content['surname'] . " " . $content['family'] . "</a>";
+                       $content['contact'] = '<a href="' . generateEmailLink($content['email'], 'sponsor_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
 
                        // Load mode template
                        loadTemplate($TPL);
                } else {
                        // Template not found!
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_MODUS_TPL_404'), getRequestElement('mode')));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestElement('mode')));
                }
        } else {
                // Sponsor not found!
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id'))));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id'))));
        }
 
        // Free result
index 6b1e9e0a98a1e4853b90319eba56573c352d2c5c..fa9f1b17004809b2a1ae37789ea64fadf9b8651e 100644 (file)
@@ -84,17 +84,21 @@ if ((SQL_NUMROWS($result_main) == 1) || (!isGetRequestElementSet('userid'))) {
 
                if ($updateUser === true) {
                        // We have to add the following things: birthday and max receive mails
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET
-`gender`='%s',
-`surname`='%s',
-`family`='%s',
-`street_nr`='%s',
-`country`='%s',
-`zip`=%s,
-`city`='%s',
-`email`='%s'
-".$add."
-WHERE `userid`=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `gender`='%s',
+       `surname`='%s',
+       `family`='%s',
+       `street_nr`='%s',
+       `country`='%s',
+       `zip`=%s,
+       `city`='%s',
+       `email`='%s'
+       ".$add."
+WHERE
+       `userid`=%s
+LIMIT 1",
                        array(
                                substr(postRequestElement('gender'), 0, 1),
                                postRequestElement('surname'),
@@ -131,7 +135,7 @@ WHERE `userid`=%s LIMIT 1",
        }
 } else {
        // Account does not exists!
-       loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+       loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
 }
 
 // Free the result
index 629cd10d5cf267703cbf53d6638f22919d8d86ca..e85fcc78a15fedd392cd2c135907dacbc6799fb3 100644 (file)
@@ -57,7 +57,7 @@ if (isGetRequestElementSet('reg_ext')) {
                // Shall we keep the extension always active?
                if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)] == 'Y') && ($active == 'Y')) {
                        // Keep this extension active!
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE'), getExtensionName($ext_id)));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($ext_id)));
                } else {
                        // De/activate extension
                        $ACT = 'N'; setExtensionMode('deactivate');
@@ -69,9 +69,9 @@ if (isGetRequestElementSet('reg_ext')) {
                        doExtensionSqls($ext_id, getExtensionMode());
                }
        }
-} elseif (((isPostRequestElementSet('edit')) || (isPostRequestElementSet(('modify')))) && (countPostSelection() > 0) && (!isDemoModeActive())) {
+} elseif (((isPostRequestElementSet('edit')) || (isPostRequestElementSet('modify'))) && (countPostSelection() > 0) && (!isDemoModeActive())) {
        // Change settings like CSS file load
-       if (isPostRequestElementSet(('modify'))) {
+       if (isPostRequestElementSet('modify')) {
                // Change entries
                $cache_update = '0';
                foreach (postRequestElement('sel') as $ext_id => $sel) {
@@ -222,7 +222,7 @@ if (isGetRequestElementSet('reg_ext')) {
        } // END - foreach
 
        // Extensions removed
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSIONS_REMOVED'), countPostSelection()));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSIONS_REMOVED', countPostSelection()));
 } elseif ((isGetRequestElementSet('do')) && (!isDemoModeActive())) {
        // Other things to do
        $do = SQL_ESCAPE(secureString(getRequestElement('do')));
@@ -324,7 +324,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__);
                                                // Errors?
                                                if (getTotalFatalErrors() == '0') {
                                                        // Extension was found and successfully registered
-                                                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_REGISTERED'), $ext_name));
+                                                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTERED', $ext_name));
 
                                                        // Show next link
                                                        if (isExtensionActive('task')) {
@@ -340,7 +340,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__);
                                                        }
                                                } else {
                                                        // Errors detected!
-                                                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_NOT_REGISTERED'), $ext_name));
+                                                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_NOT_REGISTERED', $ext_name));
                                                }
 
                                                // Do we need to update cache file?
@@ -356,7 +356,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__);
                                                loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY'));
                                        } else {
                                                // Notify the admin that we have a problem here...
-                                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
+                                               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_REG_FAILED_404', $ext_name));
                                        }
                                } else {
                                        // Motify the admin that we have a problem here...
index 31ded218675816a38082ed6d61533ef638e2a12a..3e21f3e3ccf7e6929eff4b81b68c29bd2525083b 100644 (file)
@@ -150,7 +150,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
                                $sel = bigintval($sel);
 
                                // Update entry
-                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                        array($menu, postRequestElement('sel_action', $sel), postRequestElement('sel_what', $sel), $sel),__FILE__, __LINE__);
                        } // END - foreach
                        loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
@@ -159,7 +159,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
                case 'del': // Delete menu
                        foreach (postRequestElement('sel') as $sel => $menu) {
                                // Delete enty
-                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
                                        array(bigintval($sel)), __FILE__, __LINE__);
                        } // END - foreach
                        loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
@@ -171,7 +171,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
                                $sel = bigintval($sel);
 
                                // Update entry
-                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                        array(postRequestElement('visible', $sel), postRequestElement('locked', $sel), $sel), __FILE__, __LINE__);
                        } // END - foreach
                        loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
@@ -286,13 +286,13 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
                        $cnt++;
                        if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
                                // Is highest position
-                               $NAVI = "<a href=\"{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']+1) . "&amp;fid=" . $data['sort'] . "%}\">{--LOWER--}</a>";
+                               $NAVI = '<a href="{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        } elseif ($cnt == $max) {
                                // Is lowest position
-                               $NAVI = "<a href=\"{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']-1) . "&amp;fid=" . $data['sort'] . "%}\">{--HIGHER--}</a>";
+                               $NAVI = '<a href="{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
                        } elseif ($data['sort'] > 0) {
                                // Anything else between highest and lowest
-                               $NAVI = "<a href=\"{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']-1) . "&amp;fid=" . $data['sort'] . "%}\">{--HIGHER--}</a>/<a href=\"{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']+1) . "&amp;fid=" . $data['sort'] . "%}\">{--LOWER--}</a>";
+                               $NAVI = '<a href="{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>/<a href=\"{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        }
 
                        if (empty($data['action'])) $data['action'] = '&nbsp;';
index 35464730ed0d920611c01a4563e4661d76a029f4..14e42f36cc13ce6d4acf4dce31b80a2df30b37a8 100644 (file)
@@ -88,7 +88,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'gender'      => translateGender($content['gender']),
                        'surname'     => $content['surname'],
                        'family'      => $content['family'],
-                       'email'       => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['email']."</a>",
+                       'email'       => '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['email'] . '</a>',
                        'joined'      => generateDateTime($content['joined'], 2),
                        'last_online' => generateDateTime($content['last_online'], 2),
                        'notified'    => generateDateTime($content['ap_notified'], 2),
index 51657ac194f1600809c70817477e95bf4b9aaa05..323813c05a8efe9ade3d13a56a131049127e7483 100644 (file)
@@ -112,14 +112,14 @@ ORDER BY beg_points DESC, last_online DESC, userid",
                        $content['withdraw_form'] = loadTemplate('admin_list_beg_form', true);
                } else {
                        // Display message "no manual withdraw possible"
-                       $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, "<div class=\"admin_failed\">{--ADMIN_BEG_ALREADY_WITHDRAW--}</div>");
+                       $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, '<div class="admin_failed">{--ADMIN_BEG_ALREADY_WITHDRAW--}</div>');
                }
 
                // Prepare constant for timemark
                if (isExtensionActive('autopurge')) {
                        $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), 2);
                } else {
-                       $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
+                       $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'autopurge'));
                }
 
                // Load final template
index b50b650a79f9f76e2921bfe852c821f2d8629ade..ec1055e32d75316284315ec11b27d8f22dd11379 100644 (file)
@@ -123,14 +123,14 @@ ORDER BY `points` DESC, `last_online` DESC, `userid` ASC",
                        $content['withdraw_form'] = loadTemplate('admin_list_bonus_form', true);
                } else {
                        // Display message "no manual withdraw possible"
-                       $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, "<div class=\"admin_failed\">{--ADMIN_BONUS_ALREADY_WITHDRAW--}</div>");
+                       $content['withdraw_form'] = loadTemplate('admin_settings_saved', true, '<div class="admin_failed">{--ADMIN_BONUS_ALREADY_WITHDRAW--}</div>');
                }
 
                // Prepare constant for timemark
                if (isExtensionActive('autopurge')) {
                        $content['autopurge_timeout'] = generateDateTime(time() - getConfig('ap_inactive_since'), 2);
                } else {
-                       $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
+                       $content['autopurge_timeout'] = loadTemplate('admin_settings_saved', true, getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'autopurge'));
                }
 
                // Load final template
index 308ed2f32b3deb8ef81b65c493c0a75ac41b8398..8b668b6ad04dcdd967b2c65a9a42b035bf2700a8 100644 (file)
@@ -52,10 +52,10 @@ if (isGetRequestElementSet('userid')) {
                $content = getUserDataArray();
 
                // Prepare constants
-               // @TODO No longer needed? define('__CATS_BASE'   , "<a href=\"{%url=modules.php?module=admin&amp;userid=");
+               // @TODO No longer needed? define('__CATS_BASE'   , '<a href="{%url=modules.php?module=admin&amp;userid=');
                $content['userid']       = bigintval(getRequestElement('userid'));
                $content['member_links'] = generateMemberAdminActionLinks($content['userid']);
-               $content['email']        = "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>";
+               $content['email']        = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
 
                // Ok, list categories of this user
                $result_cats = SQL_QUERY("SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats` ORDER BY `sort` ASC", __FILE__, __LINE__);
@@ -96,7 +96,7 @@ if (isGetRequestElementSet('userid')) {
                }
        } else {
                // User not found
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), $content['userid']));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', $content['userid']));
        }
 } else {
        // Output selection form with all confirmed user accounts listed
index cc60003eaa6127f3bd418f9e83213e2ad82ac528..58cf490974f204bb1bdf9a83735135c1fb5b1483 100644 (file)
@@ -59,13 +59,13 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && (
                ), __FILE__, __LINE__);
 
                // Country added
-               $message = sprintf(getMessage('ADMIN_COUNTRY_ADDED'), strtoupper(postRequestElement('descr')));
+               $message = getMaskedMessage('ADMIN_COUNTRY_ADDED', strtoupper(postRequestElement('descr')));
        } else {
                // Free memory
                SQL_FREERESULT($result);
 
                // Does already exist
-               $message = sprintf(getMessage('ADMIN_COUNTRY_ALREADY'), strtoupper(postRequestElement('code')));
+               $message = getMaskedMessage('ADMIN_COUNTRY_ALREADY', strtoupper(postRequestElement('code')));
        }
 
        // Display message
@@ -148,7 +148,7 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && (
 } else {
        // Shall we modify / remove entries now?
        $message = ''; initSqls();
-       if ((isPostRequestElementSet(('modify'))) && (isPostRequestElementSet('id'))) {
+       if ((isPostRequestElementSet('modify')) && (isPostRequestElementSet('id'))) {
                // Modify
                foreach (postRequestElement('id') as $id => $sel) {
                        addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='".postRequestElement('code', $id)."', `descr`='".postRequestElement('descr', $id)."', `is_active`='".postRequestElement('is_active', $id)."' WHERE `id`='".$id."' LIMIT 1");
index ecd2457b4720fdbfdd8f0b68b0a64e83d1e3324a..b70e3aca81656f6249112157e7533fc413e8a531 100644 (file)
@@ -75,7 +75,7 @@ switch (getRequestElement('mode')) {
                if ($cnt > 0) {
                        // Something was payed out
                        $sumAlready += $cnt;
-                       $content['already_direct_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=direct%}\">".$cnt."</a>";
+                       $content['already_direct_link'] = '<a href="{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=direct%}">' . $cnt . '</a>';
                } // END - if
 
                $cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='Y'");
@@ -83,7 +83,7 @@ switch (getRequestElement('mode')) {
                if ($cnt > 0) {
                        // Something was payed out
                        $sumAlready += $cnt;
-                       $content['already_ref_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=ref%}\">".$cnt."</a>";
+                       $content['already_ref_link'] = '<a href="{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=ref%}">' . $cnt . '</a>';
                } // END - if
 
                // And the same for waiting pouts (direct and referal)
@@ -92,7 +92,7 @@ switch (getRequestElement('mode')) {
                if ($cnt > 0) {
                        // Something was payed out
                        $sumWaiting += $cnt;
-                       $content['waiting_direct_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=direct%}\">".$cnt."</a>";
+                       $content['waiting_direct_link'] = '<a href="{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=direct%}">' . $cnt . '</a>';
                } // END - if
 
                $cnt = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='Y'");
@@ -100,12 +100,12 @@ switch (getRequestElement('mode')) {
                if ($cnt > 0) {
                        // Something was payed out
                        $sumWaiting += $cnt;
-                       $content['waiting_ref_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=ref%}\">".$cnt."</a>";
+                       $content['waiting_ref_link'] = '<a href="{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=ref%}">' . $cnt . '</a>';
                } // END - if
 
                // Links for all
-               $content['already_all_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=all%}\">".$sumAlready."</a>";
-               $content['waiting_all_link'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=all%}\">".$sumWaiting."</a>";
+               $content['already_all_link'] = '<a href="{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=all%}">' . $sumAlready . '</a>';
+               $content['waiting_all_link'] = '<a href="{%url=modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=all%}">' . $sumWaiting . '</a>';
 
                // All data is loaded here...
                break;
index 69c19b7ae209d42fd12a7d455f99cf4d727609ed..19468dcf54c5bb18d47bfec5ada733a3eec5d590 100644 (file)
@@ -100,14 +100,14 @@ if (isGetRequestElementSet('userid')) {
                                                        $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp_ordered` AS `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
                                                                array(bigintval($id)), __FILE__, __LINE__);
                                                        $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
-                                                       $LINK = "<a href=\"{%url=mailid.php?userid=".getRequestElement('userid')."&amp;mailid=".$id."%}\" target=\"_blank\">".$id."</a>";
+                                                       $LINK = '<a href="{%url=mailid.php?userid=' . getRequestElement('userid') . '&amp;mailid=' . $id . '%}" target="_blank">' . $id . '</a>';
                                                        break;
 
                                                case 'BONUS':
                                                        $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
                                                                array(bigintval($id2)), __FILE__, __LINE__);
                                                        $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
-                                                       $LINK = "<a href=\"{%url=mailid.php?userid=".getRequestElement('userid')."&amp;bonusid=".$id2."%}\" target=\"_blank\">".$id2."</a>";
+                                                       $LINK = '<a href="{%url=mailid.php?userid=' . getRequestElement('userid') . '&amp;bonusid=' . $id2 . '%}" target="_blank">' . $id2 . '</a>';
                                                        break;
 
                                                default: // Problem in application detected!
@@ -156,7 +156,7 @@ if (isGetRequestElementSet('userid')) {
                                // Remember list in constant for the template
                                $content['surname'] = getUserData('surname');
                                $content['family']  = getUserData('family');
-                               $content['email']   = "<a href=\"" . generateEmailLink(getUserData('email'), 'user_data') . "\">".getUserData('email')."</a>";
+                               $content['email']   = '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . getUserData('email') . '</a>';
                                $content['rows']    = $OUT;
                                $content['nums']    = $nums;
                                $content['userid']  = bigintval(getRequestElement('userid'));
@@ -166,11 +166,11 @@ if (isGetRequestElementSet('userid')) {
                        }
                } else {
                        // No mails left to confirm
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_LINKS'), getRequestElement('userid')));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_LINKS', getRequestElement('userid')));
                }
        } else {
                // User not found
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')));
        }
 } else {
        // Output selection form with all confirmed user accounts listed
index 41daad94639679d84718774046ca5e6653beda3c..4917d692a37b8c0e5cdfe1b13b5bc143c0b7a765 100644 (file)
@@ -44,6 +44,12 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
+// These are expert settings!
+if (doVerifyExpertSettings() != 'agreed') {
+       // Abort here
+       return;
+} // END - if
+
 // Handle form here
 doNetworkHandleForm();
 
@@ -80,7 +86,7 @@ ORDER BY
                loadTemplate('admin_list_network_types', false, $OUT);
        } else {
                // No entries found
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_TYPES_404'), $networkData['network_title']));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_404', $networkData['network_title']));
        }
 
        // Free result
index 83f30c853c79dcb3a33b5b44ee36ba8d343eef21..f10de48b859813581b3d6378e56f7e5c945b54ae 100644 (file)
@@ -44,12 +44,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-// By default we should display list/add new forms
-$GLOBALS['network_display'] = true;
+// These are expert settings!
+if (doVerifyExpertSettings() != 'agreed') {
+       // Abort here
+       return;
+} // END - if
 
 // Handle form here
 doNetworkHandleForm();
 
+// By default we should display list/add new forms
+$GLOBALS['network_display'] = true;
+
 // Display forms?
 if ($GLOBALS['network_display'] === false) {
        // Abort here
index 1f6fd0dc0c9652a18672c5155d3506bbd3a339dd..2c6d17113b6b410afebf57aeb98390ba5832596a 100644 (file)
@@ -64,7 +64,7 @@ ORDER BY timestamp DESC";
        $result_max = SQL_QUERY($SQL2, __FILE__, __LINE__);
 } else {
        // Bonus extension required!
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED'), 'bonus'));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED', 'bonus'));
 }
 
 // Create limitation line
index 1e53c99604eea6429eb41a2248702682ad6100c1..2ae26ae9ca5d9528c1e8c2dbb6a551f6756ef3ce 100644 (file)
@@ -155,14 +155,14 @@ LIMIT 1",
                                        }
                                } else {
                                        // Cannot load payout id
-                                       loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">{--PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>");
+                                       loadTemplate('admin_settings_saved', false, '<div class="admin_failed">{--PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>');
                                }
                        } else {
                                // Prepare content
                                $content = array(
                                        'task' => $task,
                                        'pid'  => bigintval(getRequestElement('pid')),
-                                       'user' => "<a href=\"".generateEmailLink(getUserData('email'), 'user_data')."\">".translateGender(getUserData('gender'))." ".getUserData('surname')." ".getUserData('family')."</a>",
+                                       'user' => '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . translateGender(getUserData('gender')) . ' ' . getUserData('surname') . ' ' . getUserData('family') . '</a>',
                                );
 
                                // Load template
@@ -193,7 +193,7 @@ LIMIT 1",
                                $content = array(
                                        'task' => $task,
                                        'pid'  => bigintval(getRequestElement('pid')),
-                                       'user' => "<a href=\"".generateEmailLink(getUserData('email'), 'user_data')."\">".translateGender(getUserData('gender'))." ".getUserData('surname')." ".getUserData('family')."</a>",
+                                       'user' => '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . translateGender(getUserData('gender')) . ' ' . getUserData('surname') . ' ' . getUserData('family') . '</a>',
                                );
 
                                // Load template
@@ -234,11 +234,11 @@ ORDER BY
                while ($content = SQL_FETCHARRAY($result)) {
                        if ($content['status'] == 'NEW') {
                                // Generate links for direct accepting and rejecting
-                               $content['status'] = "<a href=\"{%url=modules.php?module=admin&amp;what=list_payouts&amp;do=accept&amp;pid=" . $content['id'] . "%}\">{--PAYOUT_ACCEPT_PAYOUT--}</a>&nbsp;|&nbsp;<a href=\"{%url=modules.php?module=admin&amp;what=list_payouts&amp;do=reject&amp;pid=" . $content['id'] . "%}\">{--PAYOUT_REJECT_PAYOUT--}</a>";
+                               $content['status'] = '<a href="{%url=modules.php?module=admin&amp;what=list_payouts&amp;do=accept&amp;pid=' . $content['id'] . '%}">{--PAYOUT_ACCEPT_PAYOUT--}</a>&nbsp;|&nbsp;<a href="{%url=modules.php?module=admin&amp;what=list_payouts&amp;do=reject&amp;pid=' . $content['id'] . '%}">{--PAYOUT_REJECT_PAYOUT--}</a>';
                        } else {
                                // Translate status
                                $content['status'] = getMessage('PAYOUT_STATUS_'.strtoupper($content['status']).'');
-                               $content['status'] = "<div class=\"admin_failed\">".$content['status']."</div>";
+                               $content['status'] = '<div class="admin_failed">' . $content['status'] . '</div>';
                        }
 
                        // Nothing entered must be secured in member/what-payputs.php !
@@ -253,7 +253,7 @@ ORDER BY
                                }
 
                                // Admins can addionally test the URL for framekillers
-                               $content['target_bank'] = "<a href=\"".generateFrametesterUrl($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
+                               $content['target_bank'] = '<a href="' . generateFrametesterUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
                        } else {
                                // e-currency payout request
                                if (empty($content['target_account'])) $content['target_account'] = '---';
@@ -274,7 +274,7 @@ ORDER BY
                        // Add row and switch color
                        $OUT .= loadTemplate('admin_list_payouts_row', true, $content);
                        $SW = 3 - $SW;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
index f495c7a778fa366f9f821872ac19f50335a43574..4ebd29f3bf7c27f0e429581353a0ca7c71131bb2 100644 (file)
@@ -306,7 +306,7 @@ ORDER BY
                        // Did some users joined this rallye?
                        if ($joined > 0) {
                                // List joined users
-                               $joined = "<a href=\"{%url=modules.php?module=admin&amp;what=list_rallyes&amp;sub=users&amp;rallye=" . $data['id'] . "%}\" title=\"{--RALLYE_LIST_USERS_TITLE--}\">".$joined."</a>";
+                               $joined = '<a href="{%url=modules.php?module=admin&amp;what=list_rallyes&amp;sub=users&amp;rallye=' . $data['id'] . '%}" title="{--RALLYE_LIST_USERS_TITLE--}">' . $joined . '</a>';
                        } // END - if
 
                        // Alter some variables
@@ -316,7 +316,7 @@ ORDER BY
 
                        // Transfer data into array for the template
                        $row = array(
-                               'select'     => "<input type=\"checkbox\" name=\"sel[".$data['id']."]\" class=\"admin_normal\" value=\"1\" />",
+                               'select'     => '<input type="checkbox" name="sel[' . $data['id'] . ']" class="admin_normal" value="1" />',
                                'admin_id'   => $data['admin_id'],
                                'admin_link' => generateAdminLink($data['admin_id']),
                                'login'      => $data['login'],
@@ -341,7 +341,7 @@ ORDER BY
                        switch ($data['is_active']) {
                                case 'Y':
                                        // Rallye is active so do not edit it!
-                                       $row['select'] = "<div class=\"big\">".$row['id']."</div>";
+                                       $row['select'] = '<div class="big">' . $row['id'] . '</div>';
                                        $row['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
                                        $row['active'] = '0';
                                        break;
index 9cb5f68824873efc1bf6020fa267d29068c15f3d..8dd04d8a509aa2130d5e861291b8604c11e976bb 100644 (file)
@@ -59,7 +59,7 @@ if (isGetRequestElementSet('userid')) {
                $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'");
 
                // Output info message
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestElement('userid')), $menge, $menge_lck));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_USER_TOTAL_REFS', generateUserProfileLink(getRequestElement('userid')), $menge, $menge_lck));
 
                // Load all referal levels
                $result_levels = SQL_QUERY("SELECT
@@ -93,7 +93,7 @@ ORDER BY
                                                $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'");
 
                                                // Output info message
-                                               $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), $menge, $menge_lck);
+                                               $levels['info'] = getMaskedMessage('ADMIN_USER_TOTAL_REFS', generateUserProfileLink($userid), $menge, $menge_lck);
 
                                                // Init variables
                                                $OUT_REFS = ''; $SW = 2;
@@ -136,7 +136,7 @@ ORDER BY
                                                } // END - while
                                        } else {
                                                // Output info message
-                                               $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), 0, 0);
+                                               $levels['info'] = getMaskedMessage('ADMIN_USER_TOTAL_REFS', generateUserProfileLink($userid), 0, 0);
 
                                                // No refs found
                                                $levels['rows'] = loadTemplate('admin_list_refs_norefs', true, array('userid' => $userid));
@@ -199,7 +199,7 @@ ORDER BY
                SQL_FREERESULT($result_levels);
        } else {
                // User not found
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')));
        }
 } else {
        // Output selection form with all confirmed user accounts listed
index a6e2d3cdecf7033150da3f199e7c0a37733eacc0..726a7f9c6d0f75e2d27162e0d661bafe254796f5 100644 (file)
@@ -95,7 +95,7 @@ WHERE `id`='%s' LIMIT 1",
                loadTemplate('admin_list_sponsor_details', false, $content);
        } else {
                // Sponsor not found
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), getRequestElement('id')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', getRequestElement('id')));
        }
 } elseif (isGetRequestElementSet('rid')) {
        // Search for sponsor
@@ -124,11 +124,11 @@ ORDER BY
                        SQL_FREERESULT($result);
                } else {
                        // No refs made so far
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_REFS_404'), "<a href=\"{%url=modules.php?module=admin&amp;what=list_sponsor&amp;id=" . bigintval(getRequestElement('rid')) . "%}\">" . bigintval(getRequestElement('rid')) . "</a>"));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&amp;what=list_sponsor&amp;id=' . bigintval(getRequestElement('rid')) . '%}">' . bigintval(getRequestElement('rid')) . '</a>'));
                }
        } else {
                // Sponsor not found
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('rid'))));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('rid'))));
        }
 } else {
        // List all sponsors
index 66474e60a8e2e469219f4fcbe3d98bc5cc0a4979..b6cd58aa7a1cf0c74fe63d84b6fdea24d0857425 100644 (file)
@@ -125,13 +125,13 @@ if (isPostRequestElementSet('add')) {
                        ), __FILE__, __LINE__);
 
                // Payment type added!
-               $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ADDED'), postRequestElement('pay_name'));
+               $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ADDED', postRequestElement('pay_name'));
        } else {
                // Free memory
                SQL_FREERESULT($result);
 
                // Entry does already exists
-               $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY'), postRequestElement('pay_name'));
+               $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY', postRequestElement('pay_name'));
        }
 
        // Output message
index d34b7ef5fdbc7b554b825ecac411d89fd33cffd9..c734d3882b917eefe4cfb8f4466b15d21c2d98d7 100644 (file)
@@ -54,7 +54,7 @@ if (isGetRequestElementSet('id')) {
                SQL_FREERESULT($result);
        } else {
                // Sponsor not found!
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id'))));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id'))));
        }
 } else {
        // Not called by what-list_sponsor.php
index 2452427e2f6c03fc6b5cd1f60bf2640da1770c0d..1d085886b8f58e6b4312d5e53e2b55c663bc643b 100644 (file)
@@ -79,7 +79,7 @@ switch (getRequestElement('type')) {
 
        default: // Unknown type
                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestElement('type')));
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), getRequestElement('type')));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_TASK_UNKNOWN_MODE', getRequestElement('type')));
                break;
 } // END - switch
 
index a331e22230506b05a6648d85e00c757e6f8c34d3..bc1611bd4ce5dd7bc81d271fc66ca8b2de2de5d9 100644 (file)
@@ -133,14 +133,14 @@ WHERE
                                        'userid' => $content['userid'],
                                        'link'   => $LINK,
                                        'id'     => $ID,
-                                       'email'  => "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender'])." ".$content['surname']." ".$content['family']."</a>",
+                                       'email'  => '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . translateGender($content['gender']) . ' ' . $content['surname'] . ' ' . $content['family'] . '</a>',
                                        'status' => translateUserStatus($content['status']),
                                );
 
                                // Load row template and switch colors
                                $OUT .= loadTemplate('admin_list_unconfirmed_row', true, $content);
                                $SW = 3 - $SW;
-                       }
+                       } // END - while
 
                        // Render it in our new listing
                        $OUT = loadTemplate('admin_list_unconfirmed_list', true, $OUT);
@@ -174,10 +174,10 @@ WHERE
 
                if (SQL_NUMROWS($result1) == 1) {
                        // pool table
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_POOL_MISSING'), $ID));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNCONFIRMED_POOL_MISSING', $ID));
                } elseif (SQL_NUMROWS($result2) == 1) {
                        // user_stats table
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_STATS_MISSING'), $ID));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNCONFIRMED_STATS_MISSING', $ID));
                } else {
                        // both or link is invalid
                        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
index 680c7593c919063e4d0999aded6fa990c60feecd..5c3c32052cc521dad17393c14b79deb8f7969fb6 100644 (file)
@@ -197,7 +197,7 @@ LIMIT 1",
                loadTemplate('admin_user_details', false, $content);
        } else {
                // Account does not exist!
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), $userid));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', $userid));
        }
 
        // Free the result
index 0db31303338aa17a4ba41ed963f34f6015ab62b1..c01d2ac69ea2137ec1e53eb484a3af97ce748498 100644 (file)
@@ -121,7 +121,7 @@ foreach ($result as $entry) {
                        } // END - if
 
                        // Add reload lock
-                       $entry['already'] = sprintf(getMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN'), createFancyTime($countdown));
+                       $entry['already'] = getMaskedMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', createFancyTime($countdown));
                } else {
                        // Never resentable unless manual removal
                        $entry['already'] = getMessage('ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED');
index 784c9cc8d945bbb439519aa91f960966b903cf85..85ed036d3ccfe13f3bc1eef6a22b2b179710156e 100644 (file)
@@ -109,7 +109,7 @@ if (isGetRequestElementSet('id')) {
                }
        } else {
                // Sponsor not found!
-               $message = sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(getRequestElement('id')));
+               $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id')));
        }
 
        // Free result
index 6aeae8ae2bac53b9ce259cf40cde1725e7a179fe..7d0068360b343bb6922774075d5d9bdd56936aa2 100644 (file)
@@ -74,7 +74,7 @@ if (isGetRequestElementSet('userid')) {
                        } // END - if
 
                        // Prepare message
-                       $message = sprintf(getMessage('USER_ACCOUNT_LOCKED'), getRequestElement('userid'));
+                       $message = getMaskedMessage('USER_ACCOUNT_LOCKED', getRequestElement('userid'));
                        $ACT = true;
                } elseif ((isPostRequestElementSet('unlock')) && (getUserData('status') == 'LOCKED')) {
                        // Ok, unlock the account!
@@ -109,7 +109,7 @@ LIMIT 1",
                        } // END - if
 
                        // Prepare message
-                       $message = sprintf(getMessage('USER_ACCOUNT_UNLOCKED'), getRequestElement('userid'));
+                       $message = getMaskedMessage('USER_ACCOUNT_UNLOCKED', getRequestElement('userid'));
                        $ACT = true;
                } elseif (isPostRequestElementSet('del')) {
                        // Delete the account
@@ -132,20 +132,20 @@ LIMIT 1",
                                switch ($content['status']) {
                                        case 'CONFIRMED': // Yes, lock him down... ;-)
                                                $content['ok']     = 'lock';
-                                               $content['header'] = sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), $content['userid']);
-                                               $content['text']   = sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), $content['userid']);
+                                               $content['header'] = getMaskedMessage('ADMIN_HEADER_LOCK_ACCOUNT', $content['userid']);
+                                               $content['text']   = getMaskedMessage('ADMIN_TEXT_LOCK_ACCOUNT', $content['userid']);
                                                break;
 
                                        case 'LOCKED': // Unlock the user
                                                $content['ok']     = 'unlock';
-                                               $content['header'] = sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), $content['userid']);
-                                               $content['text']   = sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), $content['userid']);
+                                               $content['header'] = getMaskedMessage('ADMIN_HEADER_UNLOCK_ACCOUNT', $content['userid']);
+                                               $content['text']   = getMaskedMessage('ADMIN_TEXT_UNLOCK_ACCOUNT', $content['userid']);
                                                break;
 
                                        case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked!
                                                $content['ok'] = 'del';
-                                               $content['header'] = sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), $content['userid']);
-                                               $content['text']   = sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), $content['userid']);
+                                               $content['header'] = getMaskedMessage('ADMIN_HEADER_DEL_ACCOUNT', $content['userid']);
+                                               $content['text']   = getMaskedMessage('ADMIN_TEXT_DEL_ACCOUNT', $content['userid']);
                                                break;
                                }
 
@@ -156,7 +156,7 @@ LIMIT 1",
                                loadTemplate('admin_lock_user', false, $content);
                        } else {
                                // Account does not exists!
-                               loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
                        }
                }
 
@@ -167,14 +167,14 @@ LIMIT 1",
                } elseif ($ACT) {
                        // An action was performed...
                        if (!empty($message)) {
-                               loadTemplate('admin_settings_saved', false, "<div class=\"admin_green\">".$message."</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . $message . '</div>');
                        } else {
-                               loadTemplate('admin_settings_saved', false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMessage('ADMIN_USER_UPDATED') . '</div>');
                        }
                }
        } else {
                // Account does not exists!
-               loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
        }
 } else {
        // List all users
index f87ef5042bb4079315336e82b525323d5b3bdd19..b4e22c82340c6de86eea4b4dc00be395e281e6d1 100644 (file)
@@ -75,7 +75,7 @@ if (isGetRequestElementSet('access')) {
                        outputHtml($OUTPUT);
 
                        // Output message
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT'), $access));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT', $access));
                        return;
                }
 
@@ -84,7 +84,7 @@ if (isGetRequestElementSet('access')) {
                shutdown();
        } else {
                // Not readable!
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('LOGFILE_NOT_READABLE'), $access));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('LOGFILE_NOT_READABLE', $access));
        }
 } else {
        // Is the directory there?
@@ -108,7 +108,7 @@ if (isGetRequestElementSet('access')) {
                outputHtml('</ol>');
        } else {
                // logs directory does not exist
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_LOGS_DIR_404'), getConfig('logs_base')));
+               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_LOGS_DIR_404'));
        }
 }
 
index 3ea041bc31f2756e290475506b863a6ecb15e02c..e47bea61681ba0a5efbb8c9a00b2d854777ae181 100644 (file)
@@ -233,12 +233,12 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__);
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__);
                } // END - -fi
-       }
+       } // END - if
 
        if (!empty($SUB)) {
                // Edit sub menus
@@ -263,13 +263,13 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
                        $cnt++;
                        if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
                                // Is highest position
-                               $data['navi'] = "<a href=\"{%url=modules.php?module=admin&amp;what=memedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=".($data['sort']+1)."&amp;fid=" . $data['sort'] . "%}\">{--LOWER--}</a>";
+                               $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        } elseif ($cnt == $max) {
                                // Is lowest position
-                               $data['navi'] = "<a href=\"{%url=modules.php?module=admin&amp;what=memedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=".($data['sort']-1)."&amp;fid=" . $data['sort'] . "%}\">{--HIGHER--}</a>";
+                               $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>';
                        } elseif ($data['sort'] > 0) {
                                // Anything else between highest and lowest
-                               $data['navi'] = "<a href=\"{%url=modules.php?module=admin&amp;what=memedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=".($data['sort']-1)."&amp;fid=" . $data['sort'] . "%}\">{--HIGHER--}</a>/<a href=\"{%url=modules.php?module=admin&amp;what=memedit&amp;sub=" . $content['sub'] . "&amp;act=" . $data['action'] . "&amp;w=" . $data['what'] . "&amp;tid=" . ($data['sort']+1) . "&amp;fid=" . $data['sort'] . "%}\">{--LOWER--}</a>";
+                               $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>/<a href="{%url=modules.php?module=admin&amp;what=memedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        }
 
                        // Fix empty values for Firefox
@@ -284,7 +284,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM
                        // Load row template and switch color
                        $OUT .= loadTemplate('admin_menu_overview_row', true, $data);
                        $SW = 3 - $SW;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
index fe87639e61422245eb43800afbc41afaf97e6dd6..4a464836a0c6431fa4d50aa00841b4f9e2e4445b 100644 (file)
@@ -71,7 +71,7 @@ if (getAction() == 'login') {
 // Are we in 'welcome' page and are there jobs to be done?
 if (!ifAdminMenuHasEntries(getAction())) {
        // This menu is empty and so no content is displayed
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), getAction()));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MENU_IS_EMPTY', getAction()));
 } elseif ($jobsDone === true) {
        // Generate overview of all main menus
        if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) {
@@ -93,7 +93,7 @@ if (!ifAdminMenuHasEntries(getAction())) {
 } elseif ($taskExt === false) {
        if (isExtensionActive('task')) {
                // Output warning message
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('EXTENSION_WARNING_EXT_INACTIVE'), 'task'));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('EXTENSION_WARNING_EXT_INACTIVE', 'task'));
        }
 
        // List selected tasks on overview when task management is not active
index 5851c89949489dfbb634d82b2b2842bfea6e78f4..127976023f34409f2fee3c0f1a862e7234ebaeec 100644 (file)
@@ -83,7 +83,7 @@ foreach ($ACTIONS as $action) {
 
 // Repair finished
 if ($REP > 0) {
-       $message = sprintf(getMessage('ADMIN_REPAIR_ENTRIES_FIXED'), $REP);
+       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REP);
 } else {
        $message = getMessage('ADMIN_REPAIR_NOTHING_FIXED');
 }
index 75877ffb890c4290a9fcfa9b77c40b98138bb24c..4535a12fcd34d2948780a9e21bcc8a90860f25d9 100644 (file)
@@ -66,14 +66,14 @@ if (SQL_NUMROWS($result) > 0) {
 
        if ($REMOVED > 0) {
                // Entries repaired
-               $content = sprintf(getMessage('ADMIN_REPAIR_ENTRIES_FIXED'), $REMOVED);
+               $content = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REMOVED);
        } else {
                // Nothing repaired
-               $content = "<div class=\"admin_failed\">{--ADMIN_REPAIR_NOTHING_FIXED--}</div>";
+               $content = '<div class="admin_failed">{--ADMIN_REPAIR_NOTHING_FIXED--}</div>';
        }
 } else {
        // No category selections found, no members registered?
-       $content = "<div class=\'admin_failed\">{--ADMIN_REPAIR_CATS_NOTHING--}</div>";
+       $content = '<div class="admin_failed">{--ADMIN_REPAIR_CATS_NOTHING--}</div>';
 }
 
 // Load template
index ba12064c5ad7228f9f8aad027917eb4502f3ba60..ec446f9d8e8e1db0dc89e4ac1d5d2ac906e93d36 100644 (file)
@@ -81,7 +81,7 @@ foreach ($ACTIONS as $action) {
 
 // Repair finished
 if ($REP > 0) {
-       $message = sprintf(getMessage('ADMIN_REPAIR_ENTRIES_FIXED'), $REP);
+       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REP);
 } else {
        $message = getMessage('ADMIN_REPAIR_NOTHING_FIXED');
 }
index c471fe5e96508102603d8564f9b376c75c2d7f6f..cae307e4a2ba737dbd889b5b613530b3fae93138 100644 (file)
@@ -83,7 +83,7 @@ foreach ($ACTIONS as $action) {
 
 // Repair finished
 if ($REP > 0) {
-       $message = sprintf(getMessage('ADMIN_REPAIR_ENTRIES_FIXED'), $REP);
+       $message = getMaskedMessage('ADMIN_REPAIR_ENTRIES_FIXED', $REP);
 } else {
        $message = getMessage('ADMIN_REPAIR_NOTHING_FIXED');
 }
index 38845b30c1737250ca1bc6945ede087c9b4c75fe..813cf06a9252ad8bbd0b139ad2cf1b0c0a18b906 100644 (file)
@@ -80,7 +80,7 @@ if (getRequestElement('userid') == 'all') {
                // Selected user does exist
                $content = getUserDataArray();
 
-               if ((isFormSent()) && (isPostRequestElementSet(('points')))) {
+               if ((isFormSent()) && (isPostRequestElementSet('points'))) {
                        // Ok, add to used points and send an email to him...
                        subtractPoints('admin_single', bigintval(getRequestElement('userid')), postRequestElement('points'));
 
@@ -96,7 +96,7 @@ if (getRequestElement('userid') == 'all') {
                        loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_SUBTRACTED'));
                } else {
                        // Prepare content
-                       $content['user']   = "<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".$content['surname']." ".$content['family']."</a>";
+                       $content['user']   = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
                        $content['userid'] = bigintval(getRequestElement('userid'));
 
                        // Load form
@@ -104,7 +104,7 @@ if (getRequestElement('userid') == 'all') {
                }
        } else {
                // User not found!
-               loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
        }
 } else {
        // Output selection form with all confirmed user accounts listed
index 9e4ae15dc37d0d37340ecf96036f90bb681b509c..df950f622f59c2e8b6fc237c4166a7ea394bafd8 100644 (file)
@@ -124,7 +124,7 @@ if (SQL_NUMROWS($result) > 0) {
 
                // Is the loaded theme name != current theme name?
                $LINK = $content['theme_path'];
-               if ($content['theme_path'] != getCurrentTheme()) $LINK = "<a href=\"{%url=modules.php?module=admin&amp;what=theme_edit&amp;default_theme=".$content['theme_path']."%}\" title=\"{--ADMIN_SET_AS_NEW_THEME--}\">".$content['theme_path']."</a>";
+               if ($content['theme_path'] != getCurrentTheme()) $LINK = '<a href="{%url=modules.php?module=admin&amp;what=theme_edit&amp;default_theme=' . $content['theme_path'] . '%}" title="{--ADMIN_SET_AS_NEW_THEME--}">' . $content['theme_path'] . '</a>';
 
                // Prepare data for the row template
                $content = array(
@@ -134,7 +134,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'link'      => $LINK,
                        'name'      => $content['theme_name'],
                        'is_act'    => translateYesNo($content['theme_active']),
-                       'email'     => "<a href=\"mailto:".$GLOBALS['theme_data']['email']."?Subject=[Theme:] ".$GLOBALS['theme_data']['name']." (".$content['theme_path'].")'.'\">".$GLOBALS['theme_data']['author']."</a>",
+                       'email'     => '<a href="mailto:' . $GLOBALS['theme_data']['email'] . '?Subject=[Theme:] ' . $GLOBALS['theme_data']['name'] . ' (' . $content['theme_path'] . ')\>' . $GLOBALS['theme_data']['author'] . '</a>',
                        'url_link'  => generateDerefererUrl($GLOBALS['theme_data']['url']),
                        'url_title' => $GLOBALS['theme_data']['url'],
                        'ver'       => $content['theme_ver'],
index f0ce2817cf4e141072914e34c9af1b17c67f90f4..0e91fc4cf76706253e1c342fc67639700d8fc1a1 100644 (file)
@@ -77,14 +77,14 @@ VALUES ('%s','N','%s','%s')",
                        rebuildCacheFile('themes', 'them');
 
                        // Prepare message
-                       $message = sprintf(getMessage('ADMIN_THEME_IMPORTED'), postRequestElement('theme'));
+                       $message = getMaskedMessage('ADMIN_THEME_IMPORTED', postRequestElement('theme'));
                } else {
                        // Include file not found!
-                       $message = sprintf(getMessage('ADMIN_THEME_INC_404'), postRequestElement('theme'));
+                       $message = getMaskedMessage('ADMIN_THEME_INC_404', postRequestElement('theme'));
                }
        } else {
                // Theme already imported
-               $message = sprintf(getMessage('ADMIN_THEME_ALREADY_INSTALLED'), postRequestElement('theme'));
+               $message = getMaskedMessage('ADMIN_THEME_ALREADY_INSTALLED', postRequestElement('theme'));
        }
 
        // Output message
@@ -128,7 +128,7 @@ array_pk_sort($THEMES, array('theme_name'));
 $OUT = ''; $SW = 2;
 foreach ($THEMES['theme_unix'] as $key => $unix) {
        // Already installed is default
-       $formContent = '<div class="admin_note">' . sprintf(getMessage('ADMIN_THEME_ALREADY_INSTALLED'), $unix) . '</div>';
+       $formContent = '<div class="admin_note">' . getMaskedMessage('ADMIN_THEME_ALREADY_INSTALLED', $unix) . '</div>';
 
        // Check if current theme is already imported or not
        if (!ifThemeExists($unix)) {
index e66a2211af825141166301fb672ca3276d037ff1..c78f24e4ad0b20d9dbd2d3da63247f2aa22d4e47 100644 (file)
@@ -91,7 +91,7 @@ ORDER BY sp.pay_name",
                                                // Transfer data to array
                                                $data = array(
                                                        'admin_id'   => $content['email'],
-                                                       'order' => ($content['pay_count'] * $content['pay_rate'])." ".$content['pay_currency'],
+                                                       'order' => ($content['pay_count'] * $content['pay_rate']) . ' ' . $content['pay_currency'],
                                                        'stamp' => generateDateTime($content['pay_ordered'], 2),
                                                        'pname' => $content['pay_name'],
                                                );
index 672750b50da98f8402aef2cc81ab2343f1dbf5b0..54f27bc8476f386a1a6e974b4665d7621f856085 100644 (file)
@@ -89,7 +89,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
 // Is a newer version available?
 if (empty($ONLINE['version'])) {
        // Disconnected?
-       loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>");
+       loadTemplate('admin_settings_saved', false, '<div class="admin_failed">{--ADMIN_CANNOT_CHECK_VERSION--} (' . $ONLINE['code'] . ')</div>');
 } elseif (($ONLINE['version'] != getConfig('FULL_VERSION')) || ($ONLINE['revision'] != getConfig('CURR_SVN_REVISION'))) {
        // New full-version available (all previous released patches are included in this version!)
        $ONLINE['changed'] = generateDateTime($ONLINE['changed'], 2);
index b46ea6d63804e3964d5a0d49d57b98180b54da3f..95bcbdf1837f449e8c6220e64d13e4a98532ad7b 100644 (file)
@@ -107,8 +107,8 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) {
        outputHtml($content);
 } else {
        // Nothing to load, then we have no directory 'usage'
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base')));
+       loadTemplate('admin_settings_saved', false, getMessage('ADMIN_USAGE_DIRECTORY_404'));
 }
 
-//
+// [EOF]
 ?>
index 5f0260ea7a80a7fe7de98c75bf469d48cd1ba488..51b3000469eb3429e99134e83efa97ed8add7fd2 100644 (file)
@@ -69,7 +69,7 @@ if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')
                }
        } else {
                // Not found?
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('USER_ACCOUNT_404'), bigintval(getRequestElement('userid'))));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('USER_ACCOUNT_404', bigintval(getRequestElement('userid'))));
        }
 } else {
        // Display selection box
index ef9462aac49994f17f3755bc211e44845c1f5606..019b56484207033299c95053e4f29df5c990fa12 100644 (file)
@@ -97,7 +97,7 @@ if (isExtensionActive('online')) {
 
                // Remember rows and fancy time in array
                $content['rows']           = $OUT;
-               $content['online_timeout'] = sprintf(getMessage('ONLINE_TIMEOUT_IS'), createFancyTime(getConfig('online_timeout')));
+               $content['online_timeout'] = getMaskedMessage('ONLINE_TIMEOUT_IS');
 
                // Load footer template
                loadTemplate('admin_list_online', false, $content);
index bfb7430c5e0d17eb20f67200f0bfa9e8d276b0c1..4b711cce8ea600172b07a11801ceafce3d8be9dc 100644 (file)
@@ -58,7 +58,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the guest action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_LOCKED_ACTION'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('GUEST_LOCKED_ACTION', getWhat()));
 }
 
 // [EOF]
index 94904e1be4459483357de4321a660e83b2585e9a..0799b79fa3ee1a732d5f318d969d75aee2194561 100644 (file)
@@ -110,6 +110,12 @@ if (!empty($errorCode)) {
   <td colspan=\"7\" align=\"center\">
     <span class=\"guest_failed\">";
 
+       // Do we have a userid set?
+       if (isSessionVariableSet('current_userid')) {
+               // Then prefetch data for this account
+               fetchUserData(getSession('current_userid'));
+       } // END - if
+
        // Convert the code to message
        $message .= getMessageFromErrorCode($errorCode);
 
index 799414e0b6320cf47be608e0d1378c48e58d13d7..ce0cc7a134996f05b655368b652d3b4e23b48345 100644 (file)
@@ -83,11 +83,11 @@ if (SQL_NUMROWS($result) == 1) {
                // Rallye will expire in less one day!
                $content['extras'] = getMessage('RALLYE_EXPIRE_ONE_DAY');
        } else {
-               $content['extras'] = "<a href=\"{%url=modules.php?module=index&amp;what=register%}\">{--RALLYE_REGISTER_NOW--}</a>";
+               $content['extras'] = '<a href="{%url=modules.php?module=index&amp;what=register%}">{--RALLYE_REGISTER_NOW--}</a>';
        }
 
        // Set admin line (currently set to impressum, later to contact form)
-       // @TODO Reactivate this: $content['admin'] = "<a href=\"{%url=modules.php?module=index&amp;what=impressum&amp;admin=" . $adminId . "%}\">" . $login . "</a>";
+       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $adminId . '%}">' . $login . '</a>';
 
        // Set title
        $content['title'] = $title;
@@ -113,7 +113,7 @@ if (SQL_NUMROWS($result) == 1) {
 
        if ($expired === true) {
                $content['prices']       = addReferalRallyeWinners($id);
-               $content['top_users']    = "<div align=\"center\" class=\"big\">".$content['extras']."</div>";
+               $content['top_users']    = '<div align="center" class="big">' . $content['extras'] . '</div>';
                $content['can_win_this'] = getMessage('RALLYE_OUR_WINNERS_ARE');
        } else {
                $content['prices']       = addReferalRallyePrices($id, 'html');
index ee7f7de2dc73e9cd608e8f74e62910bd9d95c3fe..e740c70ddac685f869fcdc6e90b1682a08624b13 100644 (file)
@@ -411,7 +411,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        } // END - if
 
        if ((!empty($cats)) && ($cats < getConfig('least_cats'))) {
-               registerOutputFailedMessage('', sprintf(getMessage('CATS_LEAST'), getConfig('least_cats')));
+               registerOutputFailedMessage('', getMessage('CATS_LEAST'));
        } // END - if
 
        // Generate birthday selection
index fc1d82f326e1f34072cd98debac81c9eb6d12c7e..715dc6c2c95487515780c6262aa990ad4ac9c67b 100644 (file)
@@ -185,7 +185,7 @@ if (isFormSent()) {
                }
        } elseif (strlen(postRequestElement('pass1')) < getConfig('pass_len')) {
                // Password is to short!
-               $FORM_ERRORS[] = sprintf(getMessage('SPONSOR_PASSWORD_TOO_SHORT'), getConfig('pass_len'));
+               $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORD_TOO_SHORT');
        }
 
        // Check if he has accepted the terms&conditions
@@ -255,7 +255,7 @@ WHERE `id`='%s' LIMIT 1",
                                $message = $messageArray['added'];
                        } else {
                                // Sponsor account not found???
-                               $message = sprintf(getMessage('SPONSOR_EMAIL_404'), postRequestElement('email'));
+                               $message = getMaskedMessage('SPONSOR_EMAIL_404', postRequestElement('email'));
                        }
 
                        // Free memory
@@ -266,10 +266,10 @@ WHERE `id`='%s' LIMIT 1",
                        logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
                        if (!isAdmin()) {
                                // Message for testing admin
-                               $message = sprintf(getMessage('ADMIN_SPONSOR_UNKNOWN_STATUS'), $STATUS);
+                               $message = getMaskedMessage('ADMIN_SPONSOR_UNKNOWN_STATUS', $STATUS);
                        } else {
                                // Message for the guest
-                               $message = sprintf(getMessage('SPONSOR_UNKNOWN_STATUS'), $STATUS);
+                               $message = getMaskedMessage('SPONSOR_UNKNOWN_STATUS', $STATUS);
                        }
                        break;
        }
index dab2afd152c052a8ea9b7c00c503ee136218d678..bd8747aee0e3b5cbb9a72304c0835a1edc700753 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 656354244204a7b5bf815aaaa37ead3e5fbb9785..9dec6b84f1246cd29638f39e4935b3e8e2229cb2 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 3e463b153dd79bf85a51854092ba240be0bd79e4..7b5ab4ca149921261814a5fa3b97ed713f99a453 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 283f054b789eca9e699a29b20cb18849d20a0475..1167acc61a8cb7a862d15a31b25da2f231ac1689 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 395eabcd394c6127c89bd397a8a1239d9fbeb3e3..41b75f3b5e1d87f8a4223f7d4a0395139956df0e 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index d2f234ffd14748b53aa9f8487f37edbd12571f08..cae6e0183815236dd4cdc4ec84e8915f7d8cde89 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 06c51e1dc74a07fa94ec4e0a642c98a99bda9991..deae233e060aa03248f593a7ab7c92067c69b128 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 74b4ba63d5d50795db8667cfabc82f1aa71e63a4..4f627649c94f0b8ce9140e297184119721b23520 100644 (file)
@@ -55,7 +55,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 6eecdc76a83fe34b01a211b91484c09646c6a4f7..12d22019542d9f81f20c573009ec3feb78ac4ebb 100644 (file)
@@ -60,7 +60,7 @@ if (isIncludeReadable($inc)) {
        // Ok, we finally load the member action module
        loadInclude($inc);
 } else {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
+       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('MEMBER_404_WHAT', getWhat()));
 }
 
 // [EOF]
index 89ab90cfc410832208bf3630619f48a6497e7356..228c699b4a89133fcf4d44608e63dfa3491c01b7 100644 (file)
@@ -113,9 +113,9 @@ if ($cats > 0) {
                        loadTemplate('admin_settings_saved', false, getMessage('MEMBER_CATS_NOT_SAVED'));
                }
        } else {
-               if ($LEAST) {
+               if ($LEAST === true) {
                        // Also here we have to secure it... :(
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats')));
+                       loadTemplate('admin_settings_saved', false, getMessage('CATS_LEAST'));
                } // END - if
 
                // Put some data into constants for the template
index 62a2442db86585a054ae8485a82c649adaaa0060..e445def99e2ab9f92f75edb8c1750e57e6a030bd 100644 (file)
@@ -99,7 +99,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) {
                }
 
                // Display message and exit here
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), generateDateTime($stamp, 1)));
+               loadTemplate('admin_settings_saved', false, getMaskedMessage('HOLIDAY_MEMBER_ORDER', generateDateTime($stamp, 1)));
                return;
        }
 } // END - if
index 799efbc9109816279258892fd5ddea69c8425c9a..e88a8f85532dd0ff6746fe30d7ee0f0b7ed75c06 100644 (file)
@@ -77,7 +77,7 @@ switch ($mode) {
                // How far is last change on his profile away from now?
                if ((($content['last_update'] + getConfig('profile_lock')) > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) {
                        // You cannot change your account
-                       $content['change'] = loadTemplate('admin_settings_saved', true, '<div class="member_failed">' . sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($content['last_update'] + getConfig('profile_lock'), 0)) . '</div>');
+                       $content['change'] = loadTemplate('admin_settings_saved', true, '<div class="member_failed">' . getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['last_update'] + getConfig('profile_lock'), 0)) . '</div>');
                } else {
                        // He is allowed to change his profile
                        $content['change'] = loadTemplate('member_mydata_button', true);
@@ -131,7 +131,7 @@ LIMIT 1",
 
                // How far is last change on his profile away from now?
                if (($content['update_check'] > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) {
-                       $content['update_check'] = sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($content['update_check'] + getConfig('profile_lock'), 0));
+                       $content['update_check'] = getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['update_check'] + getConfig('profile_lock'), 0));
 
                        // You cannot change your account
                        loadTemplate('admin_settings_saved', false, $content['update_check']);
@@ -180,7 +180,7 @@ LIMIT 1",
                                $content['country'] = $OUT;
                        } else {
                                // Ouput default input box
-                               $content['country'] = "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$content['country']."\" />";
+                               $content['country'] = '<input type="text" name="cntry" class="member_normal" size="2" maxlength="3" value="' . $content['country'] . '" />';
                        }
 
                        // Load template
@@ -209,10 +209,14 @@ LIMIT 1",
                        $hash = generateHash(postRequestElement('pass1'), substr($content['password'], 0, -40));
                        if ((($hash == $content['password']) || (postRequestElement('pass1') == postRequestElement('pass2'))) && (isPostRequestElementSet('pass1'))) {
                                // Only on simple changes normal mode is active = no email or password changed
-                               $mode = 'normal'; $AND = '';
+                               $mode = 'normal';
+                               $AND = '';
 
                                // Did the user changed the password?
-                               if ($hash != $content['password']) { $AND = ", `password`='".$hash."'"; $mode = 'pass'; }
+                               if ($hash != $content['password']) {
+                                       $AND = ", `password`='" . $hash . "'";
+                                       $mode = 'pass';
+                               } // END - if
 
                                // Or did he changed his password?
                                if (postRequestElement('email') != $content['email']) {
index 659045d8ee0c550f10b861f1611f98c8b90bd5c8..33e0908c40a82c359225e9deec008d1fb994a117 100644 (file)
@@ -87,7 +87,7 @@ if ($isValid === true) {
 } else {
        // Do we have already submit the form?
        if (isPostRequestElementSet('nickname')) {
-               loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--NICKNAME_IS_INVALID--}</div");
+               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--NICKNAME_IS_INVALID--}</div>');
        } // END - if
 
        // Load Template
index e5878cbe086d00d419749b86b44e40be9fbf80cd..31b3327451e880c587e932ce29e6174772e2e583 100644 (file)
@@ -61,15 +61,21 @@ if (isAdmin()) $whereStatement = '';
 $links = countSumTotalData(getMemberId(), 'user_links', 'id', 'userid', true);
 
 // Do we have ext-holiday installed?
-$HOLIDAY = 'serid';
+// @TODO Rewrite this to a filter
+$HOLIDAY = 'userid';
 if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) {
        // Fetch also holiday activation data
        $HOLIDAY = 'holiday_active';
 } // END - if
 
-$result_mmails = SQL_QUERY_ESC("SELECT `userid`, `receive_mails`, `mail_orders`, `".$HOLIDAY."`
-FROM `{?_MYSQL_PREFIX?}_user_data`
-WHERE `userid`=%s AND `max_mails` > 0 LIMIT 1",
+$result_mmails = SQL_QUERY_ESC("SELECT
+       `userid`, `receive_mails`, `mail_orders`, `".$HOLIDAY."`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `userid`=%s AND
+       `max_mails` > 0
+LIMIT 1",
        array(getMemberId()), __FILE__, __LINE__);
 
 $mmails = SQL_NUMROWS($result_mmails);
@@ -552,7 +558,7 @@ LIMIT 1",
 
                                        default: // Unknown/invalid
                                                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
-                                               $content['order_max_full'] = sprintf(getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'), getConfig('order_max_full'));
+                                               $content['order_max_full'] = getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN');
                                                break;
                                } // END - switch
 
@@ -690,7 +696,7 @@ LIMIT 1",
        loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
 } else {
        // Please confirm some mails first
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_LINKS_LEFT'), $links, getConfig('unconfirmed')));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_LINKS_LEFT'), $links);
 }
 
 if (!empty($URL)) {
index 00e3bc455354379624680eb245462575e35646f3..48491080937cda2b89571be3261ba9cf144303f2 100644 (file)
@@ -53,28 +53,8 @@ if ((!isExtensionActive('payout')) && (!isAdmin())) {
        return;
 } // END - if
 
-$result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
-$totalPoints = '0';
-while ($content = SQL_FETCHARRAY($result_depths)) {
-       // Load referal points
-       $result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
-               array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
-
-       // Entry found?
-       if (SQL_NUMROWS($result_points) == 1) {
-               // Load points
-               list($points) = SQL_FETCHROW($result_points);
-
-               // Add them to total
-               $totalPoints += $points;
-       } // END - if
-
-       // Free result
-       SQL_FREERESULT($result_points);
-} // END - while
-
-// Free memory
-SQL_FREERESULT($result_depths);
+// Get total points
+$totalPoints = countSumTotalData(getMemberId(), 'user_points', 'points');
 
 // Get used points
 $usedPoints = countSumTotalData(getMemberId(), 'user_data', 'used_points');
@@ -132,7 +112,7 @@ ORDER BY
                                                // Textlink
                                                $content['target_account'] = $content['alt'];
                                        }
-                                       $content['target_bank'] = "<a href=\"".generateDerefererUrl($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
+                                       $content['target_bank'] = '<a href="' . generateDerefererUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
                                } else {
                                        // e-currency payout request
                                        if (empty($content['target_account'])) $content['target_account'] = '---';
index 523456832fc3e5efd3482c6c84d3b61ec5d588f7..dec329d0e747d7e35614f644d56fc6e20d687d88 100644 (file)
@@ -60,38 +60,56 @@ if (isExtensionInstalledAndNewer('bonus', '0.4.4')) $depths += 4;
 $content['rowspan'] = ($depths*2+15);
 
 // Init some vars...
-$totalPoints = '0'; $TREF = '0'; $TLOCK = '0'; $OUT = '';
+$totalPoints = '0';
+$totalReferals = '0';
+$totalLocked = '0';
+$OUT = '';
 
 // Load ref levels
 while ($data = SQL_FETCHARRAY($result_depths)) {
        // Merge it together
        $content = merge_array($content, $data);
 
-       // Initialize ref-count
-       $REFS = '0';
+       // Initialize array elements
+       $content['counter'] = '0';
+       $content['points'] = '0.00000';
+       $content['locked_points'] = '0.00000';
 
        // Load referal points
-       $result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
+       $result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
+               array(
+                       getMemberId(),
+                       bigintval($content['level'])
+               ), __FILE__, __LINE__);
+
+       // Do we have an entry?
        if (SQL_NUMROWS($result_points) == 1) {
-                       list($points, $locked) = SQL_FETCHROW($result_points);
-               // Also count locked points
-               $totalPoints += $points; $TLOCK += $locked;
-       } else {
-               $points = '0.00000'; $locked = '0.00000';
-       }
+               // Load data
+               $content = merge_array($content, SQL_FETCHARRAY($result_points);
+
+               // Add both points
+               $totalPoints += $content['points'];
+               $totalLocked += $content['locked_points'];
+       } // END - if
 
        // Free result
        SQL_FREERESULT($result_points);
 
        // Load referal counts
        $result_refs = SQL_QUERY_ESC("SELECT `counter` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s AND `level`='%s' LIMIT 1",
-               array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
+               array(
+                       getMemberId(),
+                       bigintval($content['level'])
+               ), __FILE__, __LINE__);
+
+       // Do we have an entry?
        if (SQL_NUMROWS($result_refs) == 1) {
-               list($REFS) = SQL_FETCHROW($result_refs);
-               $TREF += $REFS;
-       } else {
-               $REFS = '0';
-       }
+               // Load data
+               $content = merge_array($content, SQL_FETCHARRAY($result_refs));
+
+               // Add them to total refs
+               $totalReferals += $content['counter'];
+       } // END - if
 
        // Free result
        SQL_FREERESULT($result_refs);
@@ -100,8 +118,8 @@ while ($data = SQL_FETCHARRAY($result_depths)) {
        $row = array(
                'level'    => $content['level'],
                'percents' => translateComma($content['percents']),
-               'points'   => translateComma($points),
-               'refs'     => translateComma($REFS),
+               'points'   => translateComma($content['points']),
+               'refs'     => translateComma($content['counter']),
        );
 
        // Output row
@@ -136,12 +154,12 @@ if (isExtensionInstalledAndNewer('user', '0.1.2')) {
 }
 
 // If TLOCK is 0 add 3 zeros for floating
-if ($TLOCK == '0') $TLOCK = '0.00000';
+if ($totalLocked == '0') $totalLocked = '0.00000';
 
 // Remember several values in constants
 $content['sum']   = translateComma($totalPoints - getUserData('used_points'));
-$content['tref']  = $TREF;
-$content['tlock'] = translateComma($TLOCK);
+$content['tref']  = $totalReferals;
+$content['tlock'] = translateComma($totalLocked);
 
 // Fixes a bug when there is no bonus extension installed
 if (isExtensionInstalledAndOlder('bonus', '0.4.4')) setConfigEntry('bonus_active', "X");
index 63f4d1ec2ce18d860667172d6f808267fa07bcb3..358cbbef6538f2347cf6bd83887e1891fb6b1c58 100644 (file)
@@ -118,7 +118,7 @@ if (getRequestElement('mode') == 'pay') {
        // Is this enougth for a payout?
        if ($points < getConfig('primera_min_payout')) {
                // No, then abort here
-               loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'), translateComma(getConfig('primera_min_payout'))));
+               loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'));
                return;
        }
 
@@ -126,7 +126,7 @@ if (getRequestElement('mode') == 'pay') {
        $content['points'] = $points;
 } else {
        // Invalid mode!
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), getRequestElement('mode')));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_MODE_INVALID', getRequestElement('mode')));
        return;
 }
 
@@ -150,7 +150,7 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                                loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT'));
                        } elseif (postRequestElement('amount') < getConfig('primera_min_payout')) {
                                // Not enougth entered!
-                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout'))));
+                               loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'));
                        } elseif (postRequestElement('amount') > $points) {
                                // Not enougth points left!
                                loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points)));
@@ -182,14 +182,14 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                                        loadTemplate('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE());
                                } else {
                                        // Something went wrong
-                                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_FAILED'), GET_PRIMERA_ERROR_MESSAGE()));
+                                       loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_PAYOUT_FAILED', GET_PRIMERA_ERROR_MESSAGE()));
                                }
                        }
                        break;
 
                default: // Invalid mode!
                        logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode')));
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), getRequestElement('mode')));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_MODE_INVALID', getRequestElement('mode')));
                        return;
        }
 } // END - if
index 3ad801d6d8029428726f964cb9dade1f48c49e54..e5c70a987fa5759af54f0bb043313e62d4845e02 100644 (file)
@@ -83,11 +83,11 @@ if (SQL_NUMROWS($result) == 1) {
                $content['extras'] = getMessage('RALLYE_EXPIRE_ONE_DAY');
        } else {
                // Link to referal links page
-               $content['extras'] = "<a href=\"{%url=modules.php?module=login&amp;what=reflinks%}\">{--RALLYE_GET_REFLINK--}</a>";
+               $content['extras'] = '<a href="{%url=modules.php?module=login&amp;what=reflinks%}">{--RALLYE_GET_REFLINK--}</a>';
        }
 
        // Set admin line (currently set to impressum, later to contact form)
-       // @TODO Reactivate this: $content['admin'] = "<a href=\"{%url=modules.php?module=index&amp;what=impressum&amp;admin=" . $content['admin_id'] . "%}\">" . $content['login'] . "</a>";
+       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
 
        // Handle description...
        if ((empty($content['descr'])) && (!empty($content['template']))) {
@@ -105,7 +105,7 @@ if (SQL_NUMROWS($result) == 1) {
 
        if ($expired === true) {
                $content['prices']       = addReferalRallyeWinners($content['id']);
-               $content['top_users']    = "<div align=\"center\" class=\"big\">".$content['extras']."</div>";
+               $content['top_users']    = '<div align="center" class="big">' . $content['extras'] . '</div>';
                $content['can_win_this'] = getMessage('RALLYE_OUR_WINNERS_ARE');
        } else {
                $content['prices']       = addReferalRallyePrices($content['id'], 'html');
index fb614424d055eb3fb398326abd48d1b3cb8b9213..11f28a843f7a5da7d7d89749366eac565ac51736 100644 (file)
@@ -78,14 +78,14 @@ if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) {
                                loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DONE'));
                        } elseif (isset($status['message'])) {
                                // Something went wrong with error message
-                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message']));
+                               loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_REFBACK_ERROR_MESSAGE', $status['message']));
                        } else {
                                // No message found
                                loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE'));
                        }
                } else {
                        // Percents out-of-bounds ;-)
-                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc')));
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'));
                }
 
                // Insert line
index b228e82dcdbbbcb14959d0461dd528f9b44cba60..d4c987d89f539d7cdcbd89c7fcf9e96fa2589d6d 100644 (file)
@@ -178,27 +178,27 @@ switch ($mode) {
                                loadTemplate('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 === false) {
                                // Invalid Touring code!
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_CODE--}</div>');
                                unsetPostRequestElement('ok');
                        } elseif ($valid_pass === false) {
                                // Wrong password entered
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_PASSWORD--}</div>');
                                unsetPostRequestElement('ok');
                        } elseif ($valid_amount === false) {
                                // Too much points entered
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_POINTS--}</div>');
                                unsetPostRequestElement('ok');
                        } elseif ($valid_reason === false) {
                                // No transfer reason entered
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_REASON--}</div>');
                                unsetPostRequestElement('ok');
                        } elseif ($valid_recipient === false) {
                                // No recipient selected
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_RECIPIENT--}</div>');
                                unsetPostRequestElement('ok');
                        } elseif ($valid_data === false) {
                                // No recipient/sender selected
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_DATA--}</div>');
                                unsetPostRequestElement('ok');
                        }
 
@@ -255,7 +255,7 @@ switch ($mode) {
                                $rand = mt_rand(0, 99999);
                                $code = generateRandomCode(getConfig('transfer_code'), $rand, getMemberId(), $content['max_transferable']);
                                $img = generateImageOrCode($code, false);
-                               $content['captcha_code'] = "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"".$content['to_disabled']." />&nbsp;" . $img;
+                               $content['captcha_code'] = '<input type="hidden" name="code_chk" value="' . $rand . '" /><input type="text" name="code" class="member_normal" size="5" maxlength="7"' . $content['to_disabled'] . ' />&nbsp;' . $img;
                        } else {
                                $code = '00000';
                                $content['captcha_code'] = loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_CODE'));
@@ -455,7 +455,7 @@ KEY (`party_userid`)
                $total = countSumTotalData(getMemberId(), 'user_transfers_in', 'id', 'userid', true);
                $content['in_link'] = $total;
                if ($total > 0) {
-                       $content['in_link'] = "<a href=\"{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_in%}\">" . $total . "</a>";
+                       $content['in_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_in%}">' . $total . '</a>';
                } // END - if
 
                // Check outgoing transfers
@@ -466,13 +466,13 @@ KEY (`party_userid`)
 
                $content['out_link'] = $dmy;
                if ($dmy > 0) {
-                       $content['out_link'] = "<a href=\"{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_out%}\">" . $dmy . "</a>";
+                       $content['out_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_out%}">' . $dmy . '</a>';
                } // END - if
 
                // Total transactions
                $content['all_link'] = $total;
                if ($total > 0) {
-                       $content['all_link'] = "<a href=\"{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_all%}\">" . $total . "</a>";
+                       $content['all_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_all%}">' . $total . '</a>';
                } // END - if
 
                if (isFormSent()) {
@@ -484,7 +484,7 @@ KEY (`party_userid`)
                        getUserData('opt_in') = substr(postRequestElement('opt_in'), 0, 1);
 
                        // "Settings saved..."
-                       loadTemplate('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
+                       loadTemplate('admin_settings_saved', false, '<div class="member_done">{--SETTINGS_SAVED--}</div>');
                } // END - if
 
                // Init entries
@@ -498,7 +498,7 @@ KEY (`party_userid`)
                // Set 'new transfer' link according to above option
                switch (getUserData('opt_in')) {
                        case 'Y':
-                               $content['new_link'] = "<a href=\"{%url=modules.php?module=login&amp;what=transfer&amp;mode=new%}\">{--TRANSFER_NOW_LINK--}</a>";
+                               $content['new_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=new%}" title="{--TRANSFER_NOW_TITLE--}">{--TRANSFER_NOW_LINK--}</a>';
                                break;
 
                        case 'N':
@@ -525,7 +525,7 @@ LIMIT 1",
                if (SQL_NUMROWS($result) == 1) {
                        // Load newest transaction
                        list($newest) = SQL_FETCHROW($result);
-                       $content['settings'] = sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, 3));
+                       $content['settings'] = getMaskedMessage('TRANSFER_LATEST_IS', generateDateTime($newest, 3));
                } else {
                        // Load template
                        $content['settings'] = loadTemplate('member_transfer_settings', true, $content);
index eb3cd2fd4cfb39da59ad45c79046fd8aaa9c94c4..2c0e4331690f076d1897e2346e50702c9e3ebbd2 100644 (file)
@@ -71,7 +71,7 @@ LIMIT 1",
        $content['userid']    = getMemberId();
 
        // Get timestamp from insert
-       $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
+       $content['user_status'] = getMaskedMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON',
                generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), 2)
        );
 
@@ -110,7 +110,7 @@ LIMIT 1",
        $content['userid']    = getMemberId();
 
        // Get timestamp from insert
-       $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
+       $content['user_status'] = getMaskedMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON',
                generateDateTime(getTimestampFromUserStats('mailid', $content['id']), 2)
        );
 
index 657312bd5c62fbc1b7003760dbe83a2b44a27445..4cc84984c0e92d9b38955d18fce99385d3051cf2 100644 (file)
@@ -162,7 +162,7 @@ if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose')
        $content['wernis_userid'] = getUserData('wernis_userid');
 } else {
        // Invalid mode!
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), getRequestElement('mode')));
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_MODE_INVALID', getRequestElement('mode')));
        return;
 }
 
@@ -190,7 +190,7 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                        case 'withdraw': // Widthdraws WDS66 -> This exchange
                                if (postRequestElement('amount') < getConfig('wernis_min_withdraw')) {
                                        // Not enougth entered!
-                                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), translateComma(getConfig('wernis_min_withdraw'))));
+                                       loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_AMOUNT_SMALLER_MIN'));
                                } else {
                                        // All is fine here so do the withdraw
                                        $success = WERNIS_EXECUTE_WITHDRAW(postRequestElement('wernis_userid'), md5(postRequestElement('wds66_password')), postRequestElement('amount'));
@@ -210,7 +210,7 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                                                loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
                                        } else {
                                                // Something went wrong
-                                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
+                                               loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE()));
                                        }
                                }
                                break;
@@ -218,7 +218,7 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                        case 'payout': // Payout this exchange -> WDS66
                                if (postRequestElement('amount') < getConfig('wernis_min_payout')) {
                                        // Not enougth entered!
-                                       loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), translateComma(getConfig('wernis_min_payout'))));
+                                       loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_AMOUNT_SMALLER_MIN'));
                                } elseif (postRequestElement('amount') > $points) {
                                        // Not enougth points left!
                                        loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points)));
@@ -241,14 +241,14 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
                                                loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
                                        } else {
                                                // Something went wrong
-                                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
+                                               loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE()));
                                        }
                                }
                                break;
 
                        default: // Invalid mode!
                                logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode')));
-                               loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), getRequestElement('mode')));
+                               loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_MODE_INVALID', getRequestElement('mode')));
                                return;
                }
        }
index d337eb7479b3f8f0eb9d0f4384e837ed6fc427d8..4e55d6b7179a43db12ee28d0192fe6697b28d93c 100644 (file)
@@ -82,7 +82,7 @@ if (SQL_NUMROWS($result) == 1) {
                                $message = getMessage('SPONSOR_PASSWORD_TWO_EMPTY');
                        } elseif ((isPostRequestElementSet('pass1')) && (strlen(postRequestElement('pass1')) < getConfig('pass_len'))) {
                                // Too short password
-                               $message = sprintf(getMessage('SPONSOR_PASSWORD_TOO_SHORT'), getConfig('pass_len'));
+                               $message = getMessage('SPONSOR_PASSWORD_TOO_SHORT');
                        } else {
                                // Default is we don't want to change password!
                                $PASS_AND = ''; $PASS_DATA = '';
@@ -131,11 +131,11 @@ if (SQL_NUMROWS($result) == 1) {
        } else {
                // Locked or so?
                $STATUS = sponsorTranslateUserStatus($content['status']);
-               $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
+               $OUT = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS));
        }
 } else {
        // Sponsor account not found!
-       $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid')));
+       $OUT = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsorid')));
 }
 
 // Free memory
index bfa3b4647981ba142622f84070b4222d6bca07c6..1620435b8215afe80de1c03a2c5cfdcb7a3f77a4 100644 (file)
@@ -119,11 +119,11 @@ if (SQL_NUMROWS($result) == 1) {
        } else {
                // Locked or so?
                $STATUS = sponsorTranslateUserStatus($content['status']);
-               $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
+               $OUT = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_FAILED', $STATUS));
        }
 } else {
        // Sponsor account not found!
-       $OUT = loadTemplate('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getSession('sponsorid')));
+       $OUT = loadTemplate('admin_settings_saved', true, getMaskedMessage('SPONSOR_ACCOUNT_404', getSession('sponsorid')));
 }
 
 // Free memory
index a4e1a8b739d27abd654419b29cc30cdb932b509f..45d1e87f67648beed2f9f92030aa12aafee867bc 100644 (file)
@@ -102,9 +102,6 @@ if (!isInstalling()) {
                                // Load cache
                                loadIncludeOnce('inc/load_cache.php');
 
-                               // Init filter system
-                               initFilterSystem();
-
                                // Run the init filter chain
                                runFilterChain('init');
 
index 1e1069a6bd8dad8ae35a46d75e500fc7ebe017e7..6d8b3c821ec58092dc016eb9376f0d9a6bc67819 100644 (file)
@@ -42,29 +42,29 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // "Getter" for module title
-function getModuleTitle ($mod) {
+function getModuleTitle ($module) {
        // Init variables
-       $title = '';
+       $data['title'] = '';
        $result = false;
 
        // Is the script installed?
        if (isInstalled()) {
                // Check if cache is valid
-               if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) {
+               if ((isExtensionInstalledAndNewer('cache', '0.1.2')) && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($module, $GLOBALS['cache_array']['modules']['module']))) {
                        // Load from cache
-                       $title = $GLOBALS['cache_array']['modules']['title'][$mod];
+                       $data['title'] = $GLOBALS['cache_array']['modules']['title'][$module];
 
                        // Update cache hits
                        incrementStatsEntry('cache_hits');
                } elseif (!isExtensionActive('cache')) {
                        // Load from database
                        $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1",
-                               array($mod), __FUNCTION__, __LINE__);
+                               array($module), __FUNCTION__, __LINE__);
 
                        // Is the entry there?
                        if (SQL_NUMROWS($result)) {
                                // Get the title from database
-                               list($title) = SQL_FETCHROW($result);
+                               $data = SQL_FETCHARRAY($result);
                        } // END - if
 
                        // Free the result
@@ -73,20 +73,20 @@ function getModuleTitle ($mod) {
        } // END - if
 
        // Trim name
-       $title = trim($title);
+       $data['title'] = trim($data['title']);
 
        // Still no luck or empty title?
-       if (empty($title)) {
+       if (empty($data['title'])) {
                // No name found
-               $title = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $mod);
+               $data['title'] = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $module);
                if (SQL_NUMROWS($result) == '0') {
                        // Add module to database
-                       $dummy = checkModulePermissions($mod);
+                       $dummy = checkModulePermissions($module);
                } // END - if
        } // END - if
 
        // Return name
-       return $title;
+       return $data['title'];
 }
 
 // "Getter" for module description
@@ -98,7 +98,7 @@ function getTitleFromMenu ($mode, $what, $column = 'what', $ADD='') {
        } // END - if
 
        // Default is not found
-       $ret = '??? (' . $what . ')';
+       $data['title'] = '??? (' . $what . ')';
 
        // Look for title
        $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `%s`='%s'" . $ADD . " LIMIT 1",
@@ -111,40 +111,40 @@ function getTitleFromMenu ($mode, $what, $column = 'what', $ADD='') {
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
                // Fetch the title
-               list($ret) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
        } // END - if
 
        // Free result
        SQL_FREERESULT($result);
 
        // Return it
-       return $ret;
+       return $data['title'];
 }
 
 // Check validity of a given module name (no file extension)
-function checkModulePermissions ($mod = '') {
+function checkModulePermissions ($module = '') {
        // Is it empty (default), then take the current one
-       if (empty($mod)) $mod = getModule();
+       if (empty($module)) $module = getModule();
 
        // Do we have cache?
-       if (isset($GLOBALS['module_status'][$mod])) {
+       if (isset($GLOBALS['module_status'][$module])) {
                // Then use it
-               return $GLOBALS['module_status'][$mod];
+               return $GLOBALS['module_status'][$module];
        } // END - if
 
        // Filter module name (names with low chars and underlines are fine!)
-       $mod = preg_replace('/[^a-z_]/', '', $mod);
+       $module = preg_replace('/[^a-z_]/', '', $module);
 
        // Check for prefix is a extension...
-       $modSplit = explode('_', $mod);
-       $extension = ''; $mod_chk = $mod;
-       //* DEBUG: */ print(__LINE__."*".count($modSplit)."*/".$mod."*<br />");
+       $modSplit = explode('_', $module);
+       $extension = ''; $module_chk = $module;
+       //* DEBUG: */ print(__LINE__."*".count($modSplit)."*/".$module."*<br />");
        if (count($modSplit) == 2) {
                // Okay, there is a seperator (_) in the name so is the first part a module?
                //* DEBUG: */ print(__LINE__."*".$modSplit[0]."*<br />");
                if (isExtensionActive($modSplit[0])) {
                        // The prefix is an extension's name, so let's set it
-                       $extension = $modSplit[0]; $mod = $modSplit[1];
+                       $extension = $modSplit[0]; $module = $modSplit[1];
                } // END - if
        } // END - if
 
@@ -157,24 +157,28 @@ function checkModulePermissions ($mod = '') {
                return 'done';
        } // END - if
 
-       // Init variables
-       $locked = 'Y';
-       $hidden = 'N';
-       $admin  = 'N';
-       $mem    = 'N';
+       // Init data array
+       $data = array(
+               'locked'     => 'Y',
+               'hidden'     => 'N',
+               'admin_only' => 'N',
+               'mem_only'   => 'N'
+       );
+
+       // By default nothing is found
        $found  = false;
 
        // Check if cache is latest version
        if (isExtensionInstalledAndNewer('cache', '0.1.2')) {
                // Is the cache there?
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using cache.');
-               if (isset($GLOBALS['cache_array']['modules']['locked'][$mod_chk])) {
+               if (isset($GLOBALS['cache_array']['modules']['locked'][$module_chk])) {
                        // Check cache
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cache found.');
-                       $locked = $GLOBALS['cache_array']['modules']['locked'][$mod_chk];
-                       $hidden = $GLOBALS['cache_array']['modules']['hidden'][$mod_chk];
-                       $admin  = $GLOBALS['cache_array']['modules']['admin_only'][$mod_chk];
-                       $mem    = $GLOBALS['cache_array']['modules']['mem_only'][$mod_chk];
+                       $data['locked']     = $GLOBALS['cache_array']['modules']['locked'][$module_chk];
+                       $data['hidden']     = $GLOBALS['cache_array']['modules']['hidden'][$module_chk];
+                       $data['admin_only'] = $GLOBALS['cache_array']['modules']['admin_only'][$module_chk];
+                       $data['mem_only']   = $GLOBALS['cache_array']['modules']['mem_only'][$module_chk];
 
                        // Update cache hits
                        incrementStatsEntry('cache_hits');
@@ -187,15 +191,15 @@ function checkModulePermissions ($mod = '') {
                // Check for module in database
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using database.');
                $result = SQL_QUERY_ESC("SELECT `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1",
-                       array($mod_chk), __FUNCTION__, __LINE__);
+                       array($module_chk), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Read data
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Entry found.');
-                       list($locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                        $found = true;
                } elseif (isDebugModeEnabled()) {
                        // Debug message only in debug-mode...
-                       logDebugMessage(__FUNCTION__, __LINE__, 'Module ' . $mod_chk . ' not found!');
+                       logDebugMessage(__FUNCTION__, __LINE__, 'Module ' . $module_chk . ' not found!');
                }
 
                // Free result
@@ -207,26 +211,26 @@ function checkModulePermissions ($mod = '') {
        if ($found === true) {
                // Check returned values against current access permissions
                //
-               //  Admin access            ----- Guest access -----           --- Guest   or   member? ---
-               if ((isAdmin()) || (($locked != 'Y') && ($admin != 'Y') && (($mem != 'Y') || (isMember())))) {
+               //  Admin access                   ----- Guest access -----                                     --- Guest   or   member? ---
+               if ((isAdmin()) || (($data['locked'] != 'Y') && ($data['admin_only'] != 'Y') && (($data['mem_only'] != 'Y') || (isMember())))) {
                        // If you are admin you are welcome for everything!
                        $ret = 'done';
-               } elseif ($locked == 'Y') {
+               } elseif ($data['locked'] == 'Y') {
                        // Module is locked
                        $ret = 'locked';
-               } elseif (($mem == 'Y') && (!isMember())) {
+               } elseif (($data['mem_only'] == 'Y') && (!isMember())) {
                        // You have to login first!
                        $ret = 'mem_only';
-               } elseif (($admin == 'Y') && (!isAdmin())) {
+               } elseif (($data['admin_only'] == 'Y') && (!isAdmin())) {
                        // Only the Admin is allowed to enter this module!
                        $ret = 'admin_only';
                } else {
                        // @TODO Nothing helped???
                        logDebugMessage(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
                                $ret,
-                               $locked,
-                               $admin,
-                               $mem
+                               $data['locked'],
+                               $data['admin_only'],
+                               $data['mem_only']
                        ));
                }
        } // END - if
@@ -234,19 +238,19 @@ function checkModulePermissions ($mod = '') {
        // Still no luck or not found?
        if (($found === false) && (!isExtensionActive('cache')) && ($ret != 'done'))  {
                //              ----- Legacy module -----                                               ---- Module in base folder  ----                       --- Module with extension's name ---
-               if ((isIncludeReadable(sprintf("inc/modules/%s.php", $mod))) || (isIncludeReadable(sprintf("%s.php", $mod))) || (isIncludeReadable(sprintf("%s/%s.php", $extension, $mod)))) {
+               if ((isIncludeReadable(sprintf("inc/modules/%s.php", $module))) || (isIncludeReadable(sprintf("%s.php", $module))) || (isIncludeReadable(sprintf("%s/%s.php", $extension, $module)))) {
                        // Data is missing so we add it
                        if (isExtensionInstalledAndNewer('sql_patches', '0.3.6')) {
                                // Since 0.3.6 we have a has_menu column, this took me a half hour
                                // to find a loop here... *sigh*
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg`
 (`module`, `locked`, `hidden`, `mem_only`, `admin_only`, `has_menu`) VALUES
-('%s','Y','N','N','N','N')", array($mod_chk), __FUNCTION__, __LINE__);
+('%s','Y','N','N','N','N')", array($module_chk), __FUNCTION__, __LINE__);
                        } else {
                                // Wrong/missing sql_patches!
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mod_reg`
 (`module`, `locked`, `hidden`, `mem_only`, `admin_only`) VALUES
-('%s','Y','N','N','N')", array($mod_chk), __FUNCTION__, __LINE__);
+('%s','Y','N','N','N')", array($module_chk), __FUNCTION__, __LINE__);
                        }
 
                        // Everthing is fine?
@@ -260,8 +264,8 @@ function checkModulePermissions ($mod = '') {
                        if ((getOutputMode() == '0') || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules');
 
                        // And reload data
-                       unset($GLOBALS['module_status'][$mod]);
-                       $ret = checkModulePermissions($mod_chk);
+                       unset($GLOBALS['module_status'][$module]);
+                       $ret = checkModulePermissions($module_chk);
                } else {
                        // Module not found we don't add it to the database
                        $ret = '404';
@@ -272,19 +276,19 @@ function checkModulePermissions ($mod = '') {
        } elseif ($found === false) {
                // Problem with module detected
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s, output_mode=%s",
-                       $mod,
+                       $module,
                        $ret,
-                       $locked,
-                       $hidden,
-                       $mem,
-                       $admin,
+                       $data['locked'],
+                       $data['hidden'],
+                       $data['mem_only'],
+                       $data['admin_only'],
                        getOutputMode()
                ));
        }
 
        // Return the value
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret=' . $ret);
-       $GLOBALS['module_status'][$mod] = $ret;
+       $GLOBALS['module_status'][$module] = $ret;
        return $ret;
 }
 
@@ -340,7 +344,7 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) {
        // Begin the navigation line
        if ((!isset($GLOBALS['nav_depth'])) && ($return === false)) {
                $GLOBALS['nav_depth'] = '0';
-               $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--}&nbsp;<strong><a class=\"you_are_here\" href=\"{%url=modules.php?module=" . getModule() . $LINK_ADD . "%}\">Home</a></strong>";
+               $prefix = '<div class="you_are_here">{--YOU_ARE_HERE--}&nbsp;<strong><a class="you_are_here" href="{%url=modules.php?module=' . getModule() . $LINK_ADD . '%}">Home</a></strong>';
        } else {
                if ($return === false) $GLOBALS['nav_depth']++;
                $prefix = '';
@@ -356,14 +360,14 @@ function addMenuDescription ($accessLevel, $FQFN, $return = false) {
 
        if (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) {
                // Output HTML code
-               $OUT = $prefix . "<strong><a class=\"you_are_here\" href=\"{%url=modules.php?module=" . $modCheck . '&amp;' . $type . '=' . $search . $LINK_ADD . "%}\">" . getTitleFromMenu($accessLevel, $search, $type, $ADD) . "</a></strong>\n";
+               $OUT = $prefix . '<strong><a class="you_are_here" href="{%url=modules.php?module=' . $modCheck . '&amp;' . $type . '=' . $search . $LINK_ADD . '%}">' . getTitleFromMenu($accessLevel, $search, $type, $ADD) . '</a></strong>';
 
                // Can we close the you-are-here navigation?
                //* DEBUG: */ print(__LINE__."*".$type.'/'.getWhat()."*<br />");
                if (($type == 'what') || (($type == 'action') && ((!isWhatSet()) || (getWhat() == 'overview')))) {
                        //* DEBUG: */ print(__LINE__.'+'.$type."+<br />");
                        // Add closing div and br-tag
-                       $OUT .= "</div><br />\n";
+                       $OUT .= '</div><br />';
                        $GLOBALS['nav_depth'] = '0';
 
                        // Run the filter chain
@@ -443,29 +447,29 @@ function addMenu ($mode, $action, $what) {
                                        if (isIncludeReadable($inc)) {
                                                // Mark currently selected menu - open
                                                if ((!empty($what)) && (($what == $content['sub_what']))) {
-                                                       $OUT = "<strong>";
+                                                       $OUT = '<strong>';
                                                } // END - if
 
                                                // Navigation link
-                                               $OUT .= "<a name=\"menu\" class=\"menu_blur\" href=\"{%url=modules.php?module=" . getModule() . '&amp;what=' . $content['sub_what'] . "%}\" target=\"_self\">";
+                                               $OUT .= '<a name="menu" class="menu_blur" href="{%url=modules.php?module=' . getModule() . '&amp;what=' . $content['sub_what'] . '%}" target="_self">';
                                        } else {
                                                // Not found! - open
-                                               $OUT .= "<em style=\"cursor:help\" class=\"admin_note\" title=\"{--MENU_WHAT_404--}\">";
+                                               $OUT .= '<em style="cursor:help" class="admin_note" title="{--MENU_WHAT_404--}">';
                                        }
 
                                        // Menu title
                                        $OUT .= getConfig('menu_blur_spacer') . $content['sub_title'];
 
                                        if (isIncludeReadable($inc)) {
-                                               $OUT .= "</a>";
+                                               $OUT .= '</a>';
 
                                                // Mark currently selected menu - close
                                                if ((!empty($what)) && (($what == $content['sub_what']))) {
-                                                       $OUT .= "</strong>";
+                                                       $OUT .= '</strong>';
                                                } // END - if
                                        } else {
                                                // Not found! - close
-                                               $OUT .= "</em>";
+                                               $OUT .= '</em>';
                                        }
 
                                        // Cunt it up
@@ -633,8 +637,12 @@ function fetchUserData ($userid, $column = 'userid') {
        // By default none was found
        $found = false;
 
+       // Extra statements
+       $ADD = '';
+       if (isExtensionInstalledAndNewer('user', '0.3.5')) $ADD = ', UNIX_TIMESTAMP(`lock_timestamp`) AS `lock_timestamp`';
+
        // Query for the user
-       $result = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `%s`='%s' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT *".$ADD." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `%s`='%s' LIMIT 1",
                array($column, $userid), __FUNCTION__, __LINE__);
 
        // Do we have a record?
@@ -717,25 +725,8 @@ function isAdmin ($admin = '') {
                        // Count cache hits
                        incrementStatsEntry('cache_hits');
                } elseif ((!empty($admin)) && ((!isExtensionActive('cache'))) || (isAdminHashSet($admin) === false)) {
-                       // Search for admin
-                       $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
-                               array($admin), __FUNCTION__, __LINE__);
-
-                       // Is he admin?
-                       $passDB = '';
-                       if (SQL_NUMROWS($result) == 1) {
-                               // Admin login was found so let's load password from DB
-                               list($passDB) = SQL_FETCHROW($result);
-
-                               // Temporary cache it
-                               setAdminHash($admin, $passDB);
-
-                               // Generate password hash
-                               $valPass = generatePassString($passDB);
-                       } // END - if
-
-                       // Free memory
-                       SQL_FREERESULT($result);
+                       // Get admin hash and hash it
+                       $valPass = generatePassString(getAdminHash($admin));
                }
 
                if (!empty($valPass)) {
@@ -757,13 +748,13 @@ function addMaxReceiveList ($mode, $default = '', $return = false) {
        switch ($mode) {
                case 'guest':
                        // Guests (in the registration form) are not allowed to select 0 mails per day.
-                       $result = SQL_QUERY("SELECT value, comment FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value > 0 ORDER BY value",
+                       $result = SQL_QUERY("SELECT `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value` > 0 ORDER BY `value` ASC",
                        __FUNCTION__, __LINE__);
                        break;
 
                case 'member':
                        // Members are allowed to set to zero mails per day (we will change this soon!)
-                       $result = SQL_QUERY("SELECT value, comment FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY value",
+                       $result = SQL_QUERY("SELECT `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC",
                        __FUNCTION__, __LINE__);
                        break;
 
@@ -776,11 +767,11 @@ function addMaxReceiveList ($mode, $default = '', $return = false) {
        if (SQL_NUMROWS($result) > 0) {
                $OUT = '';
                while ($content = SQL_FETCHARRAY($result)) {
-                       $OUT .= "      <option value=\"".$content['value']."\"";
+                       $OUT .= '      <option value="' . $content['value'] . '"';
                        if (postRequestElement('max_mails') == $content['value']) $OUT .= ' selected="selected"';
-                       $OUT .= ">".$content['value']." {--PER_DAY--}";
-                       if (!empty($content['comment'])) $OUT .= " (".$content['comment'].')';
-                       $OUT .= "</option>\n";
+                       $OUT .= '>' . $content['value'] . ' {--PER_DAY--}';
+                       if (!empty($content['comment'])) $OUT .= '(' . $content['comment'] . ')';
+                       $OUT .= '</option>';
                }
 
                // Load template
@@ -876,7 +867,7 @@ function isMenuActionValid ($mode, $action, $what, $updateEntry=false) {
 // Get action value from mode (admin/guest/member) and what-value
 function getModeAction ($mode, $what) {
        // Init status
-       $ret = '';
+       $data['action'] = '';
 
        //* DEBUG: */ print(__LINE__.'='.$mode.'/'.$what.'/'.getAction()."=<br />");
        if (!isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
@@ -906,13 +897,13 @@ function getModeAction ($mode, $what) {
                        return getAction();
                } elseif (($what == 'overview') || (!isWhatSet())) {
                        // Default value for admin area
-                       $ret = 'login';
+                       $data['action'] = 'login';
                }
        } elseif (isActionSet()) {
                // Get it directly from URL
                return getAction();
        }
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret.'<br />');
+       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$data['action'].'<br />');
 
        // Does the module have a menu?
        if (ifModuleHasMenu($mode)) {
@@ -920,14 +911,14 @@ function getModeAction ($mode, $what) {
                $mode = mapModuleToTable($mode);
 
                // Guest and member menu is 'main' as the default
-               if (empty($ret)) $ret = 'main';
+               if (empty($data['action'])) $data['action'] = 'main';
 
                // Load from database
                $result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what`='%s' LIMIT 1",
                        array($mode, $what), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load action value and pray that this one is the right you want... ;-)
-                       list($ret) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free memory
@@ -941,25 +932,25 @@ function getModeAction ($mode, $what) {
        }
 
        // Return action value
-       return $ret;
+       return $data['action'];
 }
 
 // Get category name back
 function getCategory ($cid) {
        // Default is not found
-       $ret = getMessage('_CATEGORY_404');
+       $data['cat'] = getMessage('_CATEGORY_404');
 
        // Is the category id set?
        if ($cid == '0') {
                // No category
-               $ret = getMessage('_CATEGORY_NONE');
+               $data['cat'] = getMessage('_CATEGORY_NONE');
        } elseif ($cid > 0) {
                // Lookup the category in database
-               $result = SQL_QUERY_ESC("SELECT cat FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1",
-               array(bigintval($cid)), __FUNCTION__, __LINE__);
+               $result = SQL_QUERY_ESC("SELECT `cat` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1",
+                       array(bigintval($cid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Category found... :-)
-                       list($ret) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free result
@@ -967,7 +958,7 @@ function getCategory ($cid) {
        } // END - if
 
        // Return result
-       return $ret;
+       return $data['cat'];
 }
 
 // Get a string of "mail title" and price back
@@ -976,17 +967,17 @@ function getPaymentTitlePrice ($pid, $full=false) {
        $ret = getMessage('_PAYMENT_404');
 
        // Load payment data
-       $result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
-       array(bigintval($pid)), __FUNCTION__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT `mail_title`, `price` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
+               array(bigintval($pid)), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Payment type found... :-)
+               $data = SQL_FETCHARRAY($result);
+
+               // Only title or also including price?
                if ($full === false) {
-                       // Return only title
-                       list($ret) = SQL_FETCHROW($result);
+                       $ret = $data['mail_title'];
                } else {
-                       // Return title and price
-                       list($t, $p) = SQL_FETCHROW($result);
-                       $ret = $t.' / '.translateComma($p).' {?POINTS?}';
+                       $ret = $data['mail_title'] . ' / ' . translateComma($data['price']) . ' {?POINTS?}';
                }
        }
 
@@ -1000,23 +991,23 @@ function getPaymentTitlePrice ($pid, $full=false) {
 // Get (basicly) the price of given payment id
 function getPaymentPoints ($pid, $lookFor = 'price') {
        // Default value...
-       $ret = '-1';
+       $data[$lookFor] = '-1';
 
        // Search for it in database
-       $result = SQL_QUERY_ESC("SELECT %s FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
-       array($lookFor, $pid), __FUNCTION__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT `%s` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
+               array($lookFor, $pid), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        if (SQL_NUMROWS($result) == 1) {
                // Payment type found... :-)
-               list($ret) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
        } // END - if
 
        // Free result
        SQL_FREERESULT($result);
 
        // Return value
-       return $ret;
+       return $data[$lookFor];
 }
 
 // Remove a receiver's id from $receivers and add a link for him to confirm
@@ -1061,54 +1052,56 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $
 
 // Calculate sum (default) or count records of given criteria
 function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') {
-       $ret = '0';
+       // Init count/sum
+       $data['res'] = '0';
+
        //* DEBUG: */ print($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />');
        if ((empty($search)) && ($search != '0')) {
                // Count or sum whole table?
                if ($countRows === true) {
                        // Count whole table
-                       $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{?_MYSQL_PREFIX?}_%s`".$add,
+                       $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS res FROM `{?_MYSQL_PREFIX?}_%s`".$add,
                                array($lookFor, $tableName), __FUNCTION__, __LINE__);
                } else {
                        // Sum whole table
-                       $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{?_MYSQL_PREFIX?}_%s`".$add,
+                       $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS res FROM `{?_MYSQL_PREFIX?}_%s`".$add,
                                array($lookFor, $tableName), __FUNCTION__, __LINE__);
                }
        } elseif (($countRows === true) || ($lookFor == 'userid')) {
                // Count rows
                //* DEBUG: */ print("COUNT!<br />");
-               $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add,
+               $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS res FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add,
                        array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
        } else {
                // Add all rows
                //* DEBUG: */ print("SUM!<br />");
-               $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add,
+               $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS res FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add,
                        array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
        }
 
        // Load row
-       list($ret) = SQL_FETCHROW($result);
+       $data = SQL_FETCHARRAY($result);
 
        // Free result
        SQL_FREERESULT($result);
 
        // Fix empty values
-       if ((empty($ret)) && ($lookFor != 'counter') && ($lookFor != 'id') && ($lookFor != 'userid')) {
+       if ((empty($data['res'])) && ($lookFor != 'counter') && ($lookFor != 'id') && ($lookFor != 'userid')) {
                // Float number
-               $ret = '0.00000';
-       } elseif (''.$ret.'' == '') {
+               $data['res'] = '0.00000';
+       } elseif (''.$data['res'].'' == '') {
                // Fix empty result
-               $ret = '0';
+               $data['res'] = '0';
        }
 
        // Return value
-       //* DEBUG: */ print 'ret='.$ret.'<br />';
-       return $ret;
+       //* DEBUG: */ print 'ret=' . $data['res'] . '<br />';
+       return $data['res'];
 }
 // Getter fro ref level percents
 function getReferalLevelPercents ($level) {
        // Default is zero
-       $per = '0';
+       $data['percents'] = '0';
 
        // Do we have cache?
        if ((isset($GLOBALS['cache_array']['refdepths']['level'])) && (isExtensionActive('cache'))) {
@@ -1116,7 +1109,7 @@ function getReferalLevelPercents ($level) {
                $key = array_search($level, $GLOBALS['cache_array']['refdepths']['level']);
                if ($key !== false) {
                        // Entry found!
-                       $per = $GLOBALS['cache_array']['refdepths']['percents'][$key];
+                       $data['percents'] = $GLOBALS['cache_array']['refdepths']['percents'][$key];
 
                        // Count cache hit
                        incrementStatsEntry('cache_hits');
@@ -1129,7 +1122,7 @@ function getReferalLevelPercents ($level) {
                // Entry found?
                if (SQL_NUMROWS($result_level) == 1) {
                        // Get percents
-                       list($per) = SQL_FETCHROW($result_level);
+                       $data = SQL_FETCHARRAY($result_level);
                } // END - if
 
                // Free result
@@ -1137,7 +1130,7 @@ function getReferalLevelPercents ($level) {
        }
 
        // Return percent
-       return $per;
+       return $data['percents'];
 }
 
 /**
@@ -1345,12 +1338,12 @@ function sendAdminEmails ($subj, $message) {
 // Get id number from administrator's login name
 function getAdminId ($login) {
        // By default no admin is found
-       $ret = '-1';
+       $data['id'] = '-1';
 
        // Check cache
        if (isset($GLOBALS['cache_array']['admin']['admin_id'][$login])) {
                // Use it if found to save SQL queries
-               $ret = $GLOBALS['cache_array']['admin']['admin_id'][$login];
+               $data['id'] = $GLOBALS['cache_array']['admin']['admin_id'][$login];
 
                // Update cache hits
                incrementStatsEntry('cache_hits');
@@ -1358,14 +1351,19 @@ function getAdminId ($login) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
                        array($login), __FUNCTION__, __LINE__);
+
+               // Do we have an entry?
                if (SQL_NUMROWS($result) == 1) {
-                       list($ret) = SQL_FETCHROW($result);
+                       // Get it
+                       $data = SQL_FETCHARRAY($result);
                } // END - if
 
                // Free result
                SQL_FREERESULT($result);
        }
-       return $ret;
+
+       // Return the id
+       return $data['id'];
 }
 
 // "Getter" for current admin id
@@ -1389,82 +1387,92 @@ function getCurrentAdminId () {
 // Get password hash from administrator's login name
 function getAdminHash ($admin) {
        // By default an invalid hash is returned
-       $ret = '-1';
+       $data['password'] = '-1';
 
        if (isAdminHashSet($admin)) {
                // Check cache
-               $ret = $GLOBALS['cache_array']['admin']['password'][$admin];
+               $data['password'] = $GLOBALS['cache_array']['admin']['password'][$admin];
 
                // Update cache hits
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionActive('cache')) {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT password FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array($admin), __FUNCTION__, __LINE__);
+
+               // Do we have an entry?
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
-                       list($ret) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
 
                        // Set cache
-                       setAdminHash($admin, $ret);
+                       setAdminHash($admin, $data['password']);
                } // END - if
 
                // Free result
                SQL_FREERESULT($result);
        }
-       return $ret;
+
+       // Return password hash
+       return $data['password'];
 }
 
 // "Getter" for admin login
 function getAdminLogin ($adminId) {
        // By default a non-existent login is returned (other functions react on this!)
-       $ret = '***';
+       $data['login'] = '***';
 
        if (isset($GLOBALS['cache_array']['admin']['login'][$adminId])) {
                // Get cache
-               $ret = $GLOBALS['cache_array']['admin']['login'][$adminId];
+               $data['login'] = $GLOBALS['cache_array']['admin']['login'][$adminId];
 
                // Update cache hits
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionActive('cache')) {
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT login FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
-               array(bigintval($adminId)), __FUNCTION__, __LINE__);
+               $result = SQL_QUERY_ESC("SELECT `login` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+                       array(bigintval($adminId)), __FUNCTION__, __LINE__);
+
+               // Entry found?
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
-                       list($ret) = SQL_FETCHROW($result);
+                       $data = SQL_FETCHARRAY($result);
 
                        // Set cache
-                       $GLOBALS['cache_array']['admin']['login'][$adminId] = $ret;
+                       $GLOBALS['cache_array']['admin']['login'][$adminId] = $data['login'];
                } // END - if
 
                // Free memory
                SQL_FREERESULT($result);
        }
-       return $ret;
+
+       // Return the result
+       return $data['login'];
 }
 
 // Get email address of admin id
 function getAdminEmail ($adminId) {
        // By default an invalid emails is returned
-       $ret = '***';
+       $data['email'] = '***';
 
        if (isset($GLOBALS['cache_array']['admin']['email'][$adminId])) {
                // Get cache
-               $ret = $GLOBALS['cache_array']['admin']['email'][$adminId];
+               $data['email'] = $GLOBALS['cache_array']['admin']['email'][$adminId];
 
                // Update cache hits
                incrementStatsEntry('cache_hits');
        } elseif (!isExtensionActive('cache')) {
                // Load from database
-               $result_admin_id = SQL_QUERY_ESC("SELECT email FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+               $result_admin_id = SQL_QUERY_ESC("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
+
+               // Entry found?
                if (SQL_NUMROWS($result_admin_id) == 1) {
                        // Get data
-                       list($ret) = SQL_FETCHROW($result_admin_id);
+                       $data = SQL_FETCHARRAY($result_admin_id);
 
                        // Set cache
-                       $GLOBALS['cache_array']['admin']['email'][$adminId] = $ret;
+                       $GLOBALS['cache_array']['admin']['email'][$adminId] = $data['email'];
                } // END - if
 
                // Free result
@@ -1472,21 +1480,21 @@ function getAdminEmail ($adminId) {
        }
 
        // Return email
-       return $ret;
+       return $data['email'];
 }
 
 // Get default ACL  of admin id
 function getAdminDefaultAcl ($adminId) {
        // By default an invalid ACL value is returned
-       $ret = '***';
+       $data['default_acl'] = '***';
 
        // Is sql_patches there and was it found in cache?
        if (!isExtensionActive('sql_patches')) {
                // Not found, which is bad, so we need to allow all
-               $ret =  'allow';
+               $data['default_acl'] =  'allow';
        } elseif (isset($GLOBALS['cache_array']['admin']['def_acl'][$adminId])) {
                // Use cache
-               $ret = $GLOBALS['cache_array']['admin']['def_acl'][$adminId];
+               $data['default_acl'] = $GLOBALS['cache_array']['admin']['def_acl'][$adminId];
 
                // Update cache hits
                incrementStatsEntry('cache_hits');
@@ -1496,18 +1504,18 @@ function getAdminDefaultAcl ($adminId) {
                        array(bigintval($adminId)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_admin_id) == 1) {
                        // Fetch data
-                       list($ret) = SQL_FETCHROW($result_admin_id);
+                       $data = SQL_FETCHARRAY($result_admin_id);
 
                        // Set cache
-                       $GLOBALS['cache_array']['admin']['def_acl'][$adminId] = $ret;
+                       $GLOBALS['cache_array']['admin']['def_acl'][$adminId] = $data['default_acl'];
                }
 
                // Free result
                SQL_FREERESULT($result_admin_id);
        }
 
-       // Return email
-       return $ret;
+       // Return default ACL
+       return $data['default_acl'];
 }
 
 // Generates an option list from various parameters
@@ -1594,7 +1602,9 @@ function FILTER_ACTIVATE_EXCHANGE () {
 
 // Deletes a user account with given reason
 function deleteUserAccount ($userid, $reason) {
-       $points = '0';
+       // Init points
+       $data['points'] = '0';
+
        $result = SQL_QUERY_ESC("SELECT
        (SUM(p.points) - d.used_points) AS points
 FROM
@@ -1606,9 +1616,11 @@ ON
 WHERE
        p.userid=%s",
                array(bigintval($userid)), __FUNCTION__, __LINE__);
+
+       // Do we have an entry?
        if (SQL_NUMROWS($result) == 1) {
                // Save his points to add them to the jackpot
-               list($points) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
 
                // Delete points entries as well
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s", array(bigintval($userid)), __FUNCTION__, __LINE__);
@@ -1616,11 +1628,11 @@ WHERE
                // Update mediadata as well
                if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
                        // Update database
-                       updateMediadataEntry(array('total_points'), 'sub', $points);
+                       updateMediadataEntry(array('total_points'), 'sub', $data['points']);
                } // END - if
 
                // Now, when we have all his points adds them do the jackpot!
-               if (isExtensionActive('jackpot')) addPointsToJackpot($points);
+               if (isExtensionActive('jackpot')) addPointsToJackpot($data['points']);
        } // END - if
 
        // Free the result
@@ -1631,13 +1643,18 @@ WHERE
                array(bigintval($userid)), __FUNCTION__, __LINE__);
 
        // Remove from rallye if found
+       // @TODO Rewrite this to a filter
        if (isExtensionActive('rallye')) {
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `userid`=%s",
                        array(bigintval($userid)), __FUNCTION__, __LINE__);
        } // END - if
 
+       // Add reason and translate points
+       $data['text']   = $reason;
+       $data['points'] = translateComma($data['points']);
+
        // Now a mail to the user and that's all...
-       $message = loadEmailTemplate('del-user', array('text' => $reason), $userid);
+       $message = loadEmailTemplate('del-user', $data, $userid);
        sendEmail($userid, getMessage('ADMIN_DEL_ACCOUNT'), $message);
 
        // Ok, delete the account!
@@ -1645,9 +1662,9 @@ WHERE
 }
 
 // Generates meta description for given module and 'what' value
-function generateMetaDescriptionCode ($mod, $what) {
+function generateMetaDescriptionCode ($module, $what) {
        // Exclude admin and member's area
-       if (($mod != 'admin') && ($mod != 'login')) {
+       if (($module != 'admin') && ($module != 'login')) {
                // Construct dynamic description
                $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', $what);
 
@@ -1736,7 +1753,7 @@ WHERE
        return $numRows;
 }
 
-// Returns HTML code with an "<option> list" of all categories
+// Returns HTML code with an option list of all categories
 function generateCategoryOptionsList ($mode) {
        // Prepare WHERE statement
        $whereStatement = " WHERE `visible`='Y'";
@@ -1762,29 +1779,16 @@ function generateCategoryOptionsList ($mode) {
                        $CATS['name'][] = $content['cat'];
 
                        // Check which users are in this category
-                       $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s",
+                       $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s ORDER BY `userid` ASC",
                                array(bigintval($content['id'])), __FUNCTION__, __LINE__);
 
-                       // Start adding all
+                       // Init count
                        $userid_cnt = '0';
-                       // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-                       while (list($ucat) = SQL_FETCHROW($result_userids)) {
-                               $result_ver = SQL_QUERY_ESC("SELECT
-       `userid`
-FROM
-       `{?_MYSQL_PREFIX?}_user_data`
-WHERE
-       `userid`=%s AND
-       `status`='CONFIRMED' AND
-       `receive_mails` > 0".runFilterChain('exclude_users', $mode)."
-LIMIT 1",
-                                       array(bigintval($ucat)), __FUNCTION__, __LINE__);
 
+                       // Start adding all
+                       while ($data = SQL_FETCHARRAY($result_userids)) {
                                // Add user count
-                               $userid_cnt += SQL_NUMROWS($result_ver);
-
-                               // Free memory
-                               SQL_FREERESULT($result_ver);
+                               $userid_cnt += countSumTotalData($data['userid'], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED' AND `receive_mails` > 0");
                        } // END - while
 
                        // Free memory
@@ -1942,7 +1946,7 @@ function generateReceiverList ($cat, $receiver, $mode = '') {
 // Get timestamp for given stats type and data
 function getTimestampFromUserStats ($type, $data, $userid = '0') {
        // Default timestamp is zero
-       $stamp = '0';
+       $data['inserted'] = '0';
 
        // User id set?
        if ((isMemberIdSet()) && ($userid == '0')) {
@@ -1952,16 +1956,18 @@ function getTimestampFromUserStats ($type, $data, $userid = '0') {
        // Is the extension installed and updated?
        if ((!isExtensionActive('sql_patches')) || (isExtensionOlder('sql_patches', '0.5.6'))) {
                // Return zero here
-               return $stamp;
+               return $data['inserted'];
        } // END - if
 
        // Try to find the entry
        $result = SQL_QUERY_ESC("SELECT
-       UNIX_TIMESTAMP(`inserted`) AS stamp
+       UNIX_TIMESTAMP(`inserted`) AS inserted
 FROM
        `{?_MYSQL_PREFIX?}_user_stats_data`
 WHERE
-       `userid`=%s AND `stats_type`='%s' AND `stats_data`='%s'
+       `userid`=%s AND
+       `stats_type`='%s' AND
+       `stats_data`='%s'
 LIMIT 1",
                array(
                        bigintval($userid),
@@ -1972,14 +1978,14 @@ LIMIT 1",
        // Is the entry there?
        if (SQL_NUMROWS($result) == 1) {
                // Get this stamp
-               list($stamp) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
        } // END - if
 
        // Free result
        SQL_FREERESULT($result);
 
        // Return stamp
-       return $stamp;
+       return $data['inserted'];
 }
 
 // Inserts user stats
@@ -2028,7 +2034,8 @@ ON
        ur.refid=ud.userid
 WHERE
        ur.userid=%s AND ur.level=%s
-ORDER BY ur.refid ASC",
+ORDER BY
+       ur.refid ASC",
                array(
                        bigintval($userid),
                        bigintval($level)
@@ -2108,9 +2115,14 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
                        if ($num === 0) $userids[$data['userid']] = $data['userid'];
                } // END - while
 
-               // Now update all user accounts
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s",
-                       array(implode(',', $userids), count($userids)), __FUNCTION__, __LINE__);
+               if (count($userids) > 0) {
+                       // Now update all user accounts
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s",
+                               array(implode(',', $userids), count($userids)), __FUNCTION__, __LINE__);
+               } else {
+                       // Nothing deleted
+                       loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MAIL_NOTHING_DELETED', $id));
+               }
        } // END - if
 
        // Free result
index 8a933e521f48985a1c654e2a228e194c1fc191c3..495173dc08555f98ae5a828c722114bf76100a74 100644 (file)
@@ -6,8 +6,8 @@
 \r
 $INCLUDE_DIR = "../";\r
 \r
-require("phpunit.php");\r
-require($INCLUDE_DIR . "class.phpmailer.php");\r
+include("phpunit.php");\r
+include($INCLUDE_DIR . "class.phpmailer.php");\r
 error_reporting(E_ALL);\r
 \r
 /**\r
index d3369e758f78a10f6dcbbbf750394c2aa1e88e34..1e36678f6f863f53110d5a1863b03301c988b8fa 100644 (file)
@@ -257,6 +257,11 @@ function detectRequestUri () {
        return (getenv('REQUEST_URI'));
 }
 
+// "Getter" for query string
+function detectQueryString () {
+       return str_replace('&', '&amp;', (getenv('QUERY_STRING')));
+}
+
 // Check wether we are installing
 function isInstalling () {
        // Determine wether we are installing
@@ -750,6 +755,7 @@ function isUserDataValid () {
 
 // Setter for current userid
 function setCurrentUserId ($userid) {
+       logDebugMessage(__FUNCTION__, __LINE__, 'userid='.$userid);
        $GLOBALS['current_userid'] = bigintval($userid);
 }
 
index 71c7f7d1e0979240bc94354071f83b9280bc52e3..7007c9e96123fd544dc61289cb47948b92487675 100644 (file)
@@ -55,7 +55,7 @@ require('inc/libs/security_functions.php');
 // Init start time
 $GLOBALS['startTime'] = microtime(true);
 
-// Tell every module / include file we are installing
+// Tell every module / require file we are installing
 $GLOBALS['mxchange_installing'] = true;
 
 // Set CSS variable for "normal mode"
index 0c5cee191397d832666c8daf1ede6c6d22443d61..fdb59a8354d69d03d816a0661f48bb0ed5bc7cc4 100644 (file)
@@ -351,30 +351,30 @@ if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErr
                                                                        break;
                                                        } // END - switch
                                                } else {
-                                                       loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
+                                                       loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (6)</div>');
                                                        $mode = 'failed';
                                                }
                                        } else {
-                                               loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>");
+                                               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (5)</div>');
                                                $mode = 'failed';
                                        }
                                } else {
-                                       loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>");
+                                       loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (4)</div>');
                                        $mode = 'failed';
                                }
                        } else {
                                SQL_FREERESULT($result);
-                               loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>");
+                               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (3)</div>');
                                $mode = 'failed';
                        }
                } else {
                        SQL_FREERESULT($result);
-                       loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>");
+                       loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (2)</div>');
                        $mode = 'failed';
                }
        } else {
                SQL_FREERESULT($result);
-               loadTemplate('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>");
+               loadTemplate('admin_settings_saved', false, '<div class="member_failed">{--MAIL_ALREADY_CONFIRMED--} (1)</div>');
                $mode = 'failed';
        }
 
index 201f4cea38975f4dc895629353222dc2eed5e121..57c3bed6392abe0b899d219bebcd239b0799bc1c 100644 (file)
@@ -93,27 +93,27 @@ if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (
                                $isModuleValid = true;
                        } elseif (getTotalFatalErrors() == '0') {
                                // Module not found!
-                               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule()));
+                               addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_404', getModule()));
                        }
                        break;
 
                case '404':
-                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule()));
+                       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_404', getModule()));
                        break;
 
                case 'locked':
                        if (!isIncludeReadable($GLOBALS['module_inc'])) {
                                // Module does addionally not exists
-                               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule()));
+                               addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_404', getModule()));
                        } // END - if
 
                        // Add fatal message
-                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_LOCKED'), getModule()));
+                       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_LOCKED', getModule()));
                        break;
 
                default:
                        logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, getModule()));
-                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
+                       addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_UNKNOWN', $check));
                        break;
        } // END - switch
 } elseif (getTotalFatalErrors() == '0') {
index 51e02a211ec417d021754fba1a21ecea63818b2a..7a881972699e51df3763c8bb076ea2b2b9667ba6 100644 (file)
@@ -9,6 +9,8 @@ $content[text]
 Ihre Mitglieder-Id war: $userid
 ------------------------------------
 
+Ihr Guthaben von $content[points] {?POINTS?} sind hiermit verfallen.
+
 Wir w&uuml;nschen Ihnen weiterhin noch alles Gute und k&ouml;nnen Sie vielleicht irgentwann einmal wieder begruessen.
 
 Vielen Dank.
diff --git a/templates/de/html/admin/admin_expert_settings_form.tpl b/templates/de/html/admin/admin_expert_settings_form.tpl
new file mode 100644 (file)
index 0000000..a0a956e
--- /dev/null
@@ -0,0 +1,28 @@
+<form accept-charset="utf-8" action="{%url=modules.php?dummy=1%}&amp;{%server,query_string%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center">
+       <tr>
+               <td colspan="2" align="center" class="admin_title bottom">
+                       <strong>{--ADMIN_EXPERT_SETTINGS_TITLE--}:</strong>
+               </td>
+       </tr>
+       <tr>
+               <td colspan="2" align="center">
+                       <div class="admin_note">{--ADMIN_EXPERT_SETTINGS_NOTE--}</div>
+               </td>
+       </tr>
+       <tr>
+               <td class="bottom" align="right">
+                       {--ADMIN_EXPERT_SETTINGS_MAKE_PERMANENT--}
+               </td>
+               <td class="bottom" align="center">
+                       <input type="checkbox" class="admin_normal" name="expert_settings" value="Y" />
+               </td>
+       </tr>
+       <tr>
+               <td colspan="2" class="admin_footer">
+                       <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+                       <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_EXPERT_SETTINGS_CONTINUE--}" />
+               </td>
+       </tr>
+</table>
+</form>
index d66c7181793e8ae7756a8e043b46af980193793e..55d9c33cc1632c7b6a7e430a27478cda3f50e466 100644 (file)
@@ -1,8 +1,13 @@
 <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
 <tr>
-       <td colspan="3" align="center" class="admin_task_header top bottom left right">
+       <td colspan="2" align="center" class="admin_task_header bottom">
                <strong>{--ADMIN_SELECTED_TASKS_ASSIGN--}:</strong>
        </td>
 </tr>
 $content
+<tr>
+       <td colspan="2" align="center" class="admin_footer">
+               &nbsp;
+       </td>
+</tr>
 </table>
index 0f5175106a6629ffcc48544f62cb6d4f4bdfbbc8..0bae9d26906fbffec335cc5e1b21f5dda5dcc3b5 100644 (file)
@@ -1,11 +1,11 @@
 <tr>
-       <td width="79%" class="switch_sw$content[sw] bottom left">
+       <td width="80%" class="switch_sw$content[sw] bottom">
                <ul style="margin-left: 0px">
-               <li style="white-space: normal">{--ADMIN_TASK_SUBJECT--}: <strong>$content[subject]</strong></li>
-               $content[add]
-               <li style="white-space: normal">{--ADMIN_TASK_TEXT--}: $content[text]</li>
-               <li style="white-space: normal"><div style="text-align: right"><a href="#ext_$content[extension]">{--TOP--}</a></div></li>
-               <li style="white-space: normal">{--ADMIN_TASK_CREATED--}: <strong>$content[created]</strong></li>
+                       <li style="white-space: normal">{--ADMIN_TASK_SUBJECT--}: <strong>$content[subject]</strong></li>
+                       $content[add]
+                       <li style="white-space: normal">{--ADMIN_TASK_TEXT--}: $content[text]</li>
+                       <li style="white-space: normal"><div style="text-align: right"><a href="#ext_$content[extension]">{--TOP--}</a></div></li>
+                       <li style="white-space: normal">{--ADMIN_TASK_CREATED--}: <strong>$content[created]</strong></li>
                </ul>
        </td>
        <td width="20%" class="switch_sw$content[sw] bottom" align="right" valign="top" style="padding-top: 40px">
index fc5df4b8c212998fd0b7b67dc3997ba6cfb972c5..3bcbff7e77540a1e8ff0aadd959617f0d1e8fa95 100644 (file)
@@ -3,7 +3,7 @@
 <table border="0" cellspacing="0" cellpadding="0" class="guest_login dashed" width="480">
        <tr>
                <td colspan="4" align="center" class="guest_login_header">
-                       <strong>{--GUEST_WELCOME_MEMBER--}</strong>
+                       <strong>{--GUEST_LOGIN_MEMBER--}</strong>
                </td>
        </tr>
        <tr>
index f72c77b45606104e382080d40ea6218353000ca0..b32915f947a5239538849cfdccf0f54ccdf37112 100644 (file)
@@ -3,7 +3,7 @@
 <table border="0" cellspacing="0" cellpadding="0" class="guest_login dashed" width="540">
        <tr>
                <td colspan="4" class="guest_login_header">
-                       <strong>{--GUEST_WELCOME_MEMBER--}</strong>
+                       <strong>{--GUEST_LOGIN_MEMBER--}</strong>
                </td>
        </tr>
        <tr>
diff --git a/templates/de/html/member/member_mydata_locked.tpl b/templates/de/html/member/member_mydata_locked.tpl
deleted file mode 100644 (file)
index 11f5d85..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<!-- @DEPRECATED //-->
index 92d3a58e7b3527db2b7cc0624ccfcbe3823c87d7..85f19152931655855f9e4593638c54e1255bce65 100644 (file)
--- a/view.php
+++ b/view.php
@@ -54,17 +54,17 @@ if (((isGetRequestElementSet('user')) || (isGetRequestElementSet('reseller'))) &
        // Do we have the banner?
        if (SQL_NUMROWS($result) == 1)  {
                // Load the URL
-               list($url) = SQL_FETCHROW($result);
+               $data = SQL_FETCHARRAY($result);
 
                // Update counter
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1",
                        array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__);
 
                // Set header and ...
-               setContentType('image/' . substr($url, -3, 3));
+               setContentType('image/' . substr($data['url'], -3, 3));
 
                // Redirect
-               redirectToUrl($url, false);
+               redirectToUrl($data['url'], false);
        } else {
                // @TODO No banner found, output some default banner
                logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestElement('banner')) . ' not dound.');