]> git.mxchange.org Git - mailer.git/commitdiff
A lot fixes to templates and missing functions added, more rewrites
authorRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 03:59:43 +0000 (03:59 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 03:59:43 +0000 (03:59 +0000)
162 files changed:
inc/config-functions.php
inc/config.php
inc/db/lib-mysql3.php
inc/extensions/ext-cache.php
inc/extensions/ext-rewrite.php
inc/filters.php
inc/functions.php
inc/header.php
inc/hooks.php
inc/install-inc.php
inc/language/de.php
inc/language/install_de.php
inc/language/sponsor_de.php
inc/libs/admins_functions.php
inc/libs/autopurge_functions.php
inc/libs/beg_functions.php
inc/libs/bonus_functions.php
inc/libs/booking_functions.php
inc/libs/cache_functions.php
inc/libs/country_functions.php
inc/libs/doubler_functions.php
inc/libs/holiday_functions.php
inc/libs/html_mail_functions.php
inc/libs/mediadata_functions.php
inc/libs/nickname_functions.php
inc/libs/online_functions.php
inc/libs/optimize_functions.php
inc/libs/payout_functions.php
inc/libs/rallye_functions.php
inc/libs/refback_functions.php
inc/libs/register_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/libs/theme_functions.php
inc/libs/transfer_functions.php
inc/libs/user_functions.php
inc/libs/wernis_functions.php
inc/libs/yoomedia_functions.php
inc/modules/admin.php
inc/modules/admin/action-
inc/modules/admin/action-admins.php
inc/modules/admin/action-bank.php
inc/modules/admin/action-country.php
inc/modules/admin/action-doubler.php
inc/modules/admin/action-email.php
inc/modules/admin/action-holiday.php
inc/modules/admin/action-login.php
inc/modules/admin/action-menu.php
inc/modules/admin/action-misc.php
inc/modules/admin/action-mods.php
inc/modules/admin/action-newsletter.php
inc/modules/admin/action-payouts.php
inc/modules/admin/action-primera.php
inc/modules/admin/action-rallye.php
inc/modules/admin/action-repair.php
inc/modules/admin/action-setup.php
inc/modules/admin/action-sponsor.php
inc/modules/admin/action-stats.php
inc/modules/admin/action-surfbar.php
inc/modules/admin/action-task.php
inc/modules/admin/action-theme.php
inc/modules/admin/action-transfer.php
inc/modules/admin/action-user.php
inc/modules/admin/action-wernis.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_yoomedia.php
inc/modules/admin/what-del_task.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-list_links.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-send_bonus.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/modules/guest/action-
inc/modules/guest/action-admin.php
inc/modules/guest/action-main.php
inc/modules/guest/action-members.php
inc/modules/guest/action-sponsor.php
inc/modules/guest/action-themes.php
inc/modules/guest/what-active.php
inc/modules/guest/what-beg.php
inc/modules/guest/what-doubler.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-rallyes.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_agb.php
inc/modules/guest/what-sponsor_infos.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/guest/what-top10.php
inc/modules/guest/what-wernis_portal.php
inc/modules/member/action-
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/action-themes.php
inc/modules/member/what-bank_create.php
inc/modules/member/what-bank_deposit.php
inc/modules/member/what-bank_infos.php
inc/modules/member/what-bank_output.php
inc/modules/member/what-bank_withdraw.php
inc/modules/member/what-beg.php
inc/modules/member/what-beg2.php
inc/modules/member/what-bonus.php
inc/modules/member/what-doubler.php
inc/modules/member/what-holiday.php
inc/modules/member/what-html_mail.php
inc/modules/member/what-mydata.php
inc/modules/member/what-newsletter.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-sponsor.php
inc/modules/member/what-support.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-surfbar_start.php
inc/modules/member/what-surfbar_stats.php
inc/modules/member/what-themes.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/modules/sponsor.php
inc/modules/sponsor/.php
inc/modules/sponsor/account.php
inc/modules/sponsor/settings.php
inc/modules/sponsor/welcome.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/request-functions.php
install.php
mailid_top.php
modules.php
ref.php
templates/de/html/admin/admin_add_sponsor.tpl
templates/de/html/admin/admin_config_birthday.tpl
templates/de/html/admin/admin_config_bonus.tpl
templates/de/html/admin/admin_edit_sponsor_edit.tpl
templates/de/html/admin/admin_list_beg.tpl
templates/de/html/admin/admin_list_rallye_usr.tpl
templates/de/html/admin/admin_list_refs2.tpl
templates/de/html/admin/admin_list_sponsor.tpl
templates/de/html/admin/admin_payout_add_new.tpl
templates/de/html/admin/admin_send_bonus_select.tpl
templates/de/html/admin/admin_unlock_emails_row.tpl
templates/de/html/admin/admin_welcome.tpl

index cde1fa35c3e96e574ae0d41aa0a05581fa7b8f38..49d99272cc6e68dd26a44a7ed3972c334135f944 100644 (file)
@@ -89,5 +89,13 @@ function incrementConfigEntry ($configEntry, $value=1) {
        }
 }
 
+// Checks wether the configuration array is set so the config is loaded
+function isConfigLoaded () {
+       global $_CONFIG;
+
+       // Check all
+       return ((isset($_CONFIG)) && (is_array($_CONFIG)) && (count($_CONFIG) > 0));
+}
+
 // [EOF]
 ?>
index 4cfa57bbbf36aee8a0d990951e82ed04981c2783..963738bfcbe3508a7beb209ea3e2e31609500a2b 100644 (file)
@@ -99,10 +99,10 @@ define('PATH', $PATH);
 define('WEBMASTER', "you@some-hoster.tld.invalid");
 
 // CFG: INSTALLED
-define('mxchange_installed', false);
+define('mxchange_installed', true);
 
 // CFG: ADMIN-SETUP
-define('admin_registered', false);
+define('admin_registered', true);
 
 // CFG: FRAMESET
 define('frameset_active', false);
@@ -130,11 +130,11 @@ $MySQL = array(
        // CFG: MYSQL-HOST
        'host'     => "localhost",
        // CFG: MYSQL-DBASE
-       'dbase'    => "db",
+       'dbase'    => "mxchange",
        // CFG: MYSQL-LOGIN
-       'login'    => "user",
+       'login'    => "root",
        // CFG: MYSQL-PASSWORD
-       'password' => "pass",
+       'password' => "ab57dk90",
 );
 
 // CFG: MYSQL-PREIFX
@@ -151,7 +151,7 @@ define('LEAD_EXPIRY_TIME' , (30*24*60*60)); // == 30 days
 // CFG: SMTP-HOSTNAME
 define('SMTP_HOSTNAME', "");
 // CFG: SMTP-USER
-define('SMTP_USER'    , "");
+define('SMTP_USER', "");
 // CFG: SMTP-PASSWORD
 define('SMTP_PASSWORD', "");
 
index deddd149030a674c597fe253c678c79ec69c5cbb..24e0edbb1e4ba537c05092a8841e9f93c28af0fe 100644 (file)
@@ -54,7 +54,7 @@ function SQL_QUERY ($sql_string, $F, $L) {
        // Run SQL command
        //* DEBUG: */ echo $sql_string."<br />\n";
        $result = mysql_query($sql_string, SQL_GET_LINK())
-        or addFatalMessage($F." (".$L."):".mysql_error()."<br />
+        or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."<br />
 Query string:<br />
 ".$sql_string);
 
@@ -180,7 +180,7 @@ function SQL_RESULT ($res, $row, $field) {
 // SQL connect
 function SQL_CONNECT ($host, $login, $password, $F, $L) {
        // Try to connect
-       $connect = mysql_connect($host, $login, $password) or addFatalMessage($F." (".$L."):".mysql_error());
+       $connect = mysql_connect($host, $login, $password) or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error());
 
        // Set the link resource
        SQL_SET_LINK($connect);
@@ -192,7 +192,7 @@ function SQL_SELECT_DB ($dbName, $F, $L) {
        if (!SQL_IS_LINK_UP()) return false;
 
        // Return the result
-       return mysql_select_db($dbName, SQL_GET_LINK()) or addFatalMessage($F." (".$L."):".mysql_error());
+       return mysql_select_db($dbName, SQL_GET_LINK()) or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error());
 }
 
 // SQL close link
@@ -213,7 +213,7 @@ function SQL_CLOSE ($F, $L) {
        } // END - if
 
        // Close database link and forget the link
-       $close = mysql_close(SQL_GET_LINK()) or addFatalMessage($F." (".$L."):".mysql_error());
+       $close = mysql_close(SQL_GET_LINK()) or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error());
 
        // Close link
        SQL_SET_LINK(null);
index 5f7a2d412beaad44aca637f0ea3cecf0f74fcf0a..6833326e500490d2fddcbc690488ccd057bd5f93 100644 (file)
@@ -248,7 +248,7 @@ default: // Do stuff when extension is loaded
                $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), constant('PATH')."inc/".getConfig('cache_path'), getConfig('cache_tested'));
                if ($GLOBALS['cache_instance']->getStatus() != "done") {
                        // Failed to initialize cache sustem
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
+                       addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
                } // END - if
        } // END - if
        break;
index 89f17b04ec14bfa0e6b09407e4fe19a6f0109e17..3670d924a1a6ca0a9a5f63cde16df11757018287 100644 (file)
@@ -52,7 +52,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
        // Check if mod_rewrite is loadeded
        if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){
                $EXT_REPORTS_FAILURE = true;
-               addFatalMessage(MOD_REWRITE_ERROR);
+               addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
        } // END - if
 
        // SQL commands to run
@@ -69,7 +69,7 @@ case "activate": // Do stuff when admin activates this extension
        if (!IF_APACHE_MODULE_LOADED('mod_rewrite')) {
                SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__);
                $EXT_REPORTS_FAILURE = true;
-               addFatalMessage(MOD_REWRITE_ERROR);
+               addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
         } // END - if
 
        // SQL commands to run
@@ -148,7 +148,7 @@ case "update": // Update an extension
                // Check if mod_rewrite is loadeded
                if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){
                        $EXT_REPORTS_FAILURE = true;
-                       //addFatalMessage(MOD_REWRITE_ERROR);
+                       //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
                } // END - if
                $UPDATE_NOTES = "Es wird beim Registrieren und aktivieren gepr&uuml;ft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen.";
                break;
@@ -163,7 +163,7 @@ default: // Do stuff when extension is loaded
        if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){
                $EXT_REPORTS_FAILURE = true;
                SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__);
-               if (!IS_ADMIN())addFatalMessage(MOD_REWRITE_ERROR);
+               if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
         } // END - if
        break;
 }
index 64de90acd5085ad54d94acc9ac8b202b1d983f42..8cdf48783328dfbaa2dd42682105ff8877cda7c4 100644 (file)
@@ -42,7 +42,7 @@ function INIT_FILTER_SYSTEM () {
        // Is the filter already initialized?
        if ((isset($GLOBALS['filters']['chains'])) && (is_array($GLOBALS['filters']['chains']))) {
                // Then abort here
-               addFatalMessage(getMessage('FILTER_FAILED_ALREADY_INIT'));
+               addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_ALREADY_INIT'));
                return false;
        } // END - if
 
@@ -140,7 +140,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo
        if ((isset($GLOBALS['filters']['chains'][$filterName][$filterFunction])) && (!$force)) {
                // Then abort here
                if (!$silentAbort) {
-                       addFatalMessage(getMessage('FILTER_FAILED_ALREADY_ADDED'), array($filterFunction, $filterName));
+                       addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_ALREADY_ADDED'), array($filterFunction, $filterName));
                } // END - if
 
                // Abort here
@@ -150,7 +150,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo
        // Is the function there?
        if (!function_exists($filterFunction)) {
                // Then abort here
-               addFatalMessage(getMessage('FILTER_FAILED_NOT_FOUND'), array($filterFunction, $filterName));
+               addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_FOUND'), array($filterFunction, $filterName));
                return false;
        } // END - if
 
@@ -172,7 +172,7 @@ function UNREGISTER_FILTER ($filterName, $filterFunction, $force = false, $dry_r
        // Is that filter there?
        if ((!isset($GLOBALS['filters']['chains'][$filterName][$filterFunction])) && (!$force)) {
                // Not found, so abort here
-               addFatalMessage(getMessage('FILTER_FAILED_NOT_REMOVED'), array($filterFunction, $filterName));
+               addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_REMOVED'), array($filterFunction, $filterName));
                return false;
        } // END - if
 
@@ -191,7 +191,7 @@ function RUN_FILTER ($filterName, $data = null, $silentAbort = true) {
                // Then abort here (quick'N'dirty hack)
                if ((!$silentAbort) && (defined('FILTER_FAILED_NO_FILTER_FOUND'))) {
                        // Add fatal message
-                       addFatalMessage(getMessage('FILTER_FAILED_NO_FILTER_FOUND'), $filterName);
+                       addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NO_FILTER_FOUND'), $filterName);
                } // END - if
 
                // Abort here
@@ -243,7 +243,7 @@ function FILTER_FLUSH_FILTERS () {
        // Is a database link here and not in installation mode?
        if ((!SQL_IS_LINK_UP()) && (!isInstalling())) {
                // Abort here
-               addFatalMessage(getMessage('FILTER_FLUSH_FAILED_NO_DATABASE'));
+               addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FLUSH_FAILED_NO_DATABASE'));
                return false;
        } // END - if
 
index d9e2c4ad7c7912bbfaf8d924b2c5b332cf456ee4..8bfa1eaac3406275edad455e48464c0920bbbd03 100644 (file)
@@ -48,7 +48,7 @@ function IS_INC_WRITEABLE($inc) {
        } // END - if
 
        // Test if we can append data
-       $fp = @fopen($fqfn, 'a');
+       $fp = fopen($fqfn, 'a');
        if ($inc == "dummy") {
                // Remove dummy file
                fclose($fp);
@@ -194,7 +194,7 @@ function getFatalArray () {
 }
 
 // Add a fatal error message to the queue array
-function addFatalMessage ($message, $extra="") {
+function addFatalMessage ($F, $L, $message, $extra="") {
        if (is_array($extra)) {
                // Multiple extras for a message with masks
                $message = call_user_func_array('sprintf', $extra);
@@ -207,7 +207,7 @@ function addFatalMessage ($message, $extra="") {
        $GLOBALS['fatal_messages'][] = $message;
 
        // Log fatal messages away
-       DEBUG_LOG(__FUNCTION__, __LINE__, " message={$message}");
+       DEBUG_LOG($F, $L, " message={$message}");
 }
 
 // Getter for total fatal message count
@@ -249,7 +249,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
        if ($template == "member_support_form") {
                // Support request of a member
                $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array($GLOBALS['userid']), __FILE__, __LINE__);
+                       array($GLOBALS['userid']), __FUNCTION__, __LINE__);
 
                // Is content an array?
                if (is_array($content)) {
@@ -404,7 +404,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML = "N", $FROM = "") {
                        return;
                } else {
                        // Load email address
-                       $result_email = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__);
+                       $result_email = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FUNCTION__, __LINE__);
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result_email)."<br />\n";
 
                        // Does the user exist?
@@ -804,12 +804,12 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />\n";
                        // Load nickname
                        $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval($UID)), __FILE__, __LINE__);
+                               array(bigintval($UID)), __FUNCTION__, __LINE__);
                } else {
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />\n";
                        /// Load normal data
                        $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval($UID)), __FILE__, __LINE__);
+                               array(bigintval($UID)), __FUNCTION__, __LINE__);
                }
 
                // Fetch and merge data
@@ -925,7 +925,7 @@ function LOAD_URL ($URL, $addUrlData=true) {
 
        // Get output buffer
        //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
-       DEBUG_LOG(__FUNCTION__, __LINE__, $URL);
+       //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, $URL);
        $OUTPUT = ob_get_contents();
 
        // Clear it only if there is content
@@ -1601,11 +1601,11 @@ function SEND_ADMIN_EMAILS_PRO ($subj, $template, $content, $UID) {
 
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT DISTINCT admin_id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY admin_id",
-               array($template), __FILE__, __LINE__);
+               array($template), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Create new entry (to all admins)
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES (0, '%s')",
-                       array($template), __FILE__, __LINE__);
+                       array($template), __FUNCTION__, __LINE__);
        } else {
                // Load admin IDs...
                $aids = array();
@@ -1635,10 +1635,10 @@ function SEND_ADMIN_EMAILS_PRO ($subj, $template, $content, $UID) {
                        }
                } elseif ($aid == "0") {
                        // Select all email adresses
-                       $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`", __FILE__, __LINE__);
+                       $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`", __FUNCTION__, __LINE__);
                } else {
                        // If Admin-ID is not "to-all" select
-                       $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE id IN (%s) ORDER BY `id`", array($aid), __FILE__, __LINE__);
+                       $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE id IN (%s) ORDER BY `id`", array($aid), __FUNCTION__, __LINE__);
                }
        }
 
