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 b14fa00..92b973f 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 e477d96..828cff5 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 7e4750f..2f1aedc 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 4ee0cb0..a8223aa 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 95190ff..17de9f1 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 b7e8169..e86fd73 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 50455b0..3f211dc 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 ab53b70..735e6dd 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 e1ccca5..e26f462 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 733922c..7b8b8b9 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 91cbff0..a53cb55 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 8cc35e4..b3c4142 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 cc3c83d..41789fd 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 d7cc03e..54853e7 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 e8a1323..8dbe1a8 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 0de23e3..21dc3ed 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 28e06c5..0017c13 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 a3ff638..c10b637 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 6596fa7..fc319fc 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 eeb77ef..6cfcc35 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 ebac809..d353725 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 b9a0eb0..90de948 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 f19ba49..04ae227 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 235b287..7ba818d 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 187005f..0017198 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 6aaba4c..190278c 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 be22e94..7051460 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 bdc32fa..874bb68 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 60a9d02..6a1116e 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 af551a1..72b6b2e 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 5181e87..03bc643 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 f7a34e0..6d0870a 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 55cbbb9..fda58af 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 4953a1d..e173bad 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 65eb293..17f7b9c 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 29f15fd..7d58b8e 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 cd86573..84f3716 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 4c6a4b2..8238c70 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 96e3999..bb87b1a 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 7606738..7ef4e61 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 95705bc..5b2bca1 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 0d9b52f..fb8fd95 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 d837789..8a0ede3 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 6e37a97..5107b39 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 7b016bf..fb6c7aa 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 e1a87b4..19c484a 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 8a1bb92..034c3b5 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 7612590..0fc8b60 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 97aab22..ac2747e 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 4266e3e..0b8b56b 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 a86d41e..0696321 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 56e36a0..de04b2d 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 cb1b68f..1875df6 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 5b5d015..96b8cfd 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 05c5f93..91d31bc 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 d2605ec..fe79655 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 5f8cef9..b75664a 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 d2d3605..fa48e37 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 8a624fa..cc6a5e6 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 e0bfa4f..9669af5 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 4a5c93c..504c395 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 d67a7bc..e752aae 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 092bd1f..c455bba 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 dece007..c45ffde 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 6b1e9e0..fa9f1b1 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 629cd10..e85fcc7 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 31ded21..3e21f3e 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 3546473..14e42f3 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 51657ac..323813c 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 b50b650..ec1055e 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 308ed2f..8b668b6 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 cc60003..58cf490 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 ecd2457..b70e3ac 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 69c19b7..19468dc 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 41daad9..4917d69 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 83f30c8..f10de48 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 1f6fd0d..2c6d171 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 1e53c99..2ae26ae 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 f495c7a..4ebd29f 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 9cb5f68..8dd04d8 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 a6e2d3c..726a7f9 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 66474e6..b6cd58a 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 d34b7ef..c734d38 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 2452427..1d08588 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 a331e22..bc1611b 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 680c759..5c3c320 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 0db3130..c01d2ac 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 784c9cc..85ed036 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 6aeae8a..7d00683 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 f87ef50..b4e22c8 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 3ea041b..e47bea6 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