switch ($_GET['sub'])
{
case "points":
- $SQL[] = "UPDATE "._MYSQL_PREFIX."_config SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config='0' LIMIT 1";
+ $SQL[] = "UPDATE "._MYSQL_PREFIX."_config SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config=0 LIMIT 1";
break;
case "ref":
$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;
// Update cache file
if (GET_EXT_VERSION("cache") >= "0.1.2")
{
- if ($CACHE->cache_file("refdepths", true)) $CACHE->cache_destroy();
+ if ($cacheInstance->cache_file("refdepths", true)) $cacheInstance->cache_destroy();
}
break;
$SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_config SET
allow_direct_pay='%s',
reg_points_mode='%s',
-ref_payout='%d'
-WHERE config='0' LIMIT 1",
+ref_payout='%s'
+WHERE config=0 LIMIT 1",
$_POST['allow_direct_pay'],
$_POST['reg_points_mode'],
$REF
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))
{
// Destroy config cache file here...
if (GET_EXT_VERSION("cache") >= "0.1.2")
{
- if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy();
- unset($CFG_CACHE);
+ if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
+ unset($cacheArray);
}
}
else
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);