- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_beg_ips (userid, remote_ip, timeout) VALUES('%s', '%s', UNIX_TIMESTAMP())",
- array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__);
- }
-
- // Set mode depending on how many mails the member has to confirm
- $locked = false;
- if (($ref_payout > 0) && ($_CONFIG['allow_direct_pay'] == "N")) $locked = true;
-
- // Is begging rallye active?
- if ($_CONFIG['beg_rallye'] == "Y") {
- // Add points to rallye account
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1",
- array($points, $uid), __FILE__, __LINE__);
+ SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_beg_ips (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())",
+ array($uid, GET_REMOTE_ADDR(), session_id()), __FILE__, __LINE__);
+
+ // Was is successfull?
+ if (SQL_AFFECTEDROWS() == 1) {
+ // Okay!
+ $pay = true;
+ } // END - if