@@ -2429,7 +2429,7 @@ function THEME_GET_ID ($name) {
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
-                       array($name), __FILE__, __LINE__);
+                       array($name), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -2620,7 +2620,7 @@ function debug_get_printable_backtrace () {
        // Get and prepare backtrace for output
        $backtraceArray = debug_backtrace();
        foreach ($backtraceArray as $key => $trace) {
-               if (!isset($trace['file'])) $trace['file'] = __FILE__;
+               if (!isset($trace['file'])) $trace['file'] = __FUNCTION__;
                if (!isset($trace['line'])) $trace['line'] = __LINE__;
                if (!isset($trace['args'])) $trace['args'] = array();
                $backtrace .= "<li class=\"debug_list\"><span class=\"backtrace_file\">".basename($trace['file'])."</span>:".$trace['line'].", <span class=\"backtrace_function\">".$trace['function']."(".count($trace['args']).")</span></li>\n";
@@ -2715,7 +2715,7 @@ function REDIRCT_ON_UNINSTALLED_EXTENSION ($ext_name) {
 // Generate a "link" for the given admin id (aid)
 function GENERATE_AID_LINK ($aid) {
        // No assigned admin is default
-       $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
+       $admin = "<span class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>";
 
        // Zero? = Not assigned
        if ($aid == "0") {
@@ -2882,12 +2882,12 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
                $tmp = $FQFN.".tmp";
 
                // Open the source file
-               $fp = @fopen($FQFN, 'r') or OUTPUT_HTML("<strong>READ:</strong> ".$FQFN."<br />");
+               $fp = fopen($FQFN, 'r') or OUTPUT_HTML("<strong>READ:</strong> ".$FQFN."<br />");
 
                // Is the resource valid?
                if (is_resource($fp)) {
                        // Open temporary file
-                       $fp_tmp = @fopen($tmp, 'w') or OUTPUT_HTML("<strong>WRITE:</strong> ".$tmp."<br />");
+                       $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML("<strong>WRITE:</strong> ".$tmp."<br />");
 
                        // Is the resource again valid?
                        if (is_resource($fp_tmp)) {
@@ -2922,8 +2922,8 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
 
                        if (($done) && ($found)) {
                                // Copy back tmp file and delete tmp :-)
-                               @copy($tmp, $FQFN);
-                               @unlink($tmp);
+                               copy($tmp, $FQFN);
+                               return unlink($tmp);
                        } elseif (!$found) {
                                OUTPUT_HTML("<strong>CHANGE:</strong> 404!");
                        } else {
@@ -2934,6 +2934,9 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
                // File not found, not readable or writeable
                OUTPUT_HTML("<strong>404:</strong> ".$FQFN."<br />");
        }
+
+       // An error was detected!
+       return false;
 }
 // Send notification to admin
 function SEND_ADMIN_NOTIFICATION($subject, $templateName, $content=array(), $uid="0") {
index 226c9918cd4eceb973edfc88402c1a80cfa19b8e..a57016954a938722aff8255568e68ce895b673f1 100644 (file)
@@ -49,7 +49,7 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) {
                // Add title decorations? (left)
                if (!defined('__PAGE_TITLE')) {
                        // Config and database connection valid?
-                       if ((isset($_CONFIG)) && (is_array($_CONFIG)) && (count($_CONFIG) > 1) && (SQL_IS_LINK_UP())) {
+                       if ((isConfigLoaded()) && (SQL_IS_LINK_UP())) {
                                // Title decoration enabled?
                                if ((getConfig('enable_title_deco') == "Y") && (getConfig('title_left') != "")) $TITLE .= trim(getConfig('title_left'))." ";
 
@@ -78,16 +78,16 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) {
                                define('__PAGE_TITLE', $TITLE);
                        } elseif ((!isInstalled()) || (!isAdminRegistered())) {
                                // Load language here
-                               LOAD_INC_ONCE("inc/language.php");
+                               LOAD_INC_ONCE("inc/language/install_".GET_LANGUAGE().".php");
 
                                // Installation mode
-                               define('__PAGE_TITLE', getMessage('INSTALLATION_OF_MXCHANGE'));
+                               define('__PAGE_TITLE', sprintf(getMessage('INSTALLATION_OF_MXCHANGE'), constant('MAIN_TITLE')));
                        } else {
                                // Configuration not found!
                                define('__PAGE_TITLE', getMessage('NO_CONFIG_FOUND_TITLE'));
 
                                // Do not add the fatal message in installation mode
-                               if (basename($_SERVER['PHP_SELF']) != "install.php") addFatalMessage(getMessage('NO_CONFIG_FOUND'));
+                               if (basename($_SERVER['PHP_SELF']) != "install.php") addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND'));
                        }
                } // END - if
 
index 592c24d5dd687e7d6897b622e436bd1a0efa3170..48d9e1009bbe0b5c73f5246e2553c3964da6805d 100644 (file)
@@ -47,7 +47,7 @@ function __SHUTDOWN_HOOK () {
                SQL_CLOSE(__FILE__, __LINE__);
        } elseif (!isInstalling()) {
                // No database link
-               addFatalMessage(getMessage('NO_DB_LINK_SHUTDOWN'));
+               addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN'));
        }
 }
 
index b7ed234cead10c4d914507e34195fe4fc282f712..fd5572b0331c83bc458a3fb2c796b0a9652b6034 100644 (file)
@@ -297,7 +297,7 @@ if ((!isInstalled()) || (!isAdminRegistered()))
                                                // Are some SQLs found?
                                                if (count($SQLs) == 0) {
                                                        // Abort here
-                                                       addFatalMessage(getMessage('INSTALL_SQL_IMPORT_FAILED'));
+                                                       addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
                                                        return;
                                                } // END - if
 
@@ -334,7 +334,7 @@ if ((!isInstalled()) || (!isAdminRegistered()))
                                                changeDataInFile(REQUEST_POST('spath')."inc/config.php", "INSTALLED", "define('mxchange_installed', ", ");", "true", 0);
                                        } else {
                                                // Installation area not found!
-                                               addFatalMessage(getMessage('INSTALL_MISSING_DUMPS'));
+                                               addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
                                        }
                                } // END - if
                        } // END - if
@@ -368,7 +368,7 @@ if ((!isInstalled()) || (!isAdminRegistered()))
                        LOAD_TEMPLATE("install_finished");
                } else {
                        // Something goes wrong during installation! :-(
-                       addFatalMessage(getMessage('INSTALL_FINALIZER_FAILED'));
+                       addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED'));
                        LOAD_INC("inc/fatal_errors.php");
                }
                break;
@@ -380,7 +380,7 @@ if ((!isInstalled()) || (!isAdminRegistered()))
        }
 } else {
        // Already installed!
-       addFatalMessage(getMessage('ALREADY_INSTALLED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED'));
 }
 
 //
index eb063ea9a84713a7897780cfa44e3ff659490082..6e2c3c3d1beefb1bc376faa7231bfce5bdaf0aa7 100644 (file)
@@ -315,8 +315,7 @@ define('LIFE_MONTHS', "Monat(e)");
 define('LIFE_YEARS', "Jahr(e)");
 define('LANG_MEM_ONLY_1', "Auf das ausgew&auml;hlte Modul <u>");
 define('LANG_MEM_ONLY_2', "</u> d&uuml;rfen nur eingeloggte Mitglieder zugreifen!");
-define('MEMBER_404_ACTION_1', "Das Mitgliedsaktionsmodul <u>");
-define('MEMBER_404_ACTION_2', "</u> ist nicht auffindbar!");
+define('MEMBER_404_ACTION', "Das Mitgliedsaktionsmodul <u>%s</u> ist nicht auffindbar!");
 define('_GUEST', "Gast");
 define('_UNKNOWN', "Name ist nicht ladbar");
 define('_ADMIN', "Administrator");
index c171e777b0ba67dcc9a92ec93feec9fe1e3a313c..c663fc67ccbc27eaf35ec17fc1ef81b7fcac09de 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Language definitions
-define('INSTALLATION_OF_MXCHANGE', "Installation von MXChange-{!MT_WORD!}-Script");
+define('INSTALLATION_OF_MXCHANGE', "Installation von MXChange-{!MT_WORD!}-Script - %s");
 define('INSTALL_MISSING_DUMPS', "Die SQL-Dumps wurden nicht gefunden! Diese sollten auch mit hochgeladen werden und lesbar sein (CHMOD 644).");
 define('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.");
 define('WRONG_PAGE', "Sie oder dieses Script haben eine falsche Seite ausgew&auml;hlt!");
index 694fe3742bc421acc8f180943b7435a864f6bca1..0dac5d6dde2690f958abc974cb4cc1783bc0fa66 100644 (file)
@@ -200,8 +200,8 @@ define('ADMIN_LIST_SPONSOR_ORDERS', "Bestellungen bearbeiten");
 
 // Subject lines
 define('SPONSOR_UNLOCKED_SUBJ', "HINWEIS: Freischaltung Ihres Sponsorenaccounts");
-define('ADMIN_SPONSOR_ADD_POINTS', "HINWEIS: Gutschrift durch den Admin!");
-define('ADMIN_SPONSOR_SUB_POINTS', "HINWEIS: Abzug durch den Admin!");
+define('ADMIN_SPONSOR_ADD_POINTS_SUBJ', "HINWEIS: Gutschrift durch den Admin!");
+define('ADMIN_SPONSOR_SUB_POINTS_SUBJ', "HINWEIS: Abzug durch den Admin!");
 define('SPONSOR_SUBJECT_LOCKED', "HINWEIS: Sperrung Ihres Sponsorenaccounts!");
 define('SPONSOR_SUBJECT_UNLOCKED', "HINWEIS: Freigabe Ihres Sponsorenaccounts!");
 define('ADMIN_SPONSOR_EDIT_SUBJECT', "HINWEIS: Sponsorenaccount ge&auml;ndert durch Admin!");
index 71e179e00e7c052c8896e2309ac183ae252b80fc..0a5c58363e269f7c1517c009999239f44fbcac50 100644 (file)
@@ -106,11 +106,11 @@ function ADMINS_CHECK_ACL($act, $wht) {
                {
                        // Main menu
                        $result = SQL_QUERY_ESC("SELECT access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' LIMIT 1",
-                        array(bigintval($aid), $act), __FILE__, __LINE__);
+                        array(bigintval($aid), $act), __FUNCTION__, __LINE__);
                } elseif (!empty($wht)) {
                        // Sub menu
                        $result = SQL_QUERY_ESC("SELECT access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND what_menu='%s' LIMIT 1",
-                        array(bigintval($aid), $wht), __FILE__, __LINE__);
+                        array(bigintval($aid), $wht), __FUNCTION__, __LINE__);
                }
 
                // Get number of lines
@@ -137,7 +137,7 @@ function ADMINS_CREATE_EMAIL_LINK ($email, $mod="admin") {
                $result = SQL_QUERY_ESC("SELECT id
 FROM `{!_MYSQL_PREFIX!}_admins`
 WHERE email='%s'".$locked." LIMIT 1",
- array($email), __FILE__, __LINE__);
+ array($email), __FUNCTION__, __LINE__);
 
                // Is there an entry?
                if (SQL_NUMROWS($result) == 1) {
@@ -217,7 +217,7 @@ WHERE id=%s LIMIT 1",
                                                $POST['mode'][$id],
                                                $POST['la_mode'][$id],
                                                $id
-                                       ), __FILE__, __LINE__);
+                                       ), __FUNCTION__, __LINE__);
                        } else {
                                // Do not allow it here
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET
@@ -230,7 +230,7 @@ WHERE id=%s LIMIT 1",
                                                $POST['email'][$id],
                                                $POST['la_mode'][$id],
                                                $id
-                                       ), __FILE__, __LINE__);
+                                       ), __FUNCTION__, __LINE__);
                        }
 
                        // Purge cache
@@ -266,7 +266,7 @@ function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) {
 
                // 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), __FILE__, __LINE__);
+                       array($id), __FUNCTION__, __LINE__);
                if ((SQL_NUMROWS($result) == 1) && ($sel == 1)) {
                        // Entry found
                        $content = SQL_FETCHARRAY($result);
@@ -300,7 +300,7 @@ function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) {
 // Delete given admin accounts
 function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) {
        // Check if this account is the last one which cannot be deleted...
-       $result_main = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_admins`", __FILE__, __LINE__);
+       $result_main = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_admins`", __FUNCTION__, __LINE__);
        $accounts = SQL_NUMROWS($result_main);
        SQL_FREERESULT($result_main);
        if ($accounts > 1) {
@@ -312,7 +312,7 @@ function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) {
 
                        // 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), __FILE__, __LINE__);
+                        array($id), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found
                                $content = SQL_FETCHARRAY($result);
@@ -351,11 +351,11 @@ function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) {
                if (($del == 1) && (GET_CURRENT_ADMIN_ID() != $id)) {
                        // Rewrite his tasks to all admins
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET assigned_admin=0 WHERE assigned_admin=%s",
-                        array($id), __FILE__, __LINE__);
+                        array($id), __FUNCTION__, __LINE__);
 
                        // Remove account
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1",
-                               array($id), __FILE__, __LINE__);
+                               array($id), __FUNCTION__, __LINE__);
 
                        // Purge cache
                        CACHE_PURGE_ADMIN_MENU($id);
@@ -370,7 +370,7 @@ function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) {
 // List all admin accounts
 function ADMINS_LIST_ADMIN_ACCOUNTS() {
        // Select all admin accounts
-       $result = SQL_QUERY("SELECT id, login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY login ASC", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT id, login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY login ASC", __FUNCTION__, __LINE__);
        $SW = 2; $OUT = "";
        while ($content = SQL_FETCHARRAY($result)) {
                // Compile some variables
index e7c1b667a8913c0348e2e28364579fbca7b63ff0..71fec0aa33b6023a2438fdcedd0f0a3b05d06d61 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 function AUTOPURGE_ADD_POINTS($uid, $points) {
        // Check if he has locked points or not
        $result = SQL_QUERY_ESC("SELECT ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
        list($payout) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
 
@@ -61,7 +61,7 @@ function AUTOPURGE_ADD_POINTS($uid, $points) {
        } else {
                // .. to user's account
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
-                       array($target, $target, $points, bigintval($uid)), __FILE__, __LINE__);
+                       array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__);
 
                // Update mediadata as well
                if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($target == "points")) {
index 31cbc83d2d0fe8622268730e7a564e1632ff12db..8803990fd094ccf2f73ce15c36f38d3335044491 100644 (file)
@@ -47,7 +47,7 @@ function BEG_ADD_POINTS ($uid, $points) {
        if (getConfig('beg_rallye') == "Y") {
                // Add points to rallye account
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1",
-                       array($points, $uid), __FILE__, __LINE__);
+                       array($points, $uid), __FUNCTION__, __LINE__);
        } else {
                // Add points to account
                unset($GLOBALS['ref_level']);
index f97467bf1bc37c71e0cec5d5fecb1215045ec220..058770d3252916309fc60051333caa557b2a3d63 100644 (file)
@@ -71,7 +71,7 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
 
        // Check for entry
        $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM  `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE userid=%s AND %s=%s LIMIT 1",
-               array($uid, $column, $mid), __FILE__, __LINE__);
+               array($uid, $column, $mid), __FUNCTION__, __LINE__);
 
        // Load clicks from table as current rank
        list($rank) = SQL_FETCHROW($result);
@@ -100,11 +100,11 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
 
        // Add points to his account directly
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
-               array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Rember this whole data for displaying ranking list
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus_turbo` (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())",
-               array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FILE__, __LINE__);
+               array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FUNCTION__, __LINE__);
 
        if ((GET_EXT_VERSION("bonus") >= "0.3.5") && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
 }
@@ -117,7 +117,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
 
        // Load current user's data
        $result = SQL_QUERY_ESC("SELECT level, points, timemark FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND userid=%s LIMIT 1",
-               array($type, $data, $uid), __FILE__, __LINE__);
+               array($type, $data, $uid), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load data
                list($rank, $points, $mark) = SQL_FETCHROW($result);
@@ -136,7 +136,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
 
        // Load rankings
        $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s ORDER BY level LIMIT %s",
-               array($type, $data, getConfig('bonus_lines')), __FILE__, __LINE__);
+               array($type, $data, getConfig('bonus_lines')), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Start generating the ranking list
                $max = SQL_NUMROWS($result);
@@ -145,7 +145,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
                for ($rank = 1; $rank <= $max; $rank++) {
                        // Load data
                        $result_users = SQL_QUERY_ESC("SELECT userid, points, timemark FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND level=%s LIMIT 1",
-                               array($type, $data, $rank), __FILE__, __LINE__);
+                               array($type, $data, $rank), __FUNCTION__, __LINE__);
 
                        // Nothing found by default
                        $userid = "---"; $points = "---";
@@ -233,7 +233,7 @@ function BONUS_POINTS_HANDLER ($MODE) {
 //
 function BONUS_PURGE_EXPIRED_TURBO_BONUS() {
        // Remove entries
-       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FILE__, __LINE__);
+       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FUNCTION__, __LINE__);
        if (SQL_AFFECTEDROWS() > 0) {
                // Send out email to admin
                SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", SQL_AFFECTEDROWS(), "");
index bb3aac762f669b191edf327e5766669d51263e93..b6289ef40227500593ce043b341a3fd7fe01ddcd 100644 (file)
@@ -48,7 +48,7 @@ function ADD_BOOKING_RECORD ($subject, $uid, $points, $mode) {
 
        // Add record entry here
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)",
-               array($uid, $subject, $mode, $points), __FILE__, __LINE__);
+               array($uid, $subject, $mode, $points), __FUNCTION__, __LINE__);
 }
 
 // [EOF]
index 2ba4bd0a353a9f7b8934e69d777eb2d37bbd90e3..8a766cdaa98ff6a4f5543f6c9c451e508508be1c 100644 (file)
@@ -112,7 +112,7 @@ class CacheSystem {
                        $this->storeExtensionVersion("cache");
                } else {
                        // Cannot create file
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -141,7 +141,7 @@ class CacheSystem {
                        }
                } else {
                        // Cannot create file
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -204,7 +204,7 @@ class CacheSystem {
                        }
                } else {
                        // Cache file not found or not readable
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_LOAD_1.$this->inc.CACHE_CANNOT_LOAD_2);
                }
        }
 
@@ -227,7 +227,7 @@ class CacheSystem {
                                $this->rebuilt[$this->name] = true;
                        } else {
                                // Not removed!
-                               addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2);
+                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->inc.CACHE_CANNOT_UNLINK_2);
                        }
                } // END - if
        }
@@ -258,7 +258,7 @@ class CacheSystem {
                        }
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -282,7 +282,7 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot write array!
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -319,7 +319,7 @@ class CacheSystem {
                        } // END - if
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
@@ -337,7 +337,7 @@ class CacheSystem {
                        //* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />\n";
                } else {
                        // Cannot create file
-                       addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
+                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_PROBLEMS_DETECTED);
                }
        }
 
index 30b1cfec4f6937f0ccf302e95344d3d83c2d8d8c..f802148a0f3492d4cde8aa4a9244005ef53556b6 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 function COUNTRY_GENERATE_INFO ($id) {
        // Load code and description
        $result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE id=%s LIMIT 1",
-               array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
index 4d64435e5106a79037b2d92857e6fe3f478f33bb..01720837be8084dde3ebc6e6afd307d71b730fb3 100644 (file)
@@ -69,7 +69,7 @@ function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") {
 FROM `{!_MYSQL_PREFIX!}_doubler`
 WHERE completed='".$done."' AND is_ref='".$ref."'".$ADD."
 ORDER BY timemark ".$sort."
-LIMIT ".$limit, __FILE__, __LINE__);
+LIMIT ".$limit, __FUNCTION__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // List entries
@@ -122,7 +122,7 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() {
 
        if (getConfig('doubler_jackpot') == "Y") {
                // Load jackpot
-               $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
                list($jackpot) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
index 1e74c62d324b27603ebcc0f0f805e48c9a448161..0f19fee5f3b04d84ae966a61a952c8fc52c10fe0 100644 (file)
@@ -43,19 +43,19 @@ function HOLIDAY_STOP_HOLIDAYS () {
        $result_stop = SQL_QUERY("SELECT userid, holiday_start, holiday_end, comments
 FROM `{!_MYSQL_PREFIX!}_user_holidays`
 WHERE holiday_end <= UNIX_TIMESTAMP()
-ORDER BY userid", __FILE__, __LINE__);
+ORDER BY userid", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_stop) > 0) {
                // We foud at least one
                $admin = "";
                while (list($uid, $start, $end, $comments) = SQL_FETCHROW($result_stop)) {
                        // Stop holiday
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1",
-                               array(bigintval($uid)), __FILE__, __LINE__);
+                               array(bigintval($uid)), __FUNCTION__, __LINE__);
 
                        // Unlock account
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
 SET holiday_active='N', holiday_activated='0'
-WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
+WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__);
 
                        // Prepare array
                        $content = array(
index 236cd6ee6f431ee976165d610a202c1c62f0ca31..ded98b91282d4e4a8d606e28f89c48d001f91dfd 100644 (file)
@@ -48,7 +48,7 @@ function HTML_ADD_VALID_TAGS() {
        return $OUT;
 }
 //
-function HTML_CHECK_TAGS($html {
+function HTML_CHECK_TAGS ($html) {
        $test = stripslashes($html);
        while (ereg("<", $test) && ereg(">", $test)) {
                $check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1));
index 50f921272a629b1feac4b19f67fe275f0e249517..7eeb878e927997f4621cf3e0140723c90f07ba83 100644 (file)
@@ -47,12 +47,12 @@ function MEDIA_UPDATE_ENTRY($keys_array, $mode, $value)
                {
                        // First check if it does exist
                        $result_media = SQL_QUERY_ESC("SELECT media_key FROM `{!_MYSQL_PREFIX!}_mediadata`
-WHERE media_key = '%s' LIMIT 1", array($key), __FILE__, __LINE__);
+WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result_media) == 0)
                        {
                                // Not found so we create it (mode will be ignored here!)
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
-                                       array($key, $value), __FILE__, __LINE__);
+                                       array($key, $value), __FUNCTION__, __LINE__);
                        }
                         else
                        {
@@ -66,13 +66,13 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FILE__, __LINE__);
                                {
                                        // Initialize entry
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mediadata` SET media_value=%s WHERE media_key='%s' LIMIT 1",
-                                               array($value, $key), __FILE__, __LINE__);
+                                               array($value, $key), __FUNCTION__, __LINE__);
                                }
                                 else
                                {
                                        // Update entry
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mediadata` SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
-                                               array($value, $key), __FILE__, __LINE__);
+                                               array($value, $key), __FUNCTION__, __LINE__);
                                }
                        }
                }
@@ -86,7 +86,7 @@ function MEDIA_GET_ENTRY($key)
 
        // Check for entry
        $result = SQL_QUERY_ESC("SELECT media_value FROM `{!_MYSQL_PREFIX!}_mediadata` WHERE media_key='%s' LIMIT 1",
-               array($key), __FILE__, __LINE__);
+               array($key), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load data
                list($value) = SQL_FETCHROW($result);
index 116e35f658fff453198119d4466e729e949ce507..e4922a69f61808e1010e06c1c020aa7720b73217 100644 (file)
@@ -53,7 +53,7 @@ function NICKNAME_IS_ACTIVE ($uidNick) {
                // Search in database
                // @TODO Can we replace this with GET_TOTAL_DATA() ?
                $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s OR nickname='%s' LIMIT 1",
-                       array(bigintval($uidNick), $uidNick), __FILE__, __LINE__);
+                       array(bigintval($uidNick), $uidNick), __FUNCTION__, __LINE__);
 
                // Check existence of nickname
                $ret = (SQL_NUMROWS($result) == 1);
