// Set module
$GLOBALS['module'] = "doubler";
$GLOBALS['refid'] = 0;
-$CSS = "0";
+$CSS = 0;
// Load the required file(s)
require ("inc/config.php");
// Add points to "total payed" including charge
$points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge'];
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config=0 LIMIT 1",
- array($points), __FILE__, __LINE__);
+ UPDATE_CONFIG("doubler_points", $points, "+");
$_CONFIG['doubler_points'] += $points;
- // Destroy cache
- if (GET_EXT_VERSION("cache") >= "0.1.2")
- {
- if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
- }
-
// Add second line for the referral but only when uid != refid
if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid))
{
}
// Update usage counter
- $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config=0 LIMIT 1", __FILE__, __LINE__);
+ UPDATE_CONFIG("doubler_counter", 1, "+");
$_CONFIG['doubler_counter']++;
// Set constant