$id = bigintval($id);
// Update entry
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level='%s', percents='%s' WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level='%s', percents='%s' WHERE id=%s LIMIT 1",
array(bigintval($value), $_POST['perc'][$id], $id), __FILE__, __LINE__);
}
$TEXT = REF_DEPTHS_SAVED;
case "del":
foreach ($_POST['id'] as $id=>$value)
{
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
}
$TEXT = REF_DEPTHS_DELETED;
$SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_config SET
allow_direct_pay='%s',
reg_points_mode='%s',
-ref_payout='%d'
+ref_payout='%s'
WHERE config=0 LIMIT 1",
$_POST['allow_direct_pay'],
$_POST['reg_points_mode'],
if (($_CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
{
// Update account's ref_payout for "must-confirm"
- $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=(%d - mails_confirmed)
-WHERE mails_confirmed < %d", $REF, $REF);
+ $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=(%s - mails_confirmed)
+WHERE mails_confirmed < %s", $REF, $REF);
}
elseif (($_CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
{
switch ($_CONFIG['allow_direct_pay'])
{
case 'Y':
- define('__DIRECT_Y', " checked");
+ define('__DIRECT_Y', ' checked');
define('__DIRECT_N', "");
break;
case 'N':
define('__DIRECT_Y', "");
- define('__DIRECT_N', " checked");
+ define('__DIRECT_N', ' checked');
break;
}
// One-time referral bonus add-mode
switch ($_CONFIG['reg_points_mode'])
{
- case "ref" : define('__MODE_REF', " checked"); define('__MODE_DIRECT', ""); break;
- case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked"); break;
+ case "ref" : define('__MODE_REF', ' checked'); define('__MODE_DIRECT', ""); break;
+ case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', ' checked'); break;
}
// Referral payout value
$SW = 2; $OUT = "";
foreach ($_POST['sel'] as $id=>$value)
{
- $result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
list($lvl, $perc) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$SW = 2; $OUT = "";
foreach ($_POST['sel'] as $id=>$value)
{
- $result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
list($lvl, $perc) = SQL_FETCHROW($result);
SQL_FREERESULT($result);