@@ -84,7 +84,7 @@ function NICKNAME_GET_NICK ($userid) {
        } elseif (NICKNAME_IS_ACTIVE($userid)) {
                // Search for non-empty nickname
                $result = SQL_QUERY_ESC("SELECT nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND nickname != '' LIMIT 1",
-                       array(bigintval($userid)), __FILE__, __LINE__);
+                       array(bigintval($userid)), __FUNCTION__, __LINE__);
 
                // Found?
                if (SQL_NUMROWS($result) == 1) {
index 96400dc2b1cfa6fe47533a29d061fa94a9d4d571..2a475b86aadbbe1c094602f152e142546ad4fe72 100644 (file)
@@ -70,7 +70,7 @@ function FILTER_UPDATE_ONLINE_LIST () {
 
        // Now search for the user
        $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_online` WHERE sid='%s' LIMIT 1",
-               array(session_id()), __FILE__, __LINE__);
+               array(session_id()), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -96,7 +96,7 @@ WHERE sid='%s' LIMIT 1",
                                $ADMIN,
                                GET_REMOTE_ADDR(),
                                session_id()
-                       ), __FILE__, __LINE__
+                       ), __FUNCTION__, __LINE__
                );
        } else {
                // No entry does exists so we simply add it!
@@ -111,7 +111,7 @@ WHERE sid='%s' LIMIT 1",
                                $ADMIN,
                                session_id(),
                                GET_REMOTE_ADDR()
-                       ), __FILE__, __LINE__
+                       ), __FUNCTION__, __LINE__
                );
        }
 
@@ -120,7 +120,7 @@ WHERE sid='%s' LIMIT 1",
 
        // Purge old entries
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_online` WHERE timestamp <= (UNIX_TIMESTAMP() - %s)",
-               array(getConfig('online_timeout')), __FILE__, __LINE__);
+               array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
 }
 
 //
index 5c953dd061b2d4b95862af4e6aa38d448610777e..88cd90537cfbec5310aa7a6e60a8b712e7dfc10e 100644 (file)
@@ -46,7 +46,7 @@ function REPAIR_OPTIMIZE_DB()
        $tot_data = 0; $tabs = 0; $opts = 0;
        $tot_idx = 0; $total_gain = 0;
        $tot_all = 0;
-       $result = @SQL_QUERY("SHOW TABLE STATUS FROM ".__DB_NAME, __FILE__, __LINE__);
+       $result = @SQL_QUERY("SHOW TABLE STATUS FROM ".__DB_NAME, __FUNCTION__, __LINE__);
        $tabs = @SQL_NUMROWS($result);
        $ret['total_size'] = 0;
        $ret['total_tabs'] = $tabs;
@@ -66,11 +66,11 @@ function REPAIR_OPTIMIZE_DB()
                        $gain = round ($gain, 3);
 
                        // Repair table
-                       $result1 = SQL_QUERY("REPAIR TABLE ".$row['Name'], __FILE__, __LINE__);
+                       $result1 = SQL_QUERY("REPAIR TABLE ".$row['Name'], __FUNCTION__, __LINE__);
                        $rep = SQL_FETCHARRAY($result1);
 
                        // Optimize table
-                       $result1 = SQL_QUERY("OPTIMIZE TABLE ".$row['Name'], __FILE__, __LINE__);
+                       $result1 = SQL_QUERY("OPTIMIZE TABLE ".$row['Name'], __FUNCTION__, __LINE__);
                        $opt = SQL_FETCHARRAY($result1);
 
                        // Add data to array
@@ -85,10 +85,10 @@ function REPAIR_OPTIMIZE_DB()
        $ret['total_gain'] = $total_gain;
 
        // Insert new row
-       $result = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_optimize_gain` (gain) VALUES ('".$total_gain."')", __FILE__, __LINE__);
+       $result = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_optimize_gain` (gain) VALUES ('".$total_gain."')", __FUNCTION__, __LINE__);
 
        // Get total runs and total optimization count
-       $result = SQL_QUERY("SELECT COUNT(id) AS rows, SUM(gain) AS opti FROM `{!_MYSQL_PREFIX!}_optimize_gain`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT COUNT(id) AS rows, SUM(gain) AS opti FROM `{!_MYSQL_PREFIX!}_optimize_gain`", __FUNCTION__, __LINE__);
        list($total_rows, $total_opti) = SQL_FETCHROW($result);
 
        // Free memory
index 4df56e3a20469b8eeb82fa5b78efcce4c6dcc472..5d886f1f0993d661a62c88f25163ffc0cc3636c0 100644 (file)
@@ -46,7 +46,7 @@ function PAYOUT_OUTPUT_PAYOUT_LIST ($points) {
                $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points
 FROM `{!_MYSQL_PREFIX!}_payout_types`
 WHERE %s >= min_points
-ORDER BY type", array($points), __FILE__, __LINE__);
+ORDER BY type", array($points), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        OUTPUT_HTML("<br /><div align=\"center\">
 <div align=\"center\"><strong>{--PAYOUT_NOW--}:</strong></div><br />
index aa4859a4e11e4af579e86f6420a64193dca288e9..039f36d788934d285cff8e25ccc484bb1810a9ce 100644 (file)
@@ -50,10 +50,10 @@ function RALLYE_AUTOSTART_RALLYES($result)
 
        // Set notified to Y
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET notified='Y' WHERE id=%s LIMIT 1",
-               array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Do a snapshot off all user refs
-       $result_user = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+       $result_user = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY userid", __FUNCTION__, __LINE__);
 
        // Transfer all neccessary data to the global $DATA array
        $DATA['uid_cnt']    = SQL_NUMROWS($result_user);
@@ -92,7 +92,7 @@ function RALLYE_AUTOSTART_RALLYES($result)
 
                // Check if line is already included...
                $result_ref = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND userid=%s LIMIT 1",
-                       array(bigintval($id), bigintval($uid)), __FILE__, __LINE__);
+                       array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_ref) == 0) {
                        // Free memory
                        SQL_FREERESULT($result_ref);
@@ -103,7 +103,7 @@ FROM `{!_MYSQL_PREFIX!}_user_points` AS p
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON p.userid=d.userid
 WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
- array(getConfig('ref_payout'), bigintval($uid)), __FILE__, __LINE__);
+ array(getConfig('ref_payout'), bigintval($uid)), __FUNCTION__, __LINE__);
                        list($cpoints) = SQL_FETCHROW($result_ref);
                        SQL_FREERESULT($result_ref);
 
@@ -112,7 +112,7 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND
                        // Add info line
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs, curr_points)
 VALUES ('%s','%s','%s','%s')",
-                               array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FILE__, __LINE__);
+                               array(bigintval($id), bigintval($uid), bigintval($cnt), $cpoints), __FUNCTION__, __LINE__);
                        $un = true;
                } // END - if
 
@@ -147,7 +147,7 @@ function RALLYE_ADD_PRICES($rallye,$mode="email")
        }
 
        // Load prices
-       $result_prices = SQL_QUERY("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id='".$rallye."' ORDER BY price_level", __FILE__, __LINE__);
+       $result_prices = SQL_QUERY("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id='".$rallye."' ORDER BY price_level", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_prices) > 0)
        {
                // Load prices
@@ -186,7 +186,7 @@ function RALLYE_ADD_TOPUSERS($rallye,$default=0)
 {
        // First check how many prices are set
        $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-        array(bigintval($rallye)), __FILE__, __LINE__);
+        array(bigintval($rallye)), __FUNCTION__, __LINE__);
        $prices = SQL_NUMROWS($result);
        SQL_FREERESULT($result);
 
@@ -195,7 +195,7 @@ function RALLYE_ADD_TOPUSERS($rallye,$default=0)
 LEFT JOIN `{!_MYSQL_PREFIX!}_refsystem` AS r
 ON u.userid=r.userid
 WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC",
- array(bigintval($rallye)), __FILE__, __LINE__);
+ array(bigintval($rallye)), __FUNCTION__, __LINE__);
 
        // Load users
        $DATA = array(
@@ -214,7 +214,7 @@ WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC",
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON p.userid=d.userid
 WHERE d.userid=%s AND d.`status`='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s
-LIMIT 1", array(bigintval($uid), getConfig('ref_payout')), __FILE__, __LINE__);
+LIMIT 1", array(bigintval($uid), getConfig('ref_payout')), __FUNCTION__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -279,7 +279,7 @@ function RALLYE_AUTOADD_USER($uid)
        } // END - if
 
        // Check for an auto-add rallye
-       $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$ADD." FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT id, title, start_time, end_time, send_notify".$ADD." FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE is_active='Y' AND notified='Y' AND auto_add_new_user='Y' AND expired='N' LIMIT 1", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Init variables
                $min_users = 0; $min_prices = 0;
@@ -295,14 +295,14 @@ function RALLYE_AUTOADD_USER($uid)
 
                // Check if line is already included...
                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND userid=%s LIMIT 1",
-                       array(bigintval($id), bigintval($uid)), __FILE__, __LINE__);
+                       array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
 
                // Is this user added?
                if (SQL_NUMROWS($result) == 0) {
                        // Add userid and his ref count to table
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs)
 VALUES ('%s','%s','0')",
- array(bigintval($id), bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
                } else {
                        // Free memory
                        SQL_FREERESULT($result);
@@ -372,7 +372,7 @@ function RALLYE_EXPIRE_RALLYES($result)
                $result = SQL_QUERY_ESC("SELECT COUNT(userid) AS active
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s AND `status`='CONFIRMED'
-LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
+LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__);
                list($active) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -392,7 +392,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
 
        // Expire rallye
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET expired='Y' WHERE id=%s LIMIT 1",
-               array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Run array through (by uid is the most important 2nd-level-array)
        foreach($prices['uid'] as $key => $uid) {
@@ -463,7 +463,7 @@ LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
        // Add task
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created)
 VALUES ('NEW','RALLYE_EXPIRED','".RALLYE_ADMIN_EXPIRED.": %s','".RALLYE_ADMIN_EXPIRED_TEXT."',UNIX_TIMESTAMP())",
- array($title), __FILE__, __LINE__);
+ array($title), __FUNCTION__, __LINE__);
 
        // All work done here...
 }
@@ -475,7 +475,7 @@ function RALLYE_LOAD_USER_DATA($uids_array)
 
        // Load users
        $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN(%s) AND `status`='CONFIRMED' ORDER BY userid LIMIT %s",
-        array($uid_string, count($uids_array)), __FILE__, __LINE__);
+        array($uid_string, count($uids_array)), __FUNCTION__, __LINE__);
        $ret = "";
        while (list($u, $gender, $surname, $family, $email) = SQL_FETCHROW($result))
        {
@@ -497,7 +497,7 @@ function RALLYE_LOAD_PRICES_ARRAY($rallye)
 
        // Load prices
        $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-        array(bigintval($rallye)), __FILE__, __LINE__);
+        array(bigintval($rallye)), __FUNCTION__, __LINE__);
        while (list($level, $points, $info) = SQL_FETCHROW($result))
        {
                $prices['level'][]  = $level;
@@ -526,7 +526,7 @@ function RALLYE_LOAD_USERS_ARRAY ($rallye) {
 
        // Load users                          uid    old  points earned
        $result_user = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY userid",
-               array(bigintval($rallye)), __FILE__, __LINE__);
+               array(bigintval($rallye)), __FUNCTION__, __LINE__);
        while (list($uid, $refs, $cpoints) = SQL_FETCHROW($result_user)) {
                // Load current ref count
                $cnt = RALLYE_GET_REFCOUNT($uid, $refs);
@@ -537,7 +537,7 @@ FROM `{!_MYSQL_PREFIX!}_user_points` AS p
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON p.userid=d.userid
 WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
-                       array(getConfig('ref_payout'), bigintval($uid)), __FILE__, __LINE__);
+                       array(getConfig('ref_payout'), bigintval($uid)), __FUNCTION__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -578,7 +578,7 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND
 function RALLYE_LIST_WINNERS ($rallye, $default=0) {
        // First check how many prices are set
        $result_prices = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-        array(bigintval($rallye)), __FILE__, __LINE__);
+        array(bigintval($rallye)), __FUNCTION__, __LINE__);
        $prices = SQL_NUMROWS($result_prices);
        SQL_FREERESULT($result_prices);
 
@@ -594,7 +594,7 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) {
                //   active = 1: account is still confirmed
                //   active = 0: account is deleted or locked
                $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-                array(bigintval($DATA['uid'][$idx])), __FILE__, __LINE__);
+                array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__);
                list($active) = SQL_FETCHROW($result_active);
                SQL_FREERESULT($result_active);
 
@@ -654,7 +654,7 @@ function RALLYE_DELETE_EXPIRED_RALLYES()
        $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time
 FROM `{!_MYSQL_PREFIX!}_rallye_data`
 WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'",
-               array($EXPIRE), __FILE__, __LINE__);
+               array($EXPIRE), __FUNCTION__, __LINE__);
 
        if (SQL_NUMROWS($result_rallye) > 0)
        {
@@ -672,17 +672,17 @@ WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'",
 
                        // Purge whole rallye
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE id=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                               array(bigintval($id)), __FUNCTION__, __LINE__);
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                               array(bigintval($id)), __FUNCTION__, __LINE__);
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                               array(bigintval($id)), __FUNCTION__, __LINE__);
                }
 
                // Add task
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created)
 VALUES ('NEW','RALLYE_PURGED','{--RALLYE_ADMIN_PURGED--}: %s','{--RALLYE_ADMIN_PURGED_TEXT--}',UNIX_TIMESTAMP())",
-                       array($title), __FILE__, __LINE__);
+                       array($title), __FUNCTION__, __LINE__);
        }
 
        // Free memory
