// Add description as navigation point
ADD_DESCR("guest", basename(__FILE__));
-OPEN_TABLE("100%", "guest_content_align", "");
if (!empty($_GET['hash']))
{
// Initialize the user ID
// Unlock his account (but only when it is on UNCONFIRMED!)
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED', ref_payout='%s' WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1",
array($_CONFIG['ref_payout'], $_GET['hash']), __FILE__, __LINE__);
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1)
+ if (SQL_AFFECTEDROWS() == 1)
{
$msg = LOAD_EMAIL_TEMPLATE("confirm-member", "", bigintval($uid));
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
// No hash found, the guest may want to enter his email address to re-get his confirmation link?
LOAD_TEMPLATE("guest_confirm_link");
}
-CLOSE_TABLE();
+
//
?>