define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "667");
+define('CURR_SVN_REVISION', "668");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
}
}
- // Check returned values against current access permissions
- //
- // Admin access ----- Guest access ----- --- Guest or member? ---
- if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) {
- // If you are admin you are welcome for everything!
- $ret = "done";
- } elseif ($locked == "Y") {
- // Module is locked
- $ret = "locked";
- } elseif (($mem == "Y") && (!IS_MEMBER())) {
- // You have to login first!
- $ret = "mem_only";
- } elseif (($admin == "Y") && (!IS_ADMIN())) {
- // Only the Admin is allowed to enter this module!
- $ret = "admin_only";
- }
+ // Is the module found?
+ if ($found) {
+ // Check returned values against current access permissions
+ //
+ // Admin access ----- Guest access ----- --- Guest or member? ---
+ if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) {
+ // If you are admin you are welcome for everything!
+ $ret = "done";
+ } elseif ($locked == "Y") {
+ // Module is locked
+ $ret = "locked";
+ } elseif (($mem == "Y") && (!IS_MEMBER())) {
+ // You have to login first!
+ $ret = "mem_only";
+ } elseif (($admin == "Y") && (!IS_ADMIN())) {
+ // Only the Admin is allowed to enter this module!
+ $ret = "admin_only";
+ }
+ } // END - if
// Still no luck or not found?
if (($ret == "major") || ($ret == "cache_miss") || (!$found)) {
// No entry updated?
if (SQL_AFFECTEDROWS() < 1) {
// First ref in this level! :-)
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid,ref_depth,%s) VALUES (%s,%s,%s)",
+ $result = 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__);
//* 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