@@ -777,7 +777,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0) {
 FROM `{!_MYSQL_PREFIX!}_refsystem` AS s
 LEFT JOIN `{!_MYSQL_PREFIX!}_refdepths` AS d
 ON s.level=d.level
-WHERE s.userid=%s AND s.level=1", array(bigintval($uid)), __FILE__, __LINE__);
+WHERE s.userid=%s AND s.level=1", array(bigintval($uid)), __FUNCTION__, __LINE__);
                list($cnt) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
                if (empty($cnt)) {
index dc3d0681602bcc0dfe336b5705a4346d7145e95e..6f45e9307e30ab8ed00e912a907af81d85c5dfc9 100644 (file)
@@ -47,7 +47,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) {
        $return = $points;
 
        // Get all ref levels
-       $result_refs = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level > 0 ORDER BY level ASC", __FILE__, __LINE__);
+       $result_refs = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level > 0 ORDER BY level ASC", __FUNCTION__, __LINE__);
 
        // "Walk" through all level
        while (list($level, $perc) = SQL_FETCHROW($result_refs)) {
@@ -72,7 +72,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) {
 
                                // Update refback table ("refid" and "uid" must be exchanged!)
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_refs` SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
-                                       array($refback, $refid, $uid), __FILE__, __LINE__);
+                                       array($refback, $refid, $uid), __FUNCTION__, __LINE__);
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
 
                                // Add points again, but only directly
@@ -112,7 +112,7 @@ function GET_REFBACK_PERCENTS ($uid, $ref) {
 
        // Get percents from database
        $result = SQL_QUERY_ESC("SELECT refback FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND refid=%s LIMIT 1",
-               array($ref, $uid), __FILE__, __LINE__);
+               array($ref, $uid), __FUNCTION__, __LINE__);
 
        // Entry found? (Should be!)
        if (SQL_NUMROWS($result) == 1) {
@@ -145,7 +145,7 @@ function GET_REFBACK_USERID_ARRAY ($rid, $level) {
 FROM `{!_MYSQL_PREFIX!}_user_refs`
 WHERE refid=%s AND level=%s
 ORDER BY userid ASC",
-               array($rid,$level), __FILE__, __LINE__);
+               array($rid,$level), __FUNCTION__, __LINE__);
 
        // Entries found?
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />\n";
@@ -179,7 +179,7 @@ function UPDATE_REFBACK_TABLE($uid) {
 
        // Check for his referal
        $result_refid = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC",
-               array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />\n";
@@ -203,7 +203,7 @@ function UPDATE_REFBACK_TABLE($uid) {
 
                                // Check existence
                                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1",
-                                       array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FILE__, __LINE__);
+                                       array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
 
                                // Do we have no entry?
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />\n";
@@ -211,7 +211,7 @@ function UPDATE_REFBACK_TABLE($uid) {
                                        // Insert this level
                                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - ADD!<br />\n";
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)",
-                                               array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FILE__, __LINE__);
+                                               array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
 
                                        // Move to next referal level and count his counter one up!
                                        $GLOBALS['cache_array']['back_level']++; UPDATE_REFBACK_TABLE($GLOBALS['cache_array']['up_refid'][($GLOBALS['cache_array']['back_level'] - 1)]);
@@ -224,14 +224,14 @@ function UPDATE_REFBACK_TABLE($uid) {
 
                                        // Shall we add this as well?
                                        $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1",
-                                               array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FILE__, __LINE__);
+                                               array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
 
                                        // Do we have no entry?
                                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />\n";
                                        if (SQL_NUMROWS($result) == 0) {
                                                // Insert this level
                                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)",
-                                                       array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FILE__, __LINE__);
+                                                       array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
                                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - RETURNED!<br />\n";
                                        } // END - if
                                } // END - if
@@ -279,7 +279,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON r.refid=d.userid
 WHERE r.userid=%s AND r.level=%s
 ORDER BY r.refid ASC",
-               array(bigintval($uid), bigintval($level)), __FILE__, __LINE__);
+               array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -309,7 +309,7 @@ function GET_USER_REF_ENTRY ($id) {
 
        // Get entry from database
        $result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE id=%s AND userid=%s LIMIT 1",
-               array($id, $GLOBALS['userid']), __FILE__, __LINE__);
+               array($id, $GLOBALS['userid']), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
@@ -361,7 +361,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) {
 
        // Update entry
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_refs` SET refback='%s' WHERE id=%s AND userid=%s LIMIT 1",
-               array($percents, $id, $GLOBALS['userid']), __FILE__, __LINE__);
+               array($percents, $id, $GLOBALS['userid']), __FUNCTION__, __LINE__);
 
        // Entry updated?
        if (SQL_AFFECTEDROWS() < 1) {
index 5f82f17270d6a2f6d7502fff95c20887e477a1ab..f3af140f191ebcc2fe2716560f745df065fb66cd 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
 //
 function REGISTER_FILL_MUST_CONSTANTS()
 {
-       $result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FUNCTION__, __LINE__);
        while (list($name, $required) = SQL_FETCHROW($result)) {
                $value = "";
                if ($required == "Y") $value = "<div class=\\\"guest_failed\\\">&nbsp;(*)</div>";
@@ -63,7 +63,7 @@ function REGISTER_CHECK_REQUIRED_FIELDS(&$array)
        $ret = false;
        foreach ($array as $key => $value)
        {
-               $result = SQL_QUERY("SELECT field_required FROM `{!_MYSQL_PREFIX!}_must_register` WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT field_required FROM `{!_MYSQL_PREFIX!}_must_register` WHERE field_name='".$key."' LIMIT 1", __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1)
                {
                        // "Must-line" found
@@ -87,7 +87,7 @@ function REGISTER_CHECK_REQUIRED_FIELDS(&$array)
 //
 function REGISTER_OUTPUT_REQUIRE_CHECK(&$array)
 {
-       $result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FUNCTION__, __LINE__);
        while (list($name, $required) = SQL_FETCHROW($result))
        {
                if (($array[$name] == "!") && ($required == "Y")) {
@@ -111,13 +111,18 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
 
        // Admins are allowed to see every category...
        if (IS_ADMIN()) $AND = "";
-       $result = SQL_QUERY("SELECT id, cat, visible FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT id, cat, visible FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort`", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List alle visible modules (or all to the admin)
                $SW = 2;
                $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
                while (list($id, $cat, $visible) = SQL_FETCHROW($result)) {
-                       if (!REQUEST_ISSET_POST(('cat', $id))) REQUEST_POST('cat', $id) = "";
+                       // Is the array element not set?
+                       if (!REQUEST_ISSET_POST('cat', $id)) {
+                               // Then set it
+                               REQUEST_SET_POST(array('cat', $id), "");
+                       } // END - if
+
                        // Prepare array for the template
                        $content = array(
                                'sw'    => $SW,
@@ -127,7 +132,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
                                'id'    => $id,
                        );
 
-                       if ((REQUEST_POST('cat', $id) == "Y") || ((getConfig('register_default') == "Y") && (!REQUEST_ISSET_POST(('cat', $id))))) {
+                       if ((REQUEST_POST('cat', $id) == "Y") || ((getConfig('register_default') == "Y") && (!REQUEST_ISSET_POST('cat', $id)))) {
                                $content['def_y'] = " checked=\"checked\"";
                        } else {
                                $content['def_n'] = " checked=\"checked\"";
index 5a24877ff08efa8b93bd565d1b8925eb4d160f92..5d99a7d5a59d749c8c179a99ce76090b7b7621d2 100644 (file)
@@ -70,7 +70,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
                                } else {
                                        // Do we want to add a new sponsor or update his data?
                                        $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
-                                               array($POST['email']), __FILE__, __LINE__);
+                                               array($POST['email']), __FUNCTION__, __LINE__);
 
                                        // Is a sponsor alread in the db?
                                        if (SQL_NUMROWS($result) == 1) {
@@ -188,7 +188,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
 
                if (!empty($SQL)) {
                        // Run SQL command
-                       $result = SQL_QUERY_ESC($SQL, $DATA['values'], __FILE__, __LINE__);
+                       $result = SQL_QUERY_ESC($SQL, $DATA['values'], __FUNCTION__, __LINE__);
                }
 
                // Output message
@@ -251,7 +251,7 @@ function IS_SPONSOR () {
                // Check cookies against database records...
                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE id='%s' AND password='%s' AND `status`='CONFIRMED' LIMIT 1",
-                       array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__);
+                       array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // All is fine
                        $ret = true;
@@ -274,7 +274,7 @@ function GENERATE_SPONSOR_MENU($current)
        // Load main menu entries
        $result_main = SQL_QUERY("SELECT action, title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
 WHERE (what='' OR `what` IS NULL) ".$WHERE."
-ORDER BY `sort`", __FILE__, __LINE__);
+ORDER BY `sort`", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_main) > 0)
        {
                // Load every menu and it's sub menus
@@ -283,7 +283,7 @@ ORDER BY `sort`", __FILE__, __LINE__);
                        // Load sub menus
                        $result_sub = SQL_QUERY_ESC("SELECT what, title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
 WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
-ORDER BY `sort`", array($action), __FILE__, __LINE__);
+ORDER BY `sort`", array($action), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result_sub) > 0)
                        {
                                // Load sub menus
@@ -361,7 +361,7 @@ function UPDATE_SPONSOR_LOGIN () {
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
 SET last_online=UNIX_TIMESTAMP()
 WHERE id='%s' AND password='%s' LIMIT 1",
-                       array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FILE__, __LINE__);
+                       array(bigintval(get_session('sponsorid')), get_session('sponsorpass')), __FUNCTION__, __LINE__);
 
                // This update went fine?
                $login = (SQL_AFFECTEDROWS() == 1);
@@ -472,7 +472,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        if (SQL_AFFECTEDROWS() == 1) {
                if (!empty($templ) && !empty($subj)) {
                        // Run SQL command and check for success
-                       $result = SQL_QUERY_ESC($SQL, $DATA, __FILE__, __LINE__);
+                       $result = SQL_QUERY_ESC($SQL, $DATA, __FUNCTION__, __LINE__);
 
                        // Add all data to content
                        global $DATA;
index cab4fb587d36df2bdb09be7877a42b8916cf5df0..a2c33f9a6fc0fcc626319fa7d3e0ab232573a4f5 100644 (file)
@@ -243,7 +243,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) {
        } else {
                // Log invalid request
                DEBUG_LOG(__FUNCTION__, __LINE__, " action={$formData['action']},id={$formData['id']},function={$functionName}");
-               addFatalMessage("Invalid member action! action=%s,id=%s,function=%s", array($formData['action'], $formData['id'], $functionName));
+               addFatalMessage(__FUNCTION__, __LINE__, "Invalid member action! action=%s,id=%s,function=%s", array($formData['action'], $formData['id'], $functionName));
        }
 
        // Return status
@@ -253,7 +253,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) {
 function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
        // Search for the requested action/status combination in database
        $result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `action`='%s' AND `status`='%s' LIMIT 1",
-               array($action, $status), __FILE__, __LINE__);
+               array($action, $status), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        $isValid = (SQL_NUMROWS($result) == 1);
@@ -401,7 +401,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) {
                } // END - if
        } else {
                // Not found!
-               addFatalMessage(MEMBER_SURFBAR_EXECUTE_ACTION_404, $functionName);
+               addFatalMessage(__FUNCTION__, __LINE__, getMessage('MEMBER_SURFBAR_EXECUTE_ACTION_404'), $functionName);
        }
 
        // Return status
@@ -421,7 +421,7 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) {
        //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
                // Run the query
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET url='%s', views_allowed=%s, views_max=%s WHERE id=%s AND `status`='%s' LIMIT 1",
-                       array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FILE__, __LINE__);
+                       array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
 
                // All fine
                $status = true;
@@ -492,7 +492,7 @@ function SURFBAR_HANDLE_LOW_POINTS () {
 
                        // Update last notified
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1",
-                               array($uid), __FILE__, __LINE__);
+                               array($uid), __FUNCTION__, __LINE__);
                } // END - if
        } // END - foreach
 }
@@ -537,7 +537,7 @@ FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
 WHERE %s='%s'".$add."
 ORDER BY %s %s
 %s",
-               array($column, $searchTerm, $order, $sort, $limit), __FILE__, __LINE__);
+               array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__);
 
        // Is there at least one record?
        if (SQL_NUMROWS($result) > 0) {
@@ -620,7 +620,7 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
                        $urlData['limit'],
                        $urlData['limit'],
                        $urlData['reload']
-               ), __FILE__, __LINE__
+               ), __FUNCTION__, __LINE__
        );
 
        // Return insert id
@@ -804,7 +804,7 @@ INNER JOIN `{!_MYSQL_PREFIX!}_surfbar_urls` AS u
 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)
 LIMIT 1",
-               array($GLOBALS['userid']), __FILE__, __LINE__
+               array($GLOBALS['userid']), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -844,7 +844,7 @@ function SURFBAR_GET_TOTAL_URLS ($status="ACTIVE", $excludeUserId=0) {
        $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
 WHERE userid NOT IN (".implode(",", $UIDs['uid']).") AND `status`='%s'",
-               array($status), __FILE__, __LINE__
+               array($status), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -895,7 +895,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") {
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
 WHERE userid=%s".$ADD."
 LIMIT %s",
-               array($uid, getConfig('surfbar_max_order')), __FILE__, __LINE__
+               array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -966,11 +966,11 @@ function SURFBAR_LOCKDOWN_ID ($urlId) {
        ///* DEBUG: */ return;
        // Just add it to the database
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_locks` (userid, url_id) VALUES (%s, %s)",
-               array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__);
+               array($GLOBALS['userid'], bigintval($urlId)), __FUNCTION__, __LINE__);
 
        // Remove the salt from database
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_surfbar_salts` WHERE url_id=%s AND userid=%s LIMIT 1",
-               array(bigintval($urlId), $GLOBALS['userid']), __FILE__, __LINE__);
+               array(bigintval($urlId), $GLOBALS['userid']), __FUNCTION__, __LINE__);
 }
 // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf"
 function SURFBAR_PAY_POINTS () {
@@ -1000,17 +1000,17 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
 
        // Update URL stats
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET views_total=views_total+1".$ADD." WHERE id=%s LIMIT 1",
-               array(SURFBAR_GET_ID()), __FILE__, __LINE__);
+               array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
 
        // Update the stats entry
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_stats` SET count=count+1 WHERE userid=%s AND url_id=%s LIMIT 1",
-               array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__);
+               array($GLOBALS['userid'], SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
 
        // Was that update okay?
        if (SQL_AFFECTEDROWS() < 1) {
                // No, then insert entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_stats` (userid,url_id,count) VALUES (%s,%s,1)",
-                       array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__);
+                       array($GLOBALS['userid'], SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
        } // END - if
 
        // Update total/daily/weekly/monthly counter
@@ -1029,7 +1029,7 @@ function SURFBAR_UPDATE_SALT_STATS () {
 
        // Simply store the salt from cache away in database...
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_salts` SET last_salt='%s' WHERE url_id=%s AND userid=%s LIMIT 1",
-               array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), $GLOBALS['userid']), __FILE__, __LINE__);
+               array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), $GLOBALS['userid']), __FUNCTION__, __LINE__);
 
        // Debug message
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "salt=".SURFBAR_GET_SALT().",id=".SURFBAR_GET_ID().",uid=".$GLOBALS['userid']."", false);
@@ -1038,7 +1038,7 @@ function SURFBAR_UPDATE_SALT_STATS () {
        if (SQL_AFFECTEDROWS() < 1) {
                // Insert missing entry!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_salts` (url_id,userid,last_salt) VALUES (%s, %s, '%s')",
-                       array(SURFBAR_GET_ID(), $GLOBALS['userid'], SURFBAR_GET_SALT()), __FILE__, __LINE__);
+                       array(SURFBAR_GET_ID(), $GLOBALS['userid'], SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
        } // END - if
 
        // Debug message
@@ -1056,7 +1056,7 @@ FROM `{!_MYSQL_PREFIX!}_surfbar_locks`
 WHERE userid=%s AND url_id=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(last_surfed)
 ORDER BY last_surfed ASC
 LIMIT 1",
-               array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__
+               array($GLOBALS['userid'], bigintval($urlId)), __FUNCTION__, __LINE__
        );
 
        // Fetch counter
@@ -1093,7 +1093,7 @@ ON u.userid=d.userid
 WHERE u.userid NOT IN (%s,0) AND u.`status`='ACTIVE'
 GROUP BY u.userid
 ORDER BY u.userid ASC",
-                       array($GLOBALS['userid']), __FILE__, __LINE__);
+                       array($GLOBALS['userid']), __FUNCTION__, __LINE__);
        } else {
                // Get all userid
                $result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
@@ -1102,7 +1102,7 @@ INNER JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON u.userid=d.userid
 WHERE u.`status`='ACTIVE'
 GROUP BY u.userid
-ORDER BY u.userid ASC", __FILE__, __LINE__);
+ORDER BY u.userid ASC", __FUNCTION__, __LINE__);
        }
 
        // Load all userid
@@ -1137,7 +1137,7 @@ function SURFBAR_DETERMINE_TOTAL_ONLINE () {
 FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
 WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s
 GROUP BY userid",
-               array(getConfig('online_timeout')), __FILE__, __LINE__);
+               array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
 
        // Fetch count
        $cnt = SQL_NUMROWS($result);
@@ -1198,7 +1198,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array())
        // Update the status now
        // ---------- Comment out for debugging/developing member actions! ---------
        //SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET `status`='%s' WHERE id=%s LIMIT 1",
-       //      array($newStatus, bigintval($urlId)), __FILE__, __LINE__);
+       //      array($newStatus, bigintval($urlId)), __FUNCTION__, __LINE__);
        // ---------- Comment out for debugging/developing member actions! ---------
 
        // Was that fine?
@@ -1316,7 +1316,7 @@ WHERE
        userid=%s
 ORDER BY
        id ASC", array($GLOBALS['userid']),
-               __FILE__, __LINE__);
+               __FUNCTION__, __LINE__);
 
        // Load all entries
        while (list($lid, $url, $last) = SQL_FETCHROW($result)) {
@@ -1364,7 +1364,7 @@ ON sbu.id=sbs.url_id
 LEFT JOIN `{!_MYSQL_PREFIX!}_surfbar_locks` AS l
 ON sbu.id=l.url_id
 WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0)) AND sbu.`status`='ACTIVE'".$ADD."
-GROUP BY sbu.id", __FILE__, __LINE__);
+GROUP BY sbu.id", __FUNCTION__, __LINE__);
 
        // Log last query
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "lastQuery=".getConfig('db_last_query')."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS()."", false);
@@ -1388,7 +1388,7 @@ function SURFBAR_GET_USER_URLS () {
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls` AS u
 WHERE u.userid=%s AND u.status != 'DELETED'
 ORDER BY u.id ASC",
-               array($GLOBALS['userid']), __FILE__, __LINE__);
+               array($GLOBALS['userid']), __FUNCTION__, __LINE__);
 
        // Are there entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -1412,7 +1412,7 @@ function SURFBAR_GET_ACTION_ARRAY ($status) {
 
        // Get all assigned actions
        $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `status`='%s' ORDER BY `id` ASC",
-               array($status), __FILE__, __LINE__);
+               array($status), __FUNCTION__, __LINE__);
 
        // Some entries there?
        if (SQL_NUMROWS($result) > 0) {
@@ -1490,7 +1490,7 @@ WHERE sbu.userid NOT IN (".implode(",", $UIDs['uid']).") AND sbu.`status`='ACTIV
 GROUP BY sbu.id
 ORDER BY l.last_surfed ASC, sbu.id ASC
 LIMIT %s,1",
-                       array($randNum), __FILE__, __LINE__
+                       array($randNum), __FUNCTION__, __LINE__
                );
        } else {
                // Get data from specified id number
@@ -1502,7 +1502,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_surfbar_locks` AS l
 ON sbu.id=l.url_id
 WHERE sbu.userid != %s AND sbu.`status`='ACTIVE' AND sbu.id=%s AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))
 LIMIT 1",
-                       array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__
+                       array($GLOBALS['userid'], bigintval($urlId)), __FUNCTION__, __LINE__
                );
        }
 
index cfd0277d8da639c02c7230404a11b497c43445f9..92bd5e2b874552e315b10727b851c45945149def 100644 (file)
@@ -540,7 +540,7 @@ function TASK_CREATE_EXTRA_ROWS ($SQLs, $WHATs, $DESCRs, $TITLEs) {
        $OUT = ""; $SW = 2; $MAX = sizeof($SQLs) - 1;
        foreach ($SQLs as $key => $sql) {
                // Run SQL command, get line numbers and free memory
-               $result = SQL_QUERY($sql, __FILE__, __LINE__);
+               $result = SQL_QUERY($sql, __FUNCTION__, __LINE__);
 
                // Get rows
                $value = SQL_NUMROWS($result);
index 58c866dc7ffc47b8c8e7ca03fc3cf199934c9033..e97d76721ca2f9bea56e84ff8791296f7cd38a78 100644 (file)
@@ -100,7 +100,7 @@ function THEME_GET_VERSION ($name) {
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Load version from database
                $result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
-                       array($name), __FILE__, __LINE__);
+                       array($name), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -143,7 +143,7 @@ function THEME_IS_ACTIVE ($name) {
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT theme_active FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
-                       array($name), __FILE__, __LINE__);
+                       array($name), __FUNCTION__, __LINE__);
 
                // Is the theme active and installed?
                $active = (SQL_NUMROWS($result) == 1);
@@ -177,7 +177,7 @@ function GET_CURR_THEME_NAME () {
        } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT theme_name FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
-                       array($name), __FILE__, __LINE__);
+                       array($name), __FUNCTION__, __LINE__);
 
                // Load theme name
                list($name) = SQL_FETCHROW($result);
index 48fccd8de31a16b3963410312d3c039f4949a363..53b8937e71f0925e87a636f8ac799c8d2c9eb3bf 100644 (file)
@@ -40,31 +40,31 @@ if (!defined('__SECURITY')) {
 //
 function TRANSFER_AUTPPURGE($max, $age) {
        // First get total in-going lines
-       $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_user_transfers_in` ORDER BY `id`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_user_transfers_in` ORDER BY `id`", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > $max) {
                // Update overdue transfers
                $remove = SQL_NUMROWS($result) - $max;
 
                // This will make it really old, so the final removal query will find it
-               $result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_transfers_in` SET time_trans='0' ORDER BY `id` LIMIT ".$remove, __FILE__, __LINE__);
+               $result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_transfers_in` SET time_trans='0' ORDER BY `id` LIMIT ".$remove, __FUNCTION__, __LINE__);
        }
 
        // Second get total out-going lines
-       $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_user_transfers_out` ORDER BY `id`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_user_transfers_out` ORDER BY `id`", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > $max) {
                // Update overdue transfers
                $remove = SQL_NUMROWS($result) - $max;
 
                // This will make it really old, so the final removal query will find it
-               $result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_transfers_out` SET time_trans='0' ORDER BY `id` LIMIT ".$remove, __FILE__, __LINE__);
+               $result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_transfers_out` SET time_trans='0' ORDER BY `id` LIMIT ".$remove, __FUNCTION__, __LINE__);
        }
 
        // Remove old in-going transfers
-       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__);
+       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FUNCTION__, __LINE__);
        $REMOVE = SQL_AFFECTEDROWS();
 
        // Remove old out-going transfers
-       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FILE__, __LINE__);
+       $result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE time_trans < (UNIX_TIMESTAMP() - ".$age.")", __FUNCTION__, __LINE__);
        $REMOVE += SQL_AFFECTEDROWS();
 
        // Only send email to admin(s) when we have removed entries
index b0de254c1eaad5966615a565f1a67e76daa36ac6..5fbf3978286d58cb99f9aa241f8558546a235d61 100644 (file)
@@ -200,7 +200,7 @@ function USER_CREATE_EMAIL_LINK($email, $mod="admin") {
        $result = SQL_QUERY_ESC("SELECT userid
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE email='%s'".$locked." LIMIT 1",
-        array($email), __FILE__, __LINE__);
+        array($email), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load userid
                list($uid) = SQL_FETCHROW($result);
@@ -233,7 +233,7 @@ function SELECT_RANDOM_REFID () {
 
                        // Look for random user
                        $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= %s ORDER BY `rand_confirmed` DESC LIMIT %s, 1",
-                               array(getConfig('user_min_confirmed'), $randNum), __FILE__, __LINE__);
+                               array(getConfig('user_min_confirmed'), $randNum), __FUNCTION__, __LINE__);
 
                        // Do we have one entry there?
                        if (SQL_NUMROWS($result) == 1) {
@@ -242,7 +242,7 @@ function SELECT_RANDOM_REFID () {
 
                                // Reset this user's counter
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `rand_confirmed`=0 WHERE userid=%s LIMIT 1",
-                                       array($refid), __FILE__, __LINE__);
+                                       array($refid), __FUNCTION__, __LINE__);
                        } // END - if
 
                        // Free result
@@ -267,13 +267,13 @@ function USER_DO_LOGIN ($uid, $passwd) {
        if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) {
                // Nickname entered
                $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND `status`='CONFIRMED' LIMIT 1",
-                       array($uid), __FILE__, __LINE__);
+                       array($uid), __FUNCTION__, __LINE__);
                list($uid2, $password, $online, $login) = SQL_FETCHROW($result);
                if (!empty($uid2)) $uid = bigintval($uid2);
        } else {
                // Direct userid entered
                $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-                       array($uid, $hash), __FILE__, __LINE__);
+                       array($uid, $hash), __FUNCTION__, __LINE__);
                list($uid2, $password, $online, $login) = SQL_FETCHROW($result);
        }
 
@@ -300,7 +300,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
 
                        // ... and update database
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-                               array($hash, $uid), __FILE__, __LINE__);
+                               array($hash, $uid), __FUNCTION__, __LINE__);
 
                        // No login bonus by default
                        // @TODO Make this filter working: $ADDON = RUN_FILTER('post_login_update', array('login' => $login, 'online' => $online));
@@ -334,7 +334,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
                        if ((set_session('userid', $uid )) && (set_session('u_hash', $hash))) {
                                // Update database records
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1",
-                                       array($uid), __FILE__, __LINE__);
+                                       array($uid), __FUNCTION__, __LINE__);
                                if (SQL_AFFECTEDROWS() == 1) {
                                        // Procedure to checking for login data
                                        if (($BONUS) && (EXT_IS_ACTIVE("bonus"))) {
@@ -355,7 +355,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
                } elseif (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
                        // Update failture counter
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1",
-                               array($uid), __FILE__, __LINE__);
+                               array($uid), __FUNCTION__, __LINE__);
 
                        // Wrong password!
                        $URL = "modules.php?module=index&amp;what=login&amp;login=".constant('CODE_WRONG_PASS');
