d.`status`='CONFIRMED' AND
p.ref_depth=1 AND
d.max_mails > 0 AND
- d.mails_confirmed >= %s
+ d.mails_confirmed >= {?ref_payout?}
LIMIT 1",
- array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCTION__, __LINE__);
+ array(bigintval($content['userid'])), __FUNCTION__, __LINE__);
// Get points
list($refpoints) = SQL_FETCHROW($result_ref);
} // END - if
// Load all referal levels
-$result = SQL_QUERY_ESC("SELECT r.level, r.percents
-FROM `{?_MYSQL_PREFIX?}_refdepths` AS r
-WHERE r.level > 0
-ORDER BY r.level ASC",
-array(getMemberId()), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("SELECT
+ r.level, r.percents
+FROM
+ `{?_MYSQL_PREFIX?}_refdepths` AS r
+WHERE
+ r.level > 0
+ORDER BY
+ r.level ASC",
+ array(getMemberId()), __FILE__, __LINE__);
// Are there some entries? (Shall be!)
if (SQL_NUMROWS($result) > 0) {
) TYPE=HEAP", __FILE__, __LINE__);
// Let's begin with the incoming list
- $result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT %s",
- array(getMemberId(), getConfig('transfer_max')), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT {?transfer_max?}",
+ array(getMemberId()), __FILE__, __LINE__);
while ($DATA = SQL_FETCHROW($result)) {
$DATA[] = 'IN';
$DATA = implode("','", $DATA);
} // END - for
// Insert row into database
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )",
- array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
+ array(
+ bigintval($content['userid']),
+ $content['check']
+ ), __FILE__, __LINE__);
// Load email template with confirmation link
$message = loadEmailTemplate('member_birthday_confirm', $content, bigintval($content['userid']));
//* DEBUG: */ outputHtml(basename(__FILE__)."<br />");
// Reset surfbar counter
-updateConfiguration(array("surfbar_daily_counter", "surfbar_yester_counter"), array(0, getConfig('surfbar_daily_counter')));
+updateConfiguration(array('surfbar_daily_counter', 'surfbar_yester_counter'), array(0, getConfig('surfbar_daily_counter')));
setConfigEntry('surfbar_yester_counter', getConfig('surfbar_daily_counter'));
setConfigEntry('surfbar_daily_counter' , 0);