From: Roland Häder Date: Wed, 17 Sep 2008 20:53:34 +0000 (+0000) Subject: Fixed a comparison problem like string1 < string2 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=07a07340291a560c3da7715d4d51c9b2f0d2adf2;p=mailer.git Fixed a comparison problem like string1 < string2 --- diff --git a/.gitattributes b/.gitattributes index 5211aa362c..a046419f20 100644 --- a/.gitattributes +++ b/.gitattributes @@ -463,6 +463,7 @@ inc/modules/member/what-sponsor.php -text inc/modules/member/what-stats.php -text inc/modules/member/what-support.php -text inc/modules/member/what-surfbar_book.php -text +inc/modules/member/what-surfbar_list.php -text inc/modules/member/what-surfbar_start.php -text inc/modules/member/what-surfbar_stats.php -text inc/modules/member/what-themes.php -text diff --git a/inc/check-reset.php b/inc/check-reset.php index 65a01d2998..ebda4415d7 100644 --- a/inc/check-reset.php +++ b/inc/check-reset.php @@ -46,6 +46,15 @@ if ((date("d", $_CONFIG['last_update']) != date("d", time())) && (!isBooleanCons // Add more includes $INC_POOL = RESET_ADD_INCLUDES(); + // Is this not an array? + if (!is_array($INC_POOL)) { + // Log the error + DEBUG_LOG(basename(__FILE__).":INC_POOL is no array!"); + + // Skip further executions + return; + } // END - if + // Run the full reset scripts foreach ($INC_POOL as $incFile) { require_once($incFile); diff --git a/inc/databases.php b/inc/databases.php index 4c69af42b8..3c2480c132 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "354"); +define('CURR_SVN_REVISION', "355"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/extensions.php b/inc/extensions.php index 50820f5948..c6721cc010 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -65,21 +65,16 @@ function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false) foreach ($EXT_VER_HISTORY as $EXT_VER) { require($file); - if (((GET_EXT_VERSION("sql_patches") != '') && ($_CONFIG['verbose_sql'] == "Y")) || (!EXT_IS_ACTIVE("sql_patches"))) - { - if (!empty($UPDATE_NOTES)) - { + if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == "Y")) || (!EXT_IS_ACTIVE("sql_patches"))) { + if (!empty($UPDATE_NOTES)) { // Update notes found $NOTES .= "v".$EXT_VER.":
".$UPDATE_NOTES."

\n"; $UPDATE_NOTES = ""; - } - elseif (($EXT_VER == "0.0") || ($EXT_VER == "0.0.0")) - { + } elseif (($EXT_VER == "0.0") || ($EXT_VER == "0.0.0")) { // Initial release $NOTES .= "v".$EXT_VER.":
".INITIAL_RELEASE."

\n"; - } - else - { + } else { + // No update notes found! $NOTES .= "v".$EXT_VER.":
".NO_UPDATE_NOTES."

\n"; } } @@ -513,7 +508,7 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title = ADMIN_SQLS_EXECUTED_ON_REMOVAL, $S = false; $SW = 2; $i = 1; $OUT = ""; - if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y")) { + if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches") >= "0.0.7") && ($_CONFIG['verbose_sql'] == "Y")) { $OUT = "
@@ -537,7 +532,7 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title = ADMIN_SQLS_EXECUTED_ON_REMOVAL, } } - if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == "Y")) { + if ((!$S) && (GET_EXT_VERSION("sql_patches") >= "0.0.7") && ($_CONFIG['verbose_sql'] == "Y")) { // No addional SQL commands to run $OUT .= "
@@ -607,5 +602,17 @@ function ACTIVATE_EXTENSION($ext_name) { EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "activate"); } // END - if } +// Checks wether the extension is older than given +function EXT_VERSION_IS_OLDER ($ext_name, $ext_ver) { + // Get current extension version + $currVersion = GET_EXT_VERSION($ext_name); + + // Remove all dots from both versions + $currVersion = str_replace(".", "", $currVersion); + $ext_ver = str_replace(".", "", $ext_ver); + + // Now compare both and return the result + return ($currVersion < $ext_ver); +} // ?> diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 61d463146b..95ab6a8f3c 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -124,7 +124,8 @@ INDEX (`userid`,`url_id`) $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"; $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"; $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',3)"; + $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"; + $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"; // Admin menus $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)"; @@ -144,7 +145,7 @@ case "remove": // Do stuff when removing extension $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`"; $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`"; $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`"; - $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 4"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 5"; $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='surfbar' LIMIT 6"; break; diff --git a/inc/functions.php b/inc/functions.php index 75a0e57240..be503dcc6c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1478,10 +1478,10 @@ function SEND_ADMIN_EMAILS_PRO($subj, $template, $content, $UID) { // Load email template $msg = LOAD_EMAIL_TEMPLATE($template, $content, $UID); - if (GET_EXT_VERSION("admins") < "0.4.0") { + if (EXT_VERSION_IS_OLDER("admins", "0.4.0")) { // Older version detected! return SEND_ADMIN_EMAILS($subj, $msg); - } + } // END - if // 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", @@ -1916,7 +1916,7 @@ function generateHash ($plainText, $salt = "") { global $_CONFIG, $_SERVER; // Is the required extension "sql_patches" there and a salt is not given? - if (((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == "")) && (empty($salt))) { + if (((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == "")) && (empty($salt))) { // Extension sql_patches is missing/outdated so we return the plain text return $plainText; } // END - if @@ -2348,9 +2348,9 @@ function RESET_ADD_INCLUDES () { global $_CONFIG; // Is the reset set or old sql_patches? - if ((!isBooleanConstantAndTrue('__DAILY_RESET')) || (GET_EXT_VERSION("sql_patches") < "0.4.5")) { + if ((!isBooleanConstantAndTrue('__DAILY_RESET')) || (EXT_VERSION_IS_OLDER("sql_patches", "0.4.5"))) { // Then abort here - return; + return array(); } // END - if // Get more daily reset scripts diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 0903d68470..467e4b4ecb 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -38,7 +38,7 @@ if (!defined('__SECURITY')) { } // Check for version of sql_patches -if (GET_EXT_VERSION("sql_patches") < "0.3.6") return false; +if (EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) return false; // Check if there is no scrambling string if (empty($_CONFIG['pass_scramble'])) { diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index f2b006ccda..a7471a6a53 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -298,29 +298,39 @@ function SURFBAR_TRANSLATE_STATUS ($status) { function SURFBAR_DETERMINE_REWARD () { global $_CONFIG; + // Static values are default + $reward = $_CONFIG['surfbar_static_reward']; + // Do we have static or dynamic? - if ($_CONFIG['surfbar_pay_model'] == "STATIC") { - // Static model, so choose static values - $reward = $_CONFIG['surfbar_static_reward']; - } else { - // Dynamic model, so calculate values - die("DYNAMIC payment model not yet supported!"); - } + if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { + // "Calculate" dynamic reward + $reward += SURFBAR_CALCULATE_DYNAMIC_ADD(); + } // END - if // Return reward return $reward; } +// "Calculate" dynamic add +function SURFBAR_CALCULATE_DYNAMIC_ADD () { + // Get min/max values + $min = SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE(); + $max = SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE(); + + // "Calculate" dynamic part and return it + return mt_rand($min, $max); +} // Determine costs function SURFBAR_DETERMINE_COSTS () { global $_CONFIG; + // Static costs is default + $costs = $_CONFIG['surfbar_static_costs']; + // Do we have static or dynamic? - if ($_CONFIG['surfbar_pay_model'] == "STATIC") { - $costs = $_CONFIG['surfbar_static_costs']; - } else { - // Dynamic model, so calculate values - die("DYNAMIC payment model not yet supported!"); - } + if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { + // "Calculate" dynamic costs + $costs += SURFBAR_CALCULATE_DYNAMIC_ADD(); + } // END - if // Return costs return $costs; @@ -349,50 +359,56 @@ function SURFBAR_CHECK_RELOAD_FULL() { // Default is full! $isFull = true; - // Do we have static or dynamic mode? - if ($_CONFIG['surfbar_pay_model'] == "STATIC") { - // Cache static reload lock - $SURFBAR_CACHE['surf_lock'] = $_CONFIG['surfbar_static_lock']; - //DEBUG_LOG(__FUNCTION__.":Fixed surf lock is ".$_CONFIG['surfbar_static_lock'].""); + // Cache static reload lock + $SURFBAR_CACHE['surf_lock'] = $_CONFIG['surfbar_static_lock']; + //DEBUG_LOG(__FUNCTION__.":Fixed surf lock is ".$_CONFIG['surfbar_static_lock'].""); + + // Do we have dynamic model? + if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { + // "Calculate" dynamic lock + $SURFBAR_CACHE['surf_lock'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); + } // END - if - // Ask the database - $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM "._MYSQL_PREFIX."_surfbar_locks + // Ask the database + $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM "._MYSQL_PREFIX."_surfbar_locks WHERE userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_DATA('surf_lock').") < UNIX_TIMESTAMP(last_surfed) LIMIT 1", - array($GLOBALS['userid']), __FILE__, __LINE__ - ); + array($GLOBALS['userid']), __FILE__, __LINE__ + ); - // Fetch row - list($SURFBAR_CACHE['user_locks']) = SQL_FETCHROW($result); + // Fetch row + list($SURFBAR_CACHE['user_locks']) = SQL_FETCHROW($result); - // Is it null? - if (is_null($SURFBAR_CACHE['user_locks'])) { - // Then fix it to zero! - $SURFBAR_CACHE['user_locks'] = 0; - } // END - if + // Is it null? + if (is_null($SURFBAR_CACHE['user_locks'])) { + // Then fix it to zero! + $SURFBAR_CACHE['user_locks'] = 0; + } // END - if - // Free result - SQL_FREERESULT($result); + // Free result + SQL_FREERESULT($result); - // Get total URLs - $total = SURFBAR_GET_TOTAL_URLS(); + // Get total URLs + $total = SURFBAR_GET_TOTAL_URLS(); - // Do we have some URLs in lock? Admins can always surf on own URLs! - //DEBUG_LOG(__FUNCTION__.":userLocks=".SURFBAR_GET_DATA('user_locks').",total={$total}"); - $isFull = ((SURFBAR_GET_DATA('user_locks') == $total) && ($total > 0)); - } else { - // Dynamic model... - die("DYNAMIC not yet implemented!"); - } + // Do we have some URLs in lock? Admins can always surf on own URLs! + //DEBUG_LOG(__FUNCTION__.":userLocks=".SURFBAR_GET_DATA('user_locks').",total={$total}"); + $isFull = ((SURFBAR_GET_DATA('user_locks') == $total) && ($total > 0)); // Return result return $isFull; } // Get total amount of URLs of given status for current user or of CONFIRMED URLs by default -function SURFBAR_GET_TOTAL_URLS ($status="CONFIRMED") { +function SURFBAR_GET_TOTAL_URLS ($status="CONFIRMED", $excludeUserId="") { // Determine depleted user account $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); + // Is the exlude userid set? + if ($excludeUserId !== "") { + // Then add it + $UIDs[] = $excludeUserId; + } // END - if + // Get amount from database $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM "._MYSQL_PREFIX."_surfbar_urls @@ -417,7 +433,7 @@ function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) { return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid) < $_CONFIG['surfbar_max_order'])); } // Get total amount of URLs of given status for current user -function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) { +function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="") { global $_CONFIG; // Is the user 0 and user is logged in? @@ -429,10 +445,18 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) { return ($_CONFIG['surfbar_max_order'] + 1); } + // Default is all URLs + $ADD = ""; + + // Is the status set? + if (!empty($status)) { + $ADD = sprintf(" AND status='%s'", $status); + } // END - if + // Get amount from database $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM "._MYSQL_PREFIX."_surfbar_urls -WHERE userid=%s +WHERE userid=%s".$ADD." LIMIT %s", array($uid, $_CONFIG['surfbar_max_order']), __FILE__, __LINE__ ); @@ -671,17 +695,14 @@ GROUP BY userid", function SURFBAR_DETERMINE_WAIT_TIME () { global $_CONFIG; - // Init time - $time = 0; + // Static time is default + $time = $_CONFIG['surfbar_static_time']; // Which payment model do we have? - if ($_CONFIG['surfbar_pay_model'] == "STATIC") { - // Static model - $time = $_CONFIG['surfbar_static_time']; - } else { - // Dynamic - die("DYNAMIC payment model not yet finished!"); - } + if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { + // "Calculate" dynamic time + $time += SURFBAR_CALCULATE_DYNAMIC_ADD(); + } // END - if // Return value return $time; @@ -745,13 +766,17 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { $addon += abs(log($onlineUsers / $totalUsers + 1) * $percent * $totalUsers); // Get total URLs - $totalUrls = SURFBAR_GET_TOTAL_URLS(); + $totalUrls = SURFBAR_GET_TOTAL_URLS("CONFIRMED", "0"); // Get user's total URLs - $userUrls = SURFBAR_GET_TOTAL_USER_URLS(); + $userUrls = SURFBAR_GET_TOTAL_USER_URLS(0, "CONFIRMED"); // Calculate addon - $addon += abs(log($userUrls / $totalUrls + 1) * $percent * $totalUrls); + if ($totalUrls > 0) { + $addon += abs(log($userUrls / $totalUrls + 1) * $percent * $totalUrls); + } else { + $addon += abs(log($userUrls / 1 + 1) * $percent * $totalUrls); + } // Return addon return $addon; @@ -776,7 +801,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { $addon += abs($max * $percent * $totalUsers); // Get total URLs - $totalUrls = SURFBAR_GET_TOTAL_URLS(); + $totalUrls = SURFBAR_GET_TOTAL_URLS("CONFIRMED", "0"); // Calculate addon $addon += abs($max * $percent * $totalUrls); @@ -795,7 +820,7 @@ function SURFBAR_CALCULATE_DYNAMIC_LOCK () { $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); // Calculate lock - $addon = abs(log($onlineUsers / $addon +1)); + $addon = abs(log($onlineUsers / $addon + 1)); // Return value return $addon; @@ -979,8 +1004,8 @@ LIMIT 1", // Only in dynamic model add the dynamic bonus! if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") { // Calculate dynamic reward/costs and add it - $SURFBAR_CACHE['reward'] += SURFBAR_CALCULATE_DYNAMIC_REWARD_ADD(); - $SURFBAR_CACHE['costs'] += SURFBAR_CALCULATE_DYNAMIC_COSTS_ADD(); + $SURFBAR_CACHE['reward'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); + $SURFBAR_CACHE['costs'] += SURFBAR_CALCULATE_DYNAMIC_ADD(); //DEBUG_LOG(__FUNCTION__.":DYNAMIC+ - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS().""); } // END - if diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index e386039365..ee90ca6bc9 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -107,8 +107,8 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) $data['password'] = generateHash($password); // Is the sql_patches not installed, than we cannot have a valid hashed password here! - if (($ret == "pass") && ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == ""))) $ret = "done"; - } elseif ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == "")) { + if (($ret == "pass") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) $ret = "done"; + } elseif ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == "")) { // Old hashing way return $ret; } elseif (!isset($data['password'])) { @@ -180,7 +180,7 @@ function LOGIN_ADMIN ($adminLogin, $passHash) { global $cacheInstance; // Reset failture counter on matching admins version - if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == ""))) { + 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_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", array($adminLogin), __FILE__, __LINE__); diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 11a8db0a0e..d146a2c7d6 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -136,7 +136,7 @@ define('__TREF_VALUE' , $TREF); define('__TLOCK_VALUE', TRANSLATE_COMMA($TLOCK)); // Fixes a bug when there is no bonus extension installed -if (GET_EXT_VERSION("bonus") < "0.4.4") $_CONFIG['bonus_active'] = "X"; +if (EXT_VERSION_IS_OLDER("bonus", "0.4.4")) $_CONFIG['bonus_active'] = "X"; // Display login bonus and turbo-click bonus if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && ($_CONFIG['bonus_active'] == "Y")) { @@ -170,7 +170,7 @@ if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && ($_CONF } elseif ($_CONFIG['bonus_active'] == "N") { // Bonus active rallye deactivated define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_disabled", true)); -} elseif ((IS_ADMIN()) && (GET_EXT_VERSION("bonus") < "0.2.2") && (EXT_IS_ACTIVE("bonus"))) { +} elseif ((IS_ADMIN()) && (EXT_VERSION_IS_OLDER("bonus", "0.2.2")) && (EXT_IS_ACTIVE("bonus"))) { // Please upgrade your bonus extension to v0.2.2 or newer! define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_upgrade")); } else { diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php new file mode 100644 index 0000000000..aa07ac6400 --- /dev/null +++ b/inc/modules/member/what-surfbar_list.php @@ -0,0 +1,46 @@ + diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index 5fd1677b64..41110ed24b 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -1,6 +1,6 @@ \n"; - if (MODULE_HAS_MENU($MODE)) - { + if (MODULE_HAS_MENU($MODE)) { // Rewriting modules to menu - switch ($MODE) - { + switch ($MODE) { case "index": $MODE = "guest"; break; case "login": $MODE = "member"; break; - break; - } + } // END - switch // Guest and member menu is "main" as the default if (empty($ret)) $ret = "main"; @@ -950,11 +945,11 @@ function GET_ACTION ($MODE, &$wht) if (SQL_NUMROWS($result) == 1) { // Load action value and pray that this one is the right you want... ;-) list($ret) = SQL_FETCHROW($result); - } + } // END - if // Free memory SQL_FREERESULT($result); - } + } // END - if // Return action value return $ret; @@ -966,8 +961,7 @@ function GET_CATEGORY ($cid) { // Is the category id set? if (!empty($cid)) { - - // Lookup the category + // 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__); if (SQL_NUMROWS($result) == 1) {