@@ -364,7 +364,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
                // Other account status?
                // @TODO Can this query be merged with above query?
                $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array($uid), __FILE__, __LINE__);
+                       array($uid), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -402,15 +402,15 @@ function USER_DO_NEW_PASSWORD ($email, $uid) {
        if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) {
                // Nickname entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1",
-                       array($uid, $email), __FILE__, __LINE__);
+                       array($uid, $email), __FUNCTION__, __LINE__);
        } elseif (($uid > 0) && (empty($email))) {
                // Direct userid entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(bigintval($uid)), __FILE__, __LINE__);
+                       array(bigintval($uid)), __FUNCTION__, __LINE__);
        } elseif (!empty($email)) {
                // Email entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1",
-                       array($email), __FILE__, __LINE__);
+                       array($email), __FUNCTION__, __LINE__);
        } else {
                // Userid not set!
                DEBUG_LOG(__FUNCTION__, __LINE__, "Userid is not set! BUG!");
@@ -426,7 +426,7 @@ function USER_DO_NEW_PASSWORD ($email, $uid) {
                        // Ooppps, this was missing! ;-) We should update the database...
                        $NEW_PASS = GEN_PASS();
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
-                               array(generateHash($NEW_PASS), $uid), __FILE__, __LINE__);
+                               array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__);
 
                        // Prepare data and message for email
                        $msg = LOAD_EMAIL_TEMPLATE("new-pass", array('new_pass' => $NEW_PASS), $uid);
index ba46ef374fcaab059f03b4188a1a1956b5ca22c4..d33fd898750a0593399539d04bc3416b64b5b786 100644 (file)
@@ -322,7 +322,7 @@ function WERNIS_TRANSFER_STATUS ($status) {
 function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") {
        // Register this wernis movement
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_wernis` (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
-               array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FILE__, __LINE__);
+               array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
 }
 
 // Take fees and factor
index e167b07b955f57b6adf5dd951dc2899f3842a700..41ea321a7f24ec44204e5069f09c985257954e14 100644 (file)
@@ -241,7 +241,7 @@ function YOOMEDIA_EXCLUDE_MAIL ($data, $mode) {
 
                // Add the entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')",
-                       array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__);
+                       array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
        } // END - if
 }
 
@@ -252,7 +252,7 @@ function YOOMEDIA_UNLIST_MAIL ($data, $mode) {
 
        // Add the entry
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
-               array($mode, bigintval($data['id'])), __FILE__, __LINE__);
+               array($mode, bigintval($data['id'])), __FUNCTION__, __LINE__);
 }
 
 // "Translates" the index number into an assosiative value
@@ -302,7 +302,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
 
        // Query database
        $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
-               array($type, bigintval($id)), __FILE__, __LINE__);
+               array($type, bigintval($id)), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -313,7 +313,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
                if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
                        // Remove entry
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE id=%s LIMIT 1",
-                               array($id), __FILE__, __LINE__);
+                               array($id), __FUNCTION__, __LINE__);
                } else {
                        // Dont' sent again this mail
                        $reloaded = $time;
@@ -336,7 +336,7 @@ function YOOMEDIA_RELOAD_LOCK ($data, $mode) {
 
                // Add the entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)",
-                       array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__);
+                       array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
        } // END - if
 }
 
index 198995ae10a5686dee2201ef647306850404e2f1..18156e298ca26ac7c1766767bef3878527bf0e38 100644 (file)
@@ -37,12 +37,6 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-// Login is default
-if ((empty($GLOBALS['action'])) && (CHECK_MODULE($GLOBALS['module']) == "admin_only")) {
-       // Redirect to right URL
-       LOAD_URL("modules.php?module=admin&amp;action=login");
-} // END - if
-
 // Load include file
 LOAD_INC_ONCE("inc/modules/admin/admin-inc.php");
 
@@ -71,8 +65,8 @@ if (!isAdminRegistered()) {
                switch ($ret)
                {
                case "done":
-                       changeDataInFile(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
-                       if (!constant('_FATAL')) {
+                       $done = changeDataInFile(constant('PATH')."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
+                       if ($done === true) {
                                // Registering is done
                                LOAD_URL("modules.php?module=admin&amp;action=login&register=done");
                        } else {
@@ -338,7 +332,7 @@ if (!isAdminRegistered()) {
                LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_fatal\">{--ADMIN_LOGOUT_FAILED--}</div>");
 
                // Add fatal message
-               addFatalMessage(getMessage('CANNOT_UNREG_SESS'));
+               addFatalMessage(__FILE__, __LINE__, getMessage('CANNOT_UNREG_SESS'));
        }
 } else {
        // Maybe an Admin want's to login?
@@ -375,13 +369,13 @@ if (!isAdminRegistered()) {
        case "404": // Administrator login not found
                REQUEST_SET_POST('ok', $ret);
                destroyAdminSession();
-               addFatalMessage(getMessage('ADMIN_NOT_FOUND'));
+               addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND'));
                break;
 
        case "pass": // Wrong password
                REQUEST_SET_POST('ok', $ret);
                destroyAdminSession();
-               addFatalMessage(getMessage('WRONG_PASS'));
+               addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS'));
                break;
 
        default: // Others will be logged
index cdaccba72d4e5c13ceaf2321a21166246ba01f6a..f880409ae95a279dd4a0f1aa12446b58cebbfd0b 100644 (file)
@@ -46,7 +46,7 @@ if (FILE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, ADMIN_404_ACTION_1.$GLOBALS['what'].ADMIN_404_ACTION_2);
 }
 
 //
index 2187e4b3b97e6c18989293c4d2610f63a7b5acf4..f9ff0a04ee00b28935e69c5111dfedd8982f2d81 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 1a5574468f6d8475d1fd05c13ed06618605742e2..5dc321b9bf6e03c6e2d79574e88aa5d3d4a473aa 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index c1d9e0082529fa2fe7aad5f87ef308f602e94082..021ff5e3fbe5c5adf98d026172741aff1d5085d0 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 6d06785ff6f2c6a8802af21cf7b868b896f3b300..e46963e93b641585151e1689d89818f53a266de1 100644 (file)
@@ -47,7 +47,7 @@ if (INCLUDE_READABLE($INC)) {
        LOAD_INC($INC);
 } else {
        // "what file" not found
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index cc1d9fc1d261c8da6adf6c43ad76adc2f1a87e44..14319eff01d71814eaba75649ed968cbbc8e5a5b 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 5c51869d8340c57535f146018322b13ad5eb66e6..ba61268cf7da61d19273be7d0dd903f404907dfb 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index f83e30f7817e6a874d45a72e6b9fa19b8b4016c6..6d5e7526be4c0c751898ec4285b277fb9fd9871d 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index a794d55c67282fd95036e46bd20f73e847d6106a..80157d237c412cfbc139a7a1a25c3b6b4871d17a 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 3c263d3491867443aa2fbcd825af9ae1d37654be..6862a81cfac7308cf4955c7f7ed8bafb5f3d8823 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index ba7354036ac48f612a0530bb3294894a82632dce..c40409e279f380e8acdabd78aed8419c545854f4 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index e1338dae6c24cd97567fb3beca5618d659c25dfa..bb78a246a0bc8a177807242a5bb76f89379bf72e 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index ccd1a7f50535176a84951a06803aa80c70b323b6..c6c6d532e446807b078e244a6e5bfbc9f2792f6e 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 8e3189f46321a46b77ef1641f558a22c740fc7cb..2257e966f4d6e3b431294a2b81f8cc464ca65a34 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 8edbbb8de7e0e288369e392e7450aed351b54ab7..62ecfa2ce874e37c3af85c1f251dfe344f34cbe6 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index ddbe8b17c2e005fe5663d30a9e6719e69ca2fe5b..baed5bf2987e17b098a2a96b2fdabf261e028bc1 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 3a3e1898777a6117eb9668c93a5b9585491fe878..7cd97ecf3c89e54cc8f6ba283b14eb2fd501cd53 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 920011de1ab2d944549ce6d32d9f3ddbd050fef3..aca47c54b3ee5dd45e28fbf59a266044fb96dd8f 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 //
 ?>
index 850508f9af97a90e799a849d1d7f674d6d5295c3..768c8b194467b7f072448e73c2623a3f6215f177 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 603de19805d4080ea2ffe92355c2cc80c4e7e51f..961f2e6c92fc3815b3b7d3d369587a5b2513beae 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 98254c531d1c6541229d13328672670158fe1b70..a96951320715ca666699644b8805669b4997aaf6 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("task")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
        return;
 }
 
@@ -49,7 +49,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 71aef410070af38a38ebb35e15ba4b9a0f788d95..5534ea0fa03afe512d3256e6bae47767796178ec 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 4065cb3065b1585f66bbd13043b136f029c318f9..01b2dcd59d1bee6bc50267762f688589e8ad9523 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index d3f352fd6edcd17898e9fbb65a08fc812f7b88c7..567814bfe843710e0c91f165a70eb60fb49a320f 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 9677e2b57cde8a104a2fe54d1cc7dd4af9e46672..dc52af7d39610b541ac883afd396a5ee3046a027 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the admin action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), $GLOBALS['what']);
 }
 
 //
index 8d98c3d7ea56a6104b2eeae393bafa6e1125d112..228fdf50182478491ab3cc50fffe621900c055d1 100644 (file)
@@ -44,13 +44,13 @@ function REGISTER_ADMIN ($user, $md5, $email=WEBMASTER) {
 
        // Lookup the user
        $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-               array($user), __FILE__, __LINE__);
+               array($user), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        if (SQL_NUMROWS($result) == 0) {
                // Ok, let's create the admin login
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins` (login, password, email) VALUES ('%s', '%s', '%s')",
-                       array($user, $md5, $email), __FILE__, __LINE__);
+                       array($user, $md5, $email), __FUNCTION__, __LINE__);
                $ret = "done";
        } // END - if
 
@@ -90,7 +90,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
 
                // Get password from DB
                $result = SQL_QUERY_ESC("SELECT password".$ADD." FROM `{!_MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1",
-                       array($aid), __FILE__, __LINE__);
+                       array($aid), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -139,11 +139,11 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
 
                        // Update password and reset login failures
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s',login_failures=0,last_failure='0000-00-00 00:00:00' WHERE id=%s LIMIT 1",
-                               array($data['password'], $aid), __FILE__, __LINE__);
+                               array($data['password'], $aid), __FUNCTION__, __LINE__);
                } else {
                        // Update password
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE id=%s LIMIT 1",
-                               array($data['password'], $aid), __FILE__, __LINE__);
+                               array($data['password'], $aid), __FUNCTION__, __LINE__);
                }
 
                // Rebuild cache
@@ -172,7 +172,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
        if (($ret == "pass") && (GET_EXT_VERSION("admins") >= "0.7.0")) {
                // Update counter
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET login_failures=login_failures+1,last_failure=NOW() WHERE id=%s LIMIT 1",
-                       array($aid), __FILE__, __LINE__);
+                       array($aid), __FUNCTION__, __LINE__);
 
                // Rebuild cache
                REBUILD_CACHE("admins", "admin");
@@ -189,7 +189,7 @@ function LOGIN_ADMIN ($adminLogin, $passHash) {
        if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) {
                // Reset counter on out-dated sql_patches version
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET login_failures=0,last_failure='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1",
-                       array($adminLogin), __FILE__, __LINE__);
+                       array($adminLogin), __FUNCTION__, __LINE__);
 
                // Rebuild cache
                REBUILD_CACHE("admins", "admin");
@@ -231,7 +231,7 @@ function CHECK_ADMIN_COOKIES ($admin_login, $password) {
 }
 
 //
