define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "411");
+define('CURR_SVN_REVISION', "412");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
`level` smallint(6) NOT NULL DEFAULT 0,
`refid` bigint(20) NOT NULL DEFAULT 0,
`refback` float(4,1) NOT NULL DEFAULT 0.0,
+`points` FLOAT( 20,5) DEFAULT '0.00000' NOT NULL,
PRIMARY KEY (`id`),
UNIQUE `user_refid` (`userid`,`level`,`refid`),
KEY (`level`),
//* DEBUG: */ echo __FUNCTION__.":refback={$refback}<br />\n";
ADD_POINTS_REFSYSTEM($uid, $refback, false, "0", false, "direct");
+ // Update refback table
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
+ array($refback, $uid, $refid), __FILE__, __LINE__);
+
// Reduce points if refid is found
if ($refid == $ref) {
// Reduce points here!