if (($rid > 0) && ($rid != $uid))
{
// Select the referral userid
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
array(bigintval($rid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
}
// If version matches add ref bonus to refid's account
- if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == 'Y'))
+ if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == "Y"))
{
// Add points (directly only!)
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_ref=bonus_ref+%s WHERE userid=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
array($_CONFIG['bonus_ref'], bigintval($rid)), __FILE__, __LINE__);
// Subtract points from system
// Account confirmed!
if (defined('LEAD_CODE_ENABLED') && defined('LEAD_EXPIRY_TIME')) {
// Set special lead cookie
- set_session("lead_uid", bigintval($uid), (time() + LEAD_EXPIRY_TIME), COOKIE_PATH);
- $_SESSION['lead_uid'] = bigintval($uid);
+ set_session("lead_uid", bigintval($uid));
// Lead-Code mode enabled
LOAD_URL("lead-confirm.php");
}
} elseif (defined('LEAD_CODE_ENABLED') && defined('LEAD_EXPIRY_TIME')) {
// Set special lead cookie
- set_session("lead_uid", bigintval($uid), (time() + LEAD_EXPIRY_TIME), COOKIE_PATH);
- $_SESSION['lead_uid'] = bigintval($uid);
+ set_session("lead_uid", bigintval($uid));
// Lead-Code mode enabled
LOAD_URL("lead-confirm.php");