-function ADMIN_DO_ACTION($wht) {
+function ADMIN_DO_ACTION ($wht) {
        global $DATA;
        //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*<br />\n";
 
@@ -266,9 +266,8 @@ function ADMIN_DO_ACTION($wht) {
        // Check if action/what pair is valid
        $result_action = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu`
 WHERE `action`='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR `what` IS NULL) AND '%s'='overview'))
-LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
+LIMIT 1", array($act, $wht, $wht), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_action) == 1) {
-
                // Is valid but does the inlcude file exists?
                $INC = sprintf("inc/modules/admin/action-%s.php", $act);
                if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) {
@@ -277,16 +276,16 @@ LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
                } elseif (__ACL_ALLOW == false) {
                        // Access denied
                        LOAD_TEMPLATE("admin_menu_failed", false, getMessage('ADMIN_ACCESS_DENIED'));
-                       addFatalMessage(getMessage('ADMIN_ACCESS_DENIED'));
+                       addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACCESS_DENIED'));
                } else {
                        // Include file not found! :-(
                        LOAD_TEMPLATE("admin_menu_failed", false, sprintf(getMessage('ADMIN_ACTION_404'), $act));
-                       addFatalMessage(getMessage('ADMIN_ACTION_404'), $act);
+                       addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACTION_404'), $act);
                }
        } else {
                // Invalid action/what pair found!
                LOAD_TEMPLATE("admin_menu_failed", false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $act."/".$wht));
-               addFatalMessage(getMessage('ADMIN_ACTION_INVALID'), $act."/".$wht);
+               addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACTION_INVALID'), $act."/".$wht);
        }
 
        // Free memory
@@ -330,7 +329,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
        } // END - if
 
        // Build main menu
-       $result_main = SQL_QUERY("SELECT action, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) ORDER BY `sort`, id DESC", __FILE__, __LINE__);
+       $result_main = SQL_QUERY("SELECT action, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) ORDER BY `sort`, id DESC", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_main) > 0) {
                $OUT = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_main\">
 <tr><td colspan=\"2\" height=\"7\" class=\"seperator\">&nbsp;</td></tr>\n";
@@ -371,7 +370,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                                $OUT .= "</NOBR></td>
 </tr>\n";
                                $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
-                                       array($menu), __FILE__, __LINE__);
+                                       array($menu), __FUNCTION__, __LINE__);
                                if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
                                {
                                        $GLOBALS['menu']['description'] = array();
@@ -484,7 +483,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
 function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field="userid")
 {
        // Output selection form with all confirmed user accounts listed
-       $result = SQL_QUERY("SELECT userid, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` ORDER BY userid", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT userid, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` ORDER BY userid", __FUNCTION__, __LINE__);
        $OUT = "";
 
        // USe this only for adding points (e.g. adding refs really makes no sence ;-) )
@@ -519,7 +518,7 @@ function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") {
        $wht = "`what` != ''";
        if ($MODE == "action") $wht = "(what='' OR `what` IS NULL) AND action !='login'";
        $result = SQL_QUERY_ESC("SELECT %s, title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY `sort`",
-        array($MODE), __FILE__, __LINE__);
+        array($MODE), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Load menu as selection
                $OUT = "<select name=\"".$MODE."_menu";
@@ -597,9 +596,9 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
        $result = false;
        if (!$alwaysAdd) {
                if (!empty($whereStatement)) {
-                       $result = SQL_QUERY("SELECT * FROM `{!_MYSQL_PREFIX!}".$tableName."` WHERE ".$whereStatement." LIMIT 1", __FILE__, __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", __FILE__, __LINE__);
+                       $result = SQL_QUERY("SELECT * FROM `{!_MYSQL_PREFIX!}".$tableName."` LIMIT 1", __FUNCTION__, __LINE__);
                }
        } // END - if
 
@@ -638,7 +637,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
        SQL_FREERESULT($result);
 
        // Simply run generated SQL string
-       SQL_QUERY($SQL, __FILE__, __LINE__);
+       SQL_QUERY($SQL, __FUNCTION__, __LINE__);
 
        // Rebuild cache
        REBUILD_CACHE("config", "config");
@@ -719,7 +718,7 @@ function ADMIN_CHECK_MENU_MODE () {
        } elseif (GET_EXT_VERSION("admins") >= "0.6.7") {
                // 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($aid), __FILE__, __LINE__);
+                       array($aid), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load data
                        list($ADMIN) = SQL_FETCHROW($result);
@@ -749,7 +748,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
                        if (!empty($selected)) {
                                // Determine new status
                                $result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                                       array($row, $table, $idRow, $id), __FILE__, __LINE__);
+                                       array($row, $table, $idRow, $id), __FUNCTION__, __LINE__);
 
                                // Row found?
                                if (SQL_NUMROWS($result) == 1) {
@@ -761,7 +760,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
 
                                        // Change this status
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s` SET %s='%s' WHERE %s=%s LIMIT 1",
-                                               array($table, $row, $newStatus, $idRow, $id), __FILE__, __LINE__);
+                                               array($table, $row, $newStatus, $idRow, $id), __FUNCTION__, __LINE__);
 
                                        // Count up affected rows
                                        $cnt += SQL_AFFECTEDROWS();
@@ -828,7 +827,7 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions,
                $id = bigintval($id);
 
                // Get result from a given column array and table name
-               $result = SQL_RESULT_FROM_ARRAY($table, $columns, $idColumn, $id, __FILE__, __LINE__);
+               $result = SQL_RESULT_FROM_ARRAY($table, $columns, $idColumn, $id, __FUNCTION__, __LINE__);
 
                // Is there one entry?
                if (SQL_NUMROWS($result) == 1) {
@@ -889,7 +888,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
 
                        // Load data of entry
                        $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                               array($table, $idColumn, $id), __FILE__, __LINE__);
+                               array($table, $idColumn, $id), __FUNCTION__, __LINE__);
 
                        // Fetch the data
                        $content = SQL_FETCHARRAY($result);
@@ -947,7 +946,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                        );
 
                        // Run the SQL
-                       SQL_QUERY($SQL, __FILE__, __LINE__);
+                       SQL_QUERY($SQL, __FUNCTION__, __LINE__);
 
                        // Do we have an URL?
                        if (isset($content['url'])) {
@@ -977,7 +976,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
                                if (REQUEST_ISSET_POST('uid_raw', $id)) {
                                        // Load all data from that id
                                        $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                                               array($table, $idColumn, $id), __FILE__, __LINE__);
+                                               array($table, $idColumn, $id), __FUNCTION__, __LINE__);
 
                                        // Fetch the data
                                        $content = SQL_FETCHARRAY($result);
@@ -994,7 +993,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
                        } // END - foreach
 
                        // Run the query
-                       SQL_QUERY($SQL, array($table, $idColumn, substr($idList, 0, -1)), __FILE__, __LINE__);
+                       SQL_QUERY($SQL, array($table, $idColumn, substr($idList, 0, -1)), __FUNCTION__, __LINE__);
 
                        // Was this fine?
                        if (SQL_AFFECTEDROWS() == count($IDs)) {
@@ -1066,14 +1065,14 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
                                $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." LIMIT 1";
 
                                // Run this query
-                               SQL_QUERY($SQL, __FILE__, __LINE__);
+                               SQL_QUERY($SQL, __FUNCTION__, __LINE__);
 
                                // Add affected rows
                                $affected += SQL_AFFECTEDROWS();
 
                                // Load all data from that id
                                $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                                       array($table, $idColumn, $id), __FILE__, __LINE__);
+                                       array($table, $idColumn, $id), __FUNCTION__, __LINE__);
 
                                // Fetch the data
                                global $DATA;
@@ -1156,7 +1155,7 @@ function ADMIN_SEND_PASSWORD_RESET_LINK ($email) {
 
        // Look up administator login
        $result = SQL_QUERY_ESC("SELECT id, login, password FROM `{!_MYSQL_PREFIX!}_admins` WHERE email='%s' LIMIT 1",
-               array($email), __FILE__, __LINE__);
+               array($email), __FUNCTION__, __LINE__);
 
        // Is there an account?
        if (SQL_NUMROWS($result) == 0) {
@@ -1197,7 +1196,7 @@ function ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN ($hash, $login) {
 
        // Then try to find that user
        $result = SQL_QUERY_ESC("SELECT id, password, email FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-               array($login), __FILE__, __LINE__);
+               array($login), __FUNCTION__, __LINE__);
 
        // Is an account here?
        if (SQL_NUMROWS($result) == 1) {
@@ -1233,7 +1232,7 @@ function ADMIN_RESET_PASSWORD ($login, $password) {
 
        // Update database
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE login='%s' LIMIT 1",
-               array($passHash, $login), __FILE__, __LINE__);
+               array($passHash, $login), __FUNCTION__, __LINE__);
 
        // Run filters
        RUN_FILTER('post_admin_reset_pass', array('login' => $login, 'hash' => $passHash));
@@ -1255,7 +1254,7 @@ function ADMIN_DELETE_TASK ($id) {
 function ADMIN_UPDATE_TASK_DATA ($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)), __FILE__, __LINE__);
+               array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
 }
 //
 ?>
index 0a67c5b9c48b5645f91f1dc308af90c686708004..3834d366a9b2a695bfcbb363194b1a714a613dd6 100644 (file)
@@ -37,7 +37,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        require($INC);
 } elseif (!EXT_IS_ACTIVE("other")) {
        // Missing extension!
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "other");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "other");
        return;
 }
 
index 0f3e923d8d9f2c2f0c3dc2efc584b2c4396006db..b5b4c17c3736e2f4db44e584d45badd5152929a8 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("yoomedia")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
        return;
 }
 
index 0f0a9111b6c6827ef570803513159518402c879d..501d64e4ccea63bff52d29d03b8a00dcf8911327 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("task")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
        return;
 }
 
index 36f33eff6fc239976f8545849991a9c6c8ab70f0..e3704ef77cbd650682529753e4a9fcf98ff8607d 100644 (file)
@@ -118,7 +118,7 @@ if ((REQUEST_ISSET_GET(('id'))) && (REQUEST_ISSET_GET(('mode')))) {
 
                                        // Send email
                                        $msg = LOAD_EMAIL_TEMPLATE("sponsor_add_points", REQUEST_POST('reason'), true);
-                                       SEND_EMAIL(__EMAIL, ADMIN_SPONSOR_ADD_POINTS, $msg);
+                                       SEND_EMAIL(__EMAIL, ADMIN_SPONSOR_ADD_POINTS_SUBJ, $msg);
                                        $MSG = ADMIN_SPONSOR_POINTS_ADDED;
                                } else {
                                        // No points entered to add!
@@ -141,7 +141,7 @@ if ((REQUEST_ISSET_GET(('id'))) && (REQUEST_ISSET_GET(('mode')))) {
 
                                        // Send email
                                        $msg = LOAD_EMAIL_TEMPLATE("sponsor_sub_points", REQUEST_POST('reason'), true);
-                                       SEND_EMAIL(__EMAIL, ADMIN_SPONSOR_SUB_POINTS, $msg);
+                                       SEND_EMAIL(__EMAIL, ADMIN_SPONSOR_SUB_POINTS_SUBJ, $msg);
                                        $MSG = ADMIN_SPONSOR_POINTS_SUBTRACTED;
                                } else {
                                        // No points entered to add!
index cae5fb68853f18b195200128316142642950bd94..e3697ab279d6bdc9a5c8e5d47504585527ddec60 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("mailid")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
        return;
 }
 
index d8af21ff70a35bd337778408de7bd2e044edb88c..06ae256575dd9a0e1a0899d360b2f283b7fb40ae 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("task")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
        return;
 }
 
index ccc74f2e1fec3b14c58048c18ba29ec397f0692e..2e44fc37c9617e5b071d9ef612fabe8307d13524 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("mailid")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
        return;
 }
 
index dfe81a2533b0400ef92019407b188e670e12524d..30be6d5f63805748211aaa5acf9161f84c845e85 100644 (file)
@@ -37,7 +37,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("user")) || (GET_EXT_VERSION("user") == "")) {
        // Missing extension!
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
        return;
 }
 
index d93dddb94f14e8926ac68728b144914f811756a6..95913e6abae4d6f10ef673cb131f0e90b8947275 100644 (file)
@@ -35,10 +35,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("yoomedia")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
        return;
 } elseif (!EXT_IS_ACTIVE("bonus")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
        return;
 }
 
index 2c496ee23971d83dc0517280982c2516ab2bd5ba..43f8bf4bf2c5c75953bf96a438e95c500d347217 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("order")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 }
 
index cf1377e97cee6dbe3e8f635a230665266535966d..30aa9d12e2a19179d3268d66be0b663aed2887e1 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("theme")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 7cfa35b394a17713241cdd6fe1f7a76c929eed12..ca02e9e2d94d5fe4bf763a064cb605ef7a9ec692 100644 (file)
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif (!EXT_IS_ACTIVE("theme")) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 84177b62368cc03a82f25a329a3217728dd4da44..f8ad401be92a2e0b54e17c68a73fc95809e28145 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "");
+       addFatalMessage(__FILE__, __LINE__, EXTENSION_PROBLEM_EXT_INACTIVE, "");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
@@ -52,9 +52,9 @@ if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
 } elseif ($IS_VALID) {
-       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
-       addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 }
 
 //
index 6b3787f03a8718fd24c553b410540e2803e67b45..291d0a3ba2b863cb6cb2c5011fa9cb352cc8070d 100644 (file)
@@ -46,7 +46,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
 }
 
 //
index 125585b32be402e73b85a435fdc60debf360021b..5feddc567fe2b4c18f3d73e168b1ce700ab1480b 100644 (file)
@@ -49,7 +49,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
 }
 
 //
index 0396821609af856458279b299118f6764811b8ae..f49de0caca1ca1b1179002d0058d7dadac0b85c9 100644 (file)
@@ -49,7 +49,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
 }
 
 //
index 292722cb6d807a49b985e3d8ca458571f3a5c065..28266cf40a55db68765e0a4d1e2b7dd1e2258909 100644 (file)
@@ -35,7 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
+       addFatalMessage(__FILE__, __LINE__, getMessage('GUEST_404_ACTION'), $GLOBALS['what']);
 }
 
 //
index 832bc57515130505508d8a78d3f1fa177ccb4c47..0ee46493f5907ad81de1b53c92873766dddfe494 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 7b1b8c8e81c0a49b9ff05d924f6c3fd4ce848098..593050accf0448fd395b74eeeae0f35114c21779 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "active");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "active");
        return;
 }
 
index bd3e5eaadee6be4b3290cd387b55a0e9e2fee345..41f506b357b362a02ad61ea7a6a622d7d1dd2962 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
        return;
 }
 
index 5e12611c9fe2d2776f647e975b8b19468e2bba7b..f487c5d0a42aa5d3b55a9be4426ba22c3635fba5 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
        return;
 }
 
index 25e28faeefe505b97307b5a736ca3eafb9a91903..5f59096e776a2d33a05b6a127462b30891560700 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
        return;
 }
 
index 3190462f36af0ef6c4cdd59b74d4cdaab37b270d..58d7e5a33626522725b5e69a82003460a653d331 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("mediadata")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mediadata");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mediadata");
        return;
 }
 
index 987ffed898c0f30ec84e7c77fd276cbda1162834..93dc5fdebf3902eb2f19301d5ec94b34681a38de 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
        return;
 }
 
index def32b4b4151b7c14f582cd89ac7579987fc8ab2..0ebcfcb29b7264b82834f994f994fe889c8b8ee2 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("register"))) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "register");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "register");
        return;
 }
 
index d63aada5fb2dc044fb905020ffcbb291fddf7e2a..99e3cbf751275e2e49bc1e4f022436c2335eedb1 100644 (file)
@@ -35,7 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index caa6b13ad2ac226a2fbd7d3c64fc4e6641d72bae..a4723fdf58ff0be5abf49dec7f6873ed762a5e48 100644 (file)
@@ -35,7 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index b7d9dbd08e4ccc5dddb3eec44b6d8e35755f37c2..afdc57186ebb4b703704cfb96e29c4aaf5829625 100644 (file)
@@ -35,7 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index ceb9c6638c2c6d8b1c51f8c531f529dc0b4f1a66..ee9b518b38efe78f7a3cfba164342ce7c000c618 100644 (file)
@@ -35,7 +35,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index b055bae9ef8c536bfa47439cd1a8fb39548730aa..04d240b152c84d0e3bb35f4f2de452d6bbb5c7d5 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("top10")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "top10");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "top10");
        return;
 }
 
index 658530e9f2bf9ec2a843fb2de44b1fa3ee80eb29..a8be80d39f6f7b27d733b818be9f41c75e60dda6 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
        return;
 }
 
index 91e6a066ab0f6dd1d1575a48b05b25ea888a2a87..b5c1174f83ec39a8ede18bc56aa866dfd2c7287a 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_LOGGED_IN()) {
        LOAD_URL(URL."/modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
-       addFatalMessage(EXTENSION_PROBLEM_EXT_INACTIVE, "");
+       addFatalMessage(__FILE__, __LINE__, EXTENSION_PROBLEM_EXT_INACTIVE, "");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
@@ -54,7 +54,7 @@ if (FILE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index dc1568083ff03117997f540f86c4531d592b6db3..0aa3d160aada6a4ef8870cb89eed8d68a4c096f5 100644 (file)
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index 5aa1df14400424fcde458d848f910426dfaae26a..32988f9b3682ad432efec0cda236cc43638a317f 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
@@ -54,7 +54,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index aea409bf0a3a594bda9399316b313d44efc4463f..3d8870110ee3e61a246950a92088f849b3a4a988 100644 (file)
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index aa2526f736aaead65b6bcd8936169f4bbeec47e1..a1ae3d952847a733388727b9ba87add687343497 100644 (file)
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index 3117c2cec8191e20572499a5b02ac1b2dda3e0ef..50874082abd3a61bcd758cb81e63313ac62dcf9a 100644 (file)
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index c2b1707789b1abff085ff78c748d0d16b95cbd19..1428eed1787f0a08b9044142bdcead29e23343d4 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
@@ -54,7 +54,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index 62c102582ebff02fea56f008aa14097ce7a878ad..04f9dd695db1928e04ebae9d67af35e44d6b1617 100644 (file)
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index ffdf51a6ef5eff4c11dc733d2972bffc0e39c967..19587857c94052baf3ee910cf757e1679e2ff131 100644 (file)
@@ -51,7 +51,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index 66ff010447196ee5c6e82bb8ebff09d0555bb065..2449adec38e10464af9a5c2af06f2ec89e872743 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 } elseif ($BLOCK_MODE) {
        // Block mode detected
@@ -54,7 +54,7 @@ if (INCLUDE_READABLE($INC)) {
        // Ok, we finally load the member action module
        LOAD_INC($INC);
 } else {
-       addFatalMessage(MEMBER_404_ACTION_1.$GLOBALS['what'].MEMBER_404_ACTION_2);
+       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), $GLOBALS['what']));
 }
 
 //
index 1ae9e27848d8aceb266dd2ca9875dc62585722c0..8cb3c43166bdda9caadafcc22b45be9ec423022e 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 03762085bf55fb7ea2f380ca1ad0fe7636c11c66..3aee7cb5bf18eae5d1bab6af7688f587a29bcd3e 100644 (file)
@@ -36,7 +36,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
index 191c85bf884fb4e4a6af3c2e0f2847e6c85ef148..481440f3eb757a12c20d756c765ea4dfead7f214 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index 967b6b6a155ee5de80b45b382af549615377ef55..454089821b9271cb6e667a8a374e4531b1df2af0 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index 967b6b6a155ee5de80b45b382af549615377ef55..454089821b9271cb6e667a8a374e4531b1df2af0 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index 967b6b6a155ee5de80b45b382af549615377ef55..454089821b9271cb6e667a8a374e4531b1df2af0 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
        return;
 }
 
index efcb3c1b5f5b8c1e1a8826b7842fd5a3ffa43f85..6c27dea59391dc8730af87a76b0e53b32550317c 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
        return;
 }
 
index 27bf1f501a4327fbcc93202c0a8247ac580bd405..593f7b08d63dc3e92393621c20116ba2fbe4b812 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
 } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
        return;
 }
 
index 1d2a80411a2e86f3723a7a99d1ded4e81bfd4511..ee9965faafac13e0fb95628ef8cdcc88a4c19f6a 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
 } elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
        return;
 }
 
index 090fa4348ac6551de87b9777ca931edc53a8b120..7744b06a6944f361a8637bfdc3bc28ef05f3032f 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php[5~?module=index");
 } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
        return;
 }
 
index 5bbf90d4c186fc1597da34ed7e5c06127a945d28..f44ea6a6b8dbdea48d33ffaacae6618eafba82f5 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "holiday");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "holiday");
        return;
 }
 
index e7b9337df4e2c005dbcbea23ff074eb0de2d812a..548b6f609d4131c086c2a089568b2ce48836058b 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "html_mail");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "html_mail");
        return;
 }
 
index 419708c9a5a0caa06c3ce218eaa8c224785cc1af..259ca95b4a70b00a7d44171b4b5a38f29bc5548e 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata");
        return;
 }
 
index ebfe236222ed372247f9474790c3da9c0c779615..8d496fb5a6b903d5e21c2435b19863afe13ed891 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "newsletter");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "newsletter");
        return;
 }
 
index 73ae2b3fc14e4b94928b39c6843d25de69d8a0c3..b759afedd15168d70581fc47803bf9f8e5d0c2b6 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "nickname");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "nickname");
        return;
 }
 
index bb66ac1a9ff039e70c84c14c69463e35c01b4d0f..8dcd6731e71f97bbffbef748330f781eb04dabc4 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 }
 
index 42b42b7adec39ef9a1bcc1cad4668dfcf314d70b..ad4ef86afc75992b5b0f290c25fd112eb8f3fc10 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "payout");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "payout");
        return;
 }
 
index c008da921a0ea2336ee60ff9ecfa4b59dcc3e6a9..2f3a853add8871ef51022e261003b46cd4f5498d 100644 (file)
@@ -191,7 +191,7 @@ if (EXT_IS_ACTIVE("user")) {
        LOAD_TEMPLATE("member_points");
 } elseif (IS_ADMIN()) {
        // Missing extension
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
 } else {
        // Message for user
        LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE'));
index 544ac714fd925adf3d4aae4a73e2e34349763c5b..38d28f0a1ae773f672925e4bc739d2e5a1b02a0e 100644 (file)
@@ -40,7 +40,7 @@ if (!defined('__SECURITY')) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("primera")) && (!IS_ADMIN())) {
        // Extension "primera" is not activated
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "primera");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "primera");
        return;
 }
 
index a5f7afd9607688b26648345bf89b739d824f362a..3cb7911f3efe5333331c08052d57d743aa8064e3 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
        return;
 }
 
index f78aba8b9bd31d3a6ce50f326f963474ecc15203..a0b735485f91e16e1dd8de993e1c30de7b2b7cea 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "refback");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "refback");
        return;
 }
 
index 98d51f66d01a9129663a1d8a65e318ece90cb57f..d2132f81594811d1177ec584573d1f97f9be9c04 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 }
 
index 9062a3841ec0ebf2b519e89c5fde4f5f0f177d30..d1d97542de7ea775bd0cee47553e5c2607cad554 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 }  elseif (!IS_MEMBER()){
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "support");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "support");
        return;
 }
 
index 0b98ccd88d2e6d1479726d63cb287e2c37140c07..5881f300be37aa5cfb47cad790e3594ac8467975 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // Redirect
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index bb07b7a175bf0ec8a2fed08009b7c389d7d0ad41..de07b844ed3b35ae90885022c8f4e3328243074c 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index e4816028b6653b27efe1a7d1effb654e1d76e85d..4cc27e5a862b9d4cc38396f850f589d5caea49e1 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // Not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index e6bef5b49925249c296bdf47388e684155969235..17a9759eb513376752b207ace5b043ea8a3e9768 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
        return;
 }
 
index eac6c44ec1f1c8b60e76fb6c5ff4a204881c9bd6..d238500bb59edb567c8a6d2b9c4f440514c15907 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
        return;
 }
 
index 1be4d545db6f5171604f1eef7e22bf9bd39dec45..34eb22df63300a0812a1e48e9b471ae3d347c1b6 100644 (file)
@@ -38,7 +38,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "transfer");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "transfer");
        return;
 }
 
index a0697cedce0b74d87759ef76a27ed0ce3df0626e..3cee4416996f701a07d886f47645cc73d354671e 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
        // User is not logged in
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
        return;
 }
 
index c22d9e8cb71682b123357b367017297854edf58f..aa64300976e008a12151e599fbafc51eecfac52b 100644 (file)
@@ -37,7 +37,7 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
        return;
 } elseif (!IS_MEMBER()) {
        // Sorry, no guest access!
index 48ad6970cd6540bfaa7e930d7e40de8b36de0dd6..033ffb1d4d5bb96996934e4d1afeb2c96ab13118 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'));
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 } elseif (empty($GLOBALS['what'])) {
        // Empty what value detected!
index c3e2df9f925c533f581213c04ad0218db4f91bef..4140a68d5e16eb5d77bb12fbaeb805ca48e73f26 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index 03385407ce18fc2a2256711fc7907cbfb392d3a8..463c9743bdba7b27a3dc3a135e908527e403574a 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index e9ce3b4b2eed487ae3f6eb09c550170e01711c92..3d07349d68b21d63d775585dffcc8cfef7bae5d2 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index 273b2c5c56a4ef3cf4509e0f4dc2d0319874aad3..38d37008dab41c0e79099ea49edd2a41cd532e5e 100644 (file)
@@ -35,11 +35,11 @@ if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("sponsor"))
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
        return;
 } elseif (!IS_SPONSOR()) {
        // No sponsor!
-       addFatalMessage(getMessage('SPONSOR_ONLY_AREA_ENTERED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('SPONSOR_ONLY_AREA_ENTERED'));
        return;
 }
 
index 8c9f3c331280950fc6a08ed07945d57e31f5e6e7..87395a3e08d5f7aaf6fe013c6b46acdbb1fb35f4 100644 (file)
@@ -87,6 +87,7 @@ initFatalMessages();
 // Check if this file is writeable or read-only and warn the user
 if ((!isInstalling()) && (isInstalled())) {
        // Check for write-permission for config.php and inc directory
+       if (empty($GLOBALS['module'])) $GLOBALS['module'] = REQUEST_GET('module');
        if (empty($GLOBALS['module'])) $GLOBALS['module'] = "index";
 
        // CSS array
@@ -181,25 +182,16 @@ if ((!isInstalling()) && (isInstalled())) {
                                        define('RAND_NUMBER', mt_rand(1000000, 9999999));
                                }
                        } else {
-                               // Add language system
-                               LOAD_INC_ONCE("inc/language.php");
-
                                // Wrong database?
-                               addFatalMessage(getMessage('WRONG_DB_SELECTED'));
+                               addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_DB_SELECTED'));
                        }
                } else {
-                       // Add language system
-                       LOAD_INC_ONCE("inc/language.php");
-
                        // No link to database!
-                       addFatalMessage(getMessage('NO_DB_LINK'));
+                       addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK'));
                }
        } else {
-               // Add language system
-               LOAD_INC_ONCE("inc/language.php");
-
                // Maybe you forgot to enter your MySQL data?
-               addFatalMessage(getMessage('MYSQL_DATA_MISSING'));
+               addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_DATA_MISSING'));
        }
 } else {
        ///////////////////////////////////////////////////
@@ -222,13 +214,13 @@ if ((!isInstalling()) && (isInstalled())) {
        if ((!isInstalled()) || (!isAdminRegistered())) {
                // Check for file permissions
                if (!IS_INC_WRITEABLE("config")) {
-                       addFatalMessage(getMessage('CONFIG_IS_WRITE_PROTECTED'));
+                       addFatalMessage(__FILE__, __LINE__, getMessage('CONFIG_IS_WRITE_PROTECTED'));
                } // END - if
                if (!IS_INC_WRITEABLE("dummy")) {
-                       addFatalMessage(getMessage('DUMMY_IS_WRITE_PROTECTED'));
+                       addFatalMessage(__FILE__, __LINE__, getMessage('DUMMY_IS_WRITE_PROTECTED'));
                } // END - if
                if (!IS_INC_WRITEABLE(".secret/dummy")) {
-                       addFatalMessage(getMessage('SECRET_IS_WRITE_PROTECTED'));
+                       addFatalMessage(__FILE__, __LINE__, getMessage('SECRET_IS_WRITE_PROTECTED'));
                } // END - if
        } // END - if
 
index f1a90a82bde87f14eb7279694520284d0d2d515f..2b93a5cbf0def4dfd2cde1c6b56997691c0da71b 100644 (file)
@@ -55,7 +55,7 @@ function ADD_MODULE_TITLE ($mod) {
                } elseif (!EXT_IS_ACTIVE("cache")) {
                        // Load from database
                        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE module='%s' LIMIT 1",
-                               array($mod), __FILE__, __LINE__);
+                               array($mod), __FUNCTION__, __LINE__);
                        list($name) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                }
@@ -132,7 +132,7 @@ function CHECK_MODULE ($mod) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Check for module in database
                $result = SQL_QUERY_ESC("SELECT locked, hidden, admin_only, mem_only FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE module='%s' LIMIT 1",
-                       array($mod_chk), __FILE__, __LINE__);
+                       array($mod_chk), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Read data
                        list($locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
@@ -179,12 +179,12 @@ function CHECK_MODULE ($mod) {
                                // to find a loop here... *sigh*
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_mod_reg`
 (module, locked, hidden, mem_only, admin_only, has_menu) VALUES
-('%s','Y','N','N','N','N')", array($mod_chk), __FILE__, __LINE__);
+('%s','Y','N','N','N','N')", array($mod_chk), __FUNCTION__, __LINE__);
                        } else {
                                // Wrong/missing sql_patches!
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_mod_reg`
 (module, locked, hidden, mem_only, admin_only) VALUES
-('%s','Y','N','N','N')", array($mod_chk), __FILE__, __LINE__);
+('%s','Y','N','N','N')", array($mod_chk), __FUNCTION__, __LINE__);
                        }
 
                        // Everthing is fine?
@@ -298,7 +298,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
 
        // Get the title from menu
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' ".$AND." LIMIT 1",
-               array($ACC_LVL, $type, $search), __FILE__, __LINE__);
+               array($ACC_LVL, $type, $search), __FUNCTION__, __LINE__);
 
        // Menu found?
        if (SQL_NUMROWS($result) == 1) {
@@ -361,7 +361,7 @@ function ADD_MENU ($MODE, $act, $wht) {
 
        // Load SQL data and add the menu to the output stream...
        $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (what='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
-               array($MODE), __FILE__, __LINE__);
+               array($MODE), __FUNCTION__, __LINE__);
        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
        if (SQL_NUMROWS($result_main) > 0) {
                OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$MODE."_menu\">");
@@ -381,7 +381,7 @@ function ADD_MENU ($MODE, $act, $wht) {
                        LOAD_TEMPLATE($MODE."_menu_title", false, $content);
 
                        $result_sub = SQL_QUERY_ESC("SELECT title, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
-                        array($MODE, $main_action), __FILE__, __LINE__);
+                        array($MODE, $main_action), __FUNCTION__, __LINE__);
                        $ctl = SQL_NUMROWS($result_sub);
                        if ($ctl > 0) {
                                $cnt=0;
@@ -490,7 +490,7 @@ function IS_ADMIN ($admin="") {
        } elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE("cache"))) || (!isset($GLOBALS['cache_array']['admins']['password'][$admin]))) {
                // Search for admin
                $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-                       array($admin), __FILE__, __LINE__);
+                       array($admin), __FUNCTION__, __LINE__);
 
                // Is he admin?
                $passDB = "";
@@ -526,7 +526,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
        switch ($MODE) {
        case "guest":
                // Guests (in the registration form) are not allowed to select 0 mails per day.
-               $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value", __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        $OUT = "";
                        while (list($value, $comment) = SQL_FETCHROW($result)) {
@@ -549,7 +549,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
 
        case "member":
                // Members are allowed to set to zero mails per day (we will change this soon!)
-               $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value", __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        $OUT = "";
                        while (list($value, $comment) = SQL_FETCHROW($result)) {
@@ -582,7 +582,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
 function SEARCH_EMAIL_USERTAB ($email) {
        // Query the database
        $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1",
-               array($email), __FILE__, __LINE__);
+               array($email), __FUNCTION__, __LINE__);
 
        // Is the email there?
        $ret = (SQL_NUMROWS($result) == 1);
@@ -614,7 +614,7 @@ function IS_MEMBER () {
        if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash'))) {
                // Cookies are set with values, but are they valid?
                $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array($GLOBALS['userid']), __FILE__, __LINE__);
+                       array($GLOBALS['userid']), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load data from cookies
                        list($password, $status, $mod, $onl) = SQL_FETCHROW($result);
@@ -681,19 +681,19 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
        if (($MODE != "admin") && ($UPDATE === true)) {
                // Update guest or member menu
                $SQL = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$ADD." LIMIT 1",
-                       array($MODE, $act, $wht), __FILE__, __LINE__, false);
+                       array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
        } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
                $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$ADD." ORDER BY action DESC LIMIT 1",
-                       array($MODE, $act, $wht), __FILE__, __LINE__, false);
+                       array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
        } else {
                // Admin login overview
                $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
-                       array($MODE, $act), __FILE__, __LINE__, false);
+                       array($MODE, $act), __FUNCTION__, __LINE__, false);
        }
 
        // Run SQL command
-       $result = SQL_QUERY($SQL, __FILE__, __LINE__);
+       $result = SQL_QUERY($SQL, __FUNCTION__, __LINE__);
        if ($UPDATE === true) {
                // Check updated/affected rows
                $ret = (SQL_AFFECTEDROWS() == 1);
@@ -725,7 +725,7 @@ function GET_MOD_DESCR($MODE, $wht, $column="what") {
 
        // Look for title
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
-               array($MODE, $column, $wht), __FILE__, __LINE__);
+               array($MODE, $column, $wht), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
@@ -743,7 +743,7 @@ function SEND_MODE_MAILS($mod, $modes) {
 
        // Load hash
        $result_main = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-               array($GLOBALS['userid']), __FILE__, __LINE__);
+               array($GLOBALS['userid']), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_main) == 1) {
                // Load hash from database
                list($hashDB) = SQL_FETCHROW($result_main);
@@ -756,7 +756,7 @@ function SEND_MODE_MAILS($mod, $modes) {
                if (($hash == get_session('u_hash')) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) {
                        // Load user's data
                        $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND password='%s' LIMIT 1",
-                               array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__);
+                               array($GLOBALS['userid'], $hashDB), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Load the data
                                $DATA = SQL_FETCHROW($result);
@@ -860,14 +860,16 @@ function SEND_MODE_MAILS($mod, $modes) {
        // Load template
        LOAD_TEMPLATE("admin_settings_saved", false, $content);
 }
+
 // Update module counter
 function COUNT_MODULE($mod) {
        if ($mod != "css") {
                // Do count all other modules but not accesses on CSS file css.php!
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET clicks=clicks+1 WHERE module='%s' LIMIT 1",
-                       array($mod), __FILE__, __LINE__);
+                       array($mod), __FUNCTION__, __LINE__);
        } // END - if
 }
+
 // Get action value from mode (admin/guest/member) and what-value
 function GET_ACTION ($MODE, &$wht) {
        // Init status
@@ -907,7 +909,7 @@ function GET_ACTION ($MODE, &$wht) {
 
                // Load from database
                $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
-                       array($MODE, $wht), __FILE__, __LINE__);
+                       array($MODE, $wht), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load action value and pray that this one is the right you want... ;-)
                        list($ret) = SQL_FETCHROW($result);
@@ -920,7 +922,7 @@ function GET_ACTION ($MODE, &$wht) {
                if (isAdminRegistered()) {
                        // Redirect
                        // @TODO Why does this lead into an endless loop but we still need it???
-                       LOAD_URL("admin.php");
+                       // Commented out LOAD_URL("admin.php");
                } // END - if
        }
 
@@ -940,7 +942,7 @@ function GET_CATEGORY ($cid) {
        } elseif ($cid > 0) {
                // Lookup the category in database
                $result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1",
-                       array(bigintval($cid)), __FILE__, __LINE__);
+                       array(bigintval($cid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Category found... :-)
                        list($ret) = SQL_FETCHROW($result);
@@ -961,7 +963,7 @@ function GET_PAYMENT ($pid, $full=false) {
 
        // Load payment data
        $result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1",
-               array(bigintval($pid)), __FILE__, __LINE__);
+               array(bigintval($pid)), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Payment type found... :-)
                if (!$full) {
@@ -985,7 +987,7 @@ function GET_PAYMENT ($pid, $full=false) {
 function GET_PAY_POINTS ($pid, $lookFor = "price") {
        $ret = "-1";
        $result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1",
-               array($lookFor, $pid), __FILE__, __LINE__);
+               array($lookFor, $pid), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Payment type found... :-)
                list($ret) = SQL_FETCHROW($result);
@@ -1009,12 +1011,12 @@ function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fa
                        $type = "NORMAL"; $rowName = "stats_id";
                        if ($bonus) { $type = "BONUS"; $rowName = "bonus_id"; }
                        $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_links` WHERE %s='%s' AND userid=%s AND link_type='%s' LIMIT 1",
-                        array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__);
+                        array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 0)
                        {
                                // No, so we add one!
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_links` (%s, userid, link_type) VALUES ('%s','%s','%s')",
-                                array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__);
+                                array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
                                $ret = "done";
                        }
                         else
@@ -1039,12 +1041,12 @@ function GET_TOTAL_DATA ($search, $tableName, $lookFor, $whereStatement="userid"
                // Count rows
                //* DEBUG: */ echo "COUNT!<br />\n";
                $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add,
-                       array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__);
+                       array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
        } else {
                // Add all rows
                //* DEBUG: */ echo "SUM!<br />\n";
                $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add,
-                       array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__);
+                       array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
        }
 
        // Load row
@@ -1084,7 +1086,7 @@ function GET_REF_LEVEL_PERCENTS ($level) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Get referal data
                $result_lvl = SQL_QUERY_ESC("SELECT percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1",
-                       array(bigintval($level)), __FILE__, __LINE__);
+                       array(bigintval($level)), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result_lvl) == 1) {
@@ -1151,7 +1153,7 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid
 
        // Check user account
        $result_user = SQL_QUERY_ESC("SELECT refid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-               array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}<br />\n";
        if (SQL_NUMROWS($result_user) == 1) {
@@ -1178,14 +1180,14 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid
 
                        // Update points...
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth='%s' LIMIT 1",
-                               array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FILE__, __LINE__);
+                               array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
 
                        // No entry updated?
                        if (SQL_AFFECTEDROWS() < 1) {
                                // First ref in this level! :-)
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_points` (userid,ref_depth,%s) VALUES (%s,'%s',%s)",
-                                       array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FILE__, __LINE__);
+                                       array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />\n";
                        } // END - if
 
@@ -1248,20 +1250,20 @@ function UPDATE_REF_COUNTER ($uid) {
 
        // Update counter
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1",
-               array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FILE__, __LINE__);
+               array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />\n";
        if (SQL_AFFECTEDROWS() < 1) {
                // First count!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refsystem` (userid, level, counter) VALUES (%s,%s,1)",
-                       array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FILE__, __LINE__);
+                       array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid}<br />\n";
        } // END - if
 
        // Check for his referal
        $result = SQL_QUERY_ESC("SELECT refid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Load refid
        list($ref) = SQL_FETCHROW($result);
@@ -1293,7 +1295,7 @@ function UPDATE_REF_COUNTER ($uid) {
 // OBSOLETE: Sends out mail to all administrators
 function SEND_ADMIN_EMAILS ($subj, $msg) {
        // Load all admin email addresses
-       $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id` ASC", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id` ASC", __FUNCTION__, __LINE__);
        while (list($email) = SQL_FETCHROW($result)) {
                // Send the email out
                SEND_EMAIL($email, $subj, $msg);
@@ -1320,7 +1322,7 @@ function GET_ADMIN_ID ($login) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-                       array($login), __FILE__, __LINE__);
+                       array($login), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        list($ret) = SQL_FETCHROW($result);
                } // END - if
@@ -1357,7 +1359,7 @@ function GET_ADMIN_HASH ($aid) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1",
-                array($aid), __FILE__, __LINE__);
+                array($aid), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
                        list($ret) = SQL_FETCHROW($result);
@@ -1385,7 +1387,7 @@ function GET_ADMIN_LOGIN ($aid) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT login FROM `{!_MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1",
-                       array(bigintval($aid)), __FILE__, __LINE__);
+                       array(bigintval($aid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
                        list($ret) = SQL_FETCHROW($result);
@@ -1413,7 +1415,7 @@ function GET_ADMIN_EMAIL ($aid) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Load from database
                $result_aid = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1",
-                       array(bigintval($aid)), __FILE__, __LINE__);
+                       array(bigintval($aid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_aid) == 1) {
                        // Get data
                        list($ret) = SQL_FETCHROW($result_aid);
@@ -1443,7 +1445,7 @@ function GET_ADMIN_DEFAULT_ACL ($aid) {
        } elseif (!EXT_IS_ACTIVE("cache")) {
                // Load from database
                $result_aid = SQL_QUERY_ESC("SELECT default_acl FROM `{!_MYSQL_PREFIX!}_admins` WHERE id=%s LIMIT 1",
-                       array(bigintval($aid)), __FILE__, __LINE__);
+                       array(bigintval($aid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_aid) == 1) {
                        // Fetch data
                        list($ret) = SQL_FETCHROW($result_aid);
@@ -1479,7 +1481,7 @@ function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where=
                $ORDER = $name.$SPEC;
                if ($table == "country") $ORDER = $special;
                $result = SQL_QUERY_ESC("SELECT %s, %s".$SPEC." FROM `{!_MYSQL_PREFIX!}_%s` ".$where." ORDER BY %s",
-                       array($id, $ORDER, $table, $name), __FILE__, __LINE__);
+                       array($id, $ORDER, $table, $name), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
                        while (list($value, $title, $add) = SQL_FETCHROW($result)) {
@@ -1529,14 +1531,14 @@ function DELETE_USER_ACCOUNT($uid, $reason)
 FROM `{!_MYSQL_PREFIX!}_user_points` AS p
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON p.userid=d.userid
-WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
+WHERE p.userid=%s", array(bigintval($uid)), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Save his points to add them to the jackpot
                list($points) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
                // Delete points entries as well
-               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
+               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s", array(bigintval($uid)), __FUNCTION__, __LINE__);
 
                // Update mediadata as well
                if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
@@ -1550,12 +1552,12 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
 
        // Delete category selections as well...
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s",
-               array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Remove from rallye if found
        if (EXT_IS_ACTIVE("rallye")) {
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE userid=%s",
-                       array(bigintval($uid)), __FILE__, __LINE__);
+                       array(bigintval($uid)), __FUNCTION__, __LINE__);
        }
 
        // Now a mail to the user and that's all...
@@ -1563,7 +1565,7 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
        SEND_EMAIL($uid, getMessage('ADMIN_DEL_ACCOUNT'), $msg);
 
        // Ok, delete the account!
-       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__);
 }
 
 //
@@ -1582,17 +1584,17 @@ function META_DESCRIPTION ($mod, $wht) {
 }
 //
 function ADD_JACKPOT($points) {
-       $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Create line
-               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok','%s')", array($points), __FILE__, __LINE__);
+               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok','%s')", array($points), __FUNCTION__, __LINE__);
        } else {
                // Free memory
                SQL_FREERESULT($result);
 
                // Update points
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points+%s WHERE ok='ok' LIMIT 1",
-                       array($points), __FILE__, __LINE__);
+                       array($points), __FUNCTION__, __LINE__);
        }
 }
 //
@@ -1601,17 +1603,17 @@ function SUB_JACKPOT($points) {
        $ret = "-1";
 
        // Get current points
-       $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Create line
-               SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok', 0.00000)", __FILE__, __LINE__);
+               SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_jackpot` (ok, points) VALUES ('ok', 0.00000)", __FUNCTION__, __LINE__);
        } else {
                // Read points
                list($jackpot) = SQL_FETCHROW($result);
                if ($jackpot >= $points) {
                        // Update points when there are enougth points in jackpot
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points-%s WHERE ok='ok' LIMIT 1",
-                               array($points), __FILE__, __LINE__);
+                               array($points), __FUNCTION__, __LINE__);
                        $ret = $jackpot - $points;
                } // END - if
        }
@@ -1642,7 +1644,7 @@ function LOAD_CONFIG ($no="0") {
        } elseif ((!EXT_IS_ACTIVE("cache")) || (!isset($GLOBALS['cache_array']['config'][$no]))) {
                // Load config from DB
                $result_config = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_config` WHERE config=%d LIMIT 1",
-                       array(bigintval($no)), __FILE__, __LINE__);
+                       array(bigintval($no)), __FUNCTION__, __LINE__);
 
                // Get config from database
                $CFG_DUMMY = SQL_FETCHARRAY($result_config);
@@ -1686,7 +1688,7 @@ function GET_WHAT($modCheck) {
 function SUB_POINTS ($subject, $uid, $points) {
        // Add points to used points
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1",
-        array($points, bigintval($uid)), __FILE__, __LINE__);
+        array($points, bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Insert booking record
        if (EXT_IS_ACTIVE("booking")) {
@@ -1752,7 +1754,7 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") {
 
        // Run database update
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "entries={$entries}");
-       SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_config` SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__);
+       SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_config` SET ".$entries." WHERE config=0 LIMIT 1", __FUNCTION__, __LINE__);
 
        // Get affected rows
        $affectedRows = SQL_AFFECTEDROWS();
@@ -1784,7 +1786,7 @@ function GET_TOTAL_RECEIVERS ($mode="normal") {
        $result_all = SQL_QUERY("SELECT userid
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='CONFIRMED' AND receive_mails > 0 ".PREPARE_SQL_HTML_HOLIDAY($mode),
-               __FILE__, __LINE__);
+               __FUNCTION__, __LINE__);
 
        // Get num rows
        $numRows = SQL_NUMROWS($result_all);
@@ -1810,7 +1812,7 @@ function ADD_CATEGORY_OPTIONS ($mode) {
        );
 
        // Get categories
-       $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // ... and begin loading stuff
                while (list($id, $cat) = SQL_FETCHROW($result)) {
@@ -1820,14 +1822,14 @@ function ADD_CATEGORY_OPTIONS ($mode) {
 
                        // Check which users are in this category
                        $result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
-                        array(bigintval($id)), __FILE__, __LINE__);
+                        array(bigintval($id)), __FUNCTION__, __LINE__);
 
                        // Start adding all
                        $uid_cnt = 0;
                        while (list($ucat) = SQL_FETCHROW($result_uids)) {
                                $result_ver = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s AND `status`='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode)." LIMIT 1",
- array(bigintval($ucat)), __FILE__, __LINE__);
+ array(bigintval($ucat)), __FUNCTION__, __LINE__);
                                $uid_cnt += SQL_NUMROWS($result_ver);
 
                                // Free memory
@@ -1902,7 +1904,7 @@ VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s
                                $target,
                                bigintval($receiver),
                                $HTML
-                       ), __FILE__, __LINE__);
+                       ), __FUNCTION__, __LINE__);
        } else {
                // Add regular mail
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus`
@@ -1918,7 +1920,7 @@ VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
                                $cat,
                                $target,
                                bigintval($receiver),
-                       ), __FILE__, __LINE__);
+                       ), __FUNCTION__, __LINE__);
        }
 }
 
@@ -1955,11 +1957,11 @@ function GENERATE_RECEIVER_LIST ($cat, $receiver, $mode="") {
        if ((EXT_IS_ACTIVE("html_mail")) && ($mode == "html")) {
                // Only include HTML receivers
                $result = SQL_QUERY_ESC("SELECT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
-                array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FILE__, __LINE__);
+                array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
        } else {
                // Include all
                $result = SQL_QUERY_ESC("SELECT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
-                array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FILE__, __LINE__);
+                array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
        }
 
        // Entries found?
@@ -2002,7 +2004,7 @@ function USER_STATS_GET_TIMESTAMP ($type, $data, $uid = 0) {
 FROM `{!_MYSQL_PREFIX!}_user_stats_data`
 WHERE userid=%s AND stats_type='%s' AND stats_data='%s'
 LIMIT 1",
-               array(bigintval($uid), $type, $data), __FILE__, __LINE__);
+               array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        if (SQL_NUMROWS($result) == 1) {
@@ -2029,7 +2031,7 @@ function USER_STATS_INSERT_RECORD ($uid, $type, $data) {
        if ((!USER_STATS_GET_TIMESTAMP($type, $data, $uid)) && (!is_array($data))) {
                // Then insert it!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')",
-                       array(bigintval($uid), $type, $data), __FILE__, __LINE__);
+                       array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
        } elseif (is_array($data)) {
                // Invalid data!
                DEBUG_LOG(__FUNCTION__, __LINE__, " uid={$uid},type={$type},data={".gettype($data).": Invalid statistics data type!");
@@ -2057,7 +2059,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS ud
 ON ur.refid=ud.userid
 WHERE ur.userid=%s AND ur.level=%s
 ORDER BY ur.refid ASC",
-               array(bigintval($uid), bigintval($level)), __FILE__, __LINE__);
+               array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -2109,7 +2111,7 @@ ORDER BY ur.refid ASC",
 function REDUCT_RECIPIENT_RECEIVED_MAILS ($column, $id, $count) {
        // Search for mail in database
        $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `%s`=%s ORDER BY `userid` ASC LIMIT %s",
-               array($column, bigintval($id), $count), __FILE__, __LINE__);
+               array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
 
        // Are there entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -2121,7 +2123,7 @@ function REDUCT_RECIPIENT_RECEIVED_MAILS ($column, $id, $count) {
 
                // Now update all user accounts
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s",
-                       array(implode(",", $UIDs), count($UIDs)), __FILE__, __LINE__);
+                       array(implode(",", $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
        } // END - if
 
        // Free result
index b110317396d89a7f79617ae8a9edb9b4fc2acf6e..740f7bd52eea4aeedb9fbe6e1b3f2521930b276f 100644 (file)
@@ -94,6 +94,11 @@ function REQUEST_GET_COUNT () {
        // Return value
 }
 
+// Setter for element in $_GET
+function REQUEST_SET_GET ($element, $value) {
+       $_GET[SQL_ESCAPE($element)] = SQL_ESCAPE($value);
+}
+
 // Wrapper for elements in $_POST
 function REQUEST_POST ($element) {
        // By default no element is there
@@ -145,6 +150,26 @@ function REQUEST_POST_COUNT () {
        // Return value
 }
 
+// Setter for element in $_POST
+function REQUEST_SET_POST ($element, $value) {
+       if (is_array($element)) {
+               // Set array
+               $eval = "\$_POST['";
+
+               // Add all entries
+               $eval .= implode("', '", $element);
+
+               // Finish eval() command
+               $eval .= sprintf("'] = \"%s\";", SQL_ESCAPE($value));
+
+               // And run it
+               eval($eval);
+       } else {
+               // Set regular entry
+               $_POST[SQL_ESCAPE($element)] = SQL_ESCAPE($value);
+       }
+}
+
 // Checks wether a form was sent. If so, the $_POST['ok'] element must be set
 function IS_FORM_SENT () {
        // Simply wrap it!
index 238ae1317fd54bd870b7559b3c587048647b93c5..35fc2cc270193969aa0403e07cadb3771763b1a2 100644 (file)
@@ -71,7 +71,7 @@ if (!REQUEST_ISSET_GET('page')) {
 // Already installed?
 if ((isInstalled()) && (isAdminRegistered())) {
        // Add fatal message
-       addFatalMessage(getMessage('ALREADY_INSTALLED'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED'));
 } // END - if
 
 // Does something goes wrong?
index 7e63705eaaf9c70ef6a08ea63075c5fcecc8b25e..fc3c4ab0ea59d09969e224a021f8b3613ebd4ba5 100644 (file)
@@ -49,7 +49,7 @@ if (isInstalled()) {
        // Is the extension active
        if (!EXT_IS_ACTIVE("mailid", true)) {
                // Is not activated/installed yet!
-               addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+               addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
        } // END - if
 
        // Secure all data
index 5a372e0fc40bc68f76c8aba021783bbcc9550ef3..323b0d91894ab940d0c05ef4c5f82146d637205b 100644 (file)
@@ -43,6 +43,7 @@ $GLOBALS['output_mode'] = 0;
 $GLOBALS['what']   = "";
 $GLOBALS['action'] = "";
 $GLOBALS['userid'] = 0;
+$GLOBALS['module'] = "";
 
 // Needed include files
 require("inc/config.php");
@@ -50,13 +51,6 @@ require("inc/config.php");
 // Fix missing module to "index"
 if (!REQUEST_ISSET_GET(('module'))) REQUEST_SET_GET('module', "index");
 
-// Secure action/what if present
-if (REQUEST_ISSET_GET(('action'))) $GLOBALS['action'] = secureString(REQUEST_GET('action'));
-if (REQUEST_ISSET_GET(('what')))   $GLOBALS['what']   = secureString(REQUEST_GET('what'));
-
-// Secure the module name (very important line!)
-$GLOBALS['module'] = secureString(REQUEST_GET('module'));
-
 // Check if logged in
 if (IS_MEMBER()) {
        // Is still logged in so we welcome him with his name
@@ -100,7 +94,7 @@ LOAD_INC_ONCE("inc/header.php");
 $MOD_VALID = false; $check = "failed";
 if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) {
        // Maintain mode is active and you are no admin
-       addFatalMessage(getMessage('LANG_DOWN_MAINTAINCE'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));
 } elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == 0)) {
        // Construct module name
        define('__MODULE', sprintf("inc/modules/%s.php", SQL_ESCAPE($GLOBALS['module'])));
@@ -120,32 +114,32 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] !=
                        // An URL was specified so we load the de-referrer module
                        LOAD_URL(DEREFERER($URL));
                } elseif (getTotalFatalErrors() == 0) {
-                       addFatalMessage(sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
                }
                break;
 
        case "404":
-               addFatalMessage(sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
                break;
 
        case "locked":
                if (!FILE_READABLE(constant('__MODULE'))) {
                        // Module does addionally not exists
-                       addFatalMessage(sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
                } // END - if
 
                // Add fatal message
-               addFatalMessage(sprintf(getMessage('LANG_MOD_REG_LOCKED'), $GLOBALS['module']));
+               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_LOCKED'), $GLOBALS['module']));
                break;
 
        default:
                DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
-               addFatalMessage(sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
+               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
                break;
        }
 } elseif (getTotalFatalErrors() == 0) {
        // MySQL problems!
-       addFatalMessage(getMessage('MYSQL_ERRORS'));
+       addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_ERRORS'));
 }
 
 if (($MOD_VALID) && (defined('__MODULE'))) {
diff --git a/ref.php b/ref.php
index c26ce8bfde155334eabeb6ad31918cb9b0cad3be..66d545f342c0fe37f95ef79d58ffdc28fe35d8c1 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -60,8 +60,8 @@ if (isInstalled()) {
        }
 
        // Get referal ID from ref or refid variable
-       if (REQUEST_ISSET_GET(('ref')))        $ref = secureString(REQUEST_GET('ref'));
-        elseif (REQUEST_ISSET_GET(('refid'))) $ref = secureString(REQUEST_GET('refid'));
+       if (REQUEST_ISSET_GET(('ref')))        $ref = REQUEST_GET('ref');
+        elseif (REQUEST_ISSET_GET(('refid'))) $ref = REQUEST_GET('refid');
 
        if (!empty($ref)) {
                // Test if nickname or numeric id
index bd7148358b7fe2311b3c1f4352f07e3abedc07cb..de0b7ada53fb445bdfbea93fcac2b20c8747777f 100644 (file)
@@ -10,7 +10,7 @@
 <tr>
   <td class="bottom2" width="10" height="40">&nbsp;</td>
   <td class="bottom2" colspan="3" align="center">
-    <div class="admin_note">{--ADMIN_SPONSOR_COMPANY_NOTE--}</div>
+    <span class="admin_note">{--ADMIN_SPONSOR_COMPANY_NOTE--}</span>
   </td>
   <td class="bottom2" width="10">&nbsp;</td>
 </tr>
index 4b4c985222d480e1983159fcb412bb5beb75d624..03bd5af6c3e1ca64a8b9fa9909b516e62688a907 100644 (file)
@@ -9,8 +9,8 @@
                <td colspan="3" class="seperator" height="5">&nbsp;</td>
        </tr>
        <tr>
-               <td width="400" align="right">{--ADMIN_BIRTHDAY_POINTS--}:<br />
-               <div class="admin_note">({--ADMIN_BIRTHDAY_POINTS_NOTE--})</div></td>
+               <td width="400" align="right">{--ADMIN_BIRTHDAY_POINTS--}:
+               <span class="admin_note">({--ADMIN_BIRTHDAY_POINTS_NOTE--})</span></td>
                <td class="seperator" width="5">&nbsp;</td>
                <td width="170"><input type="text" name="birthday_points"
                        class="admin_normal" value="{!__POINTS_VALUE!}" size="4"
index 4ea4d38a14e842d237468822a00c239a54bfa5fb..a50b616d2fccbf1663bc86898b86216535793907 100644 (file)
                <td class="seperator" width="5">&nbsp;</td>
                <td width="195" align="center"><input type="text"
                        name="bonus_order" class="admin_normal" size="8" maxlength="20"
-                       value="{!__ORDER_VALUE!}">&nbsp;<div class="admin_note">({!POINTS!})</div>
+                       value="{!__ORDER_VALUE!}">&nbsp;<span class="admin_note">({!POINTS!})</span>
                </td>
        </tr>
        <tr>
                <td class="seperator" width="5">&nbsp;</td>
                <td width="195" align="center"><input type="text"
                        name="bonus_ref" class="admin_normal" size="8" maxlength="20"
-                       value="{!__REF_VALUE!}">&nbsp;<div class="admin_note">({!POINTS!})</div>
+                       value="{!__REF_VALUE!}">&nbsp;<span class="admin_note">({!POINTS!})</span>
                </td>
        </tr>
        <tr>
                <td class="seperator" width="5">&nbsp;</td>
                <td width="195" align="center"><input type="text"
                        name="bonus_stats" class="admin_normal" size="8" maxlength="20"
-                       value="{!__STATS_VALUE!}">&nbsp;<div class="admin_note">({!POINTS!})</div>
+                       value="{!__STATS_VALUE!}">&nbsp;<span class="admin_note">({!POINTS!})</span>
                </td>
        </tr>
        <tr>
                <td class="seperator" width="5">&nbsp;</td>
                <td width="195" align="center"><input type="text"
                        name="login_bonus" class="admin_normal" size="8" maxlength="20"
-                       value="{!__LOGIN_VALUE!}">&nbsp;<div class="admin_note">({!POINTS!})</div>
+                       value="{!__LOGIN_VALUE!}">&nbsp;<span class="admin_note">({!POINTS!})</span>
                </td>
        </tr>
        <tr>
                <td class="seperator" width="5">&nbsp;</td>
                <td align="center"><input type="text" name="turbo_bonus"
                        class="admin_normal" size="10" maxlength="20"
-                       value="{!__TURBO_VALUE!}">&nbsp;<div class="admin_note">({!POINTS!})</div>
+                       value="{!__TURBO_VALUE!}">&nbsp;<span class="admin_note">({!POINTS!})</span>
                </td>
        </tr>
        <tr>
                <td class="seperator" width="5">&nbsp;</td>
                <td width="195" align="center"><input type="text"
                        name="bonus_notify_points" class="admin_normal" size="8"
-                       maxlength="20" value="{!__NOTIFY_VALUE!}">&nbsp;<div class="admin_note">({!POINTS!})</div></td>
+                       maxlength="20" value="{!__NOTIFY_VALUE!}">&nbsp;<span class="admin_note">({!POINTS!})</span></td>
        </tr>
        <tr>
                <td colspan="3" class="seperator" height="5">&nbsp;</td>
index 59ed7c1027773f57e683adf018e6b1abb89a110c..97e6a52488b788ad603d486b91f0db04a631ea4e 100644 (file)
@@ -8,7 +8,7 @@
 <tr>
   <td class="bottom2" width="10">&nbsp;</td>
   <td class="bottom2" colspan="3" align="center">
-    <div class="admin_note">{--ADMIN_SPONSOR_COMPANY_NOTE--}</div>
+    <span class="admin_note">{--ADMIN_SPONSOR_COMPANY_NOTE--}</span>
   </td>
   <td class="bottom2" width="10">&nbsp;</td>
 </tr>
index 00808b3afa7a519835444a9f953d901101b03297..eafff4ab15f0b2ada46caff131065bfe88650dc4 100644 (file)
        </tr>
 </table>
 
-<div class="admin_note"><strong>{--ADMIN_BEG_WINNER_HIGLIGHTED--}</strong><br />
-<br />
-<div class="admin_note">{--ADMIN_BEG_TIMEOUT_1--} <strong>{!__AUTOPURGE_TIMEOUT!}</strong>
-{--ADMIN_BEG_TIMEOUT_2--}</div></div>
+<div class="admin_note">
+       <strong>{--ADMIN_BEG_WINNER_HIGLIGHTED--}</strong>
+
+       <div class="admin_note">
+               {--ADMIN_BEG_TIMEOUT_1--} <strong>{!__AUTOPURGE_TIMEOUT!}</strong> {--ADMIN_BEG_TIMEOUT_2--}
+       </div>
+</div>
index 8c00d910d0d641f23fbb898580b32be64e19a3cd..f19f41ad5067e61ee3bd7f0adc74bdfa63a739a5 100644 (file)
@@ -12,7 +12,7 @@
 {!__RALLYE_USER_ROWS!}
 <tr>
        <td colspan="4" class="admin_footer">
-               <div class="admin_note">{--RALLYE_REF_POINTS_NOTE--}</strong>
+               <span class="admin_note">{--RALLYE_REF_POINTS_NOTE--}</span>
        </td>
 </tr>
 </table>
index 61ba1b78d2c7a9b6ecd884c9beaec140b6cbfdad..200798522245dd671e014fdeb44412614cedfdcb 100644 (file)
@@ -9,7 +9,7 @@ $content[rows]
 <tr><td class="seperator bottom2" height="1">&nbsp;</td></tr>
 <tr>
        <td class="admin_footer" style="padding-top: 7px; padding-bottom: 7px">
-               <div class="admin_note">{--ADMIN_LIST_REFERRALS_NOTE--}</div>
+               <span class="admin_note">{--ADMIN_LIST_REFERRALS_NOTE--}</span>
        </td>
 </tr>
 </table>
index a6cf5755e0a603726ee6c8e0d19718f74373e3ef..f5e41e3b1d1a3053023e825486c9cbdf0bb8fddd 100644 (file)
@@ -8,7 +8,7 @@
 {!__SPONSOR_ROWS!}
 <tr>
   <td colspan="4" class="admin_footer" style="padding: 5px">
-    <div class="admin_notes tiny">{--ADMIN_LIST_SPONSOR_NOTES--}</div>
+    <span class="admin_notes tiny">{--ADMIN_LIST_SPONSOR_NOTES--}</span>
   </td>
 </tr>
 </table>
index 17505881cb322b9033415b446c85744d367b50a7..ce3855fe07e8c432c6c012e0dd8128f384ea96e5 100644 (file)
@@ -2,7 +2,7 @@
 <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed" align="center">
        <tr>
                <td colspan="3" align="center" class="admin_title bottom2" height="40">
-               <strong>{--ADMIN_PAYOUT_ADD_NEW_TITLE--}:</strong><br />
+               <strong>{--ADMIN_PAYOUT_ADD_NEW_TITLE--}:</strong>
                <div class="admin_note">({--ADMIN_PAYOUT_ADD_NEW_NOTE--})</div></td>
        </tr>
        <tr>
@@ -21,7 +21,7 @@
                <td align="right">{--ADMIN_PAYOUT_RATE--}</td>
                <td class="seperator">&nbsp;</td>
                <td><input type="text" name="rate" class="admin_normal" size="5"
-                       maxlength="10"><div class="admin_note">&nbsp;&nbsp;({--ADMIN_PAYOUT_VALUE_NOTE--})</div></td>
+                       maxlength="10"><span class="admin_note">&nbsp;&nbsp;({--ADMIN_PAYOUT_VALUE_NOTE--})</span></td>
        </tr>
        <tr>
                <td colspan="3" height="3" class="seperator">&nbsp;</td>
@@ -30,7 +30,7 @@
                <td align="right">{--ADMIN_PAYOUT_MIN_POINTS--}:</td>
                <td class="seperator">&nbsp;</td>
                <td><input type="text" name="mpoi" class="admin_normal" size="5"
-                       maxlength="10"><div class="admin_note">&nbsp;&nbsp;({--ADMIN_PAYOUT_VALUE_NOTE--})</div></td>
+                       maxlength="10"><span class="admin_note">&nbsp;&nbsp;({--ADMIN_PAYOUT_VALUE_NOTE--})</span></td>
        </tr>
        <tr>
                <td colspan="3" height="3" class="seperator">&nbsp;</td>
index 5adcaf8eef4d9d461151c0f7bc792f0b7f3a49ea..d07dac6e49a234630b470a668397d1cf6e26c1b0 100644 (file)
@@ -3,11 +3,10 @@
                <td align="center" class="admin_header bottom2" height="30"><strong>{--ADMIN_SEND_BONUS_MAILS--}</strong></td>
        </tr>
        <tr>
-               <td style="padding-left: 7px; padding-top: 5px; padding-bottom: 5px"
-                       class="bottom2"><strong><big>&middot;</big></strong>&nbsp;<a
-                       href="{!URL!}/modules.php?module=admin&amp;what=send_bonus&amp;mode=normal">{--ADMIN_SEND_BONUS_NORMAL--}</a><br />
-               <br />
-               <div class="admin_note">{--ADMIN_SEND_BONUS_NORMAL_NOTES--}</div></td>
+               <td style="padding-left: 7px; padding-top: 5px; padding-bottom: 5px" class="bottom2">
+                       <strong><big>&middot;</big></strong>&nbsp;<a href="{!URL!}/modules.php?module=admin&amp;what=send_bonus&amp;mode=normal">{--ADMIN_SEND_BONUS_NORMAL--}</a>
+                       <div class="admin_note">{--ADMIN_SEND_BONUS_NORMAL_NOTES--}</div>
+               </td>
        </tr>
        <tr>
                <td style="padding-left: 7px; padding-top: 5px; padding-bottom: 5px">
index fe6a9719c24a4b1a208687c71b63a1559fc56886..1f373451fd38b71d26f86ab6226aace83fac10fd 100644 (file)
                <a href="$content[tester]" target="_blank">{--ADMIN_TEST_URL--}</a>
        </td>
        <td class="switch_sw$content[sw] top2 right2 admin_misc" align="center">
-               <div class="admin_note" title="$content[cat_title]">$content[cat_link]</STRONG>
+               <span class="admin_note" title="$content[cat_title]">$content[cat_link]</span>
        </td>
        <td class="switch_sw$content[sw] top2 right2 admin_misc" align="center">
-               <div class="admin_note" title="$content[pay_title]">$content[pay_link]</STRONG>
+               <span class="admin_note" title="$content[pay_title]">$content[pay_link]</span>
        </td>
        <td class="switch_sw$content[sw] top2 right2 admin_misc" align="center">
                $content[ordered]
index 39c0e80464b41c915db7fcda61f8476d79147f1b..21cc4c246b55a58b6287df07afc8104f2de412b0 100644 (file)
@@ -6,7 +6,7 @@
                        <div align="left" class="tiny">&nbsp;&nbsp;Hallo $username!</div>
                </td>
                <td align="center" width="300" class="dashed"><div class="tiny">
-               Aktueller Admin:&nbsp;[<div class="admin_note" title="Erweiterung admins nicht installiert.">{!__ADMIN_LOGIN!}</div>]
+               Aktueller Admin:&nbsp;[<span class="admin_note" title="Erweiterung admins nicht installiert.">{!__ADMIN_LOGIN!}</span>]
                </div></td>
                <td align="center" width="100" class="top2 bottom2 right2"><div class="tiny"> <a class="menu_blur admin_logout"
                        href="{!URL!}/modules.php?module=admin&amp;action=logout">Ausloggen</a>