X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=doubler.php;h=eab1a6d5335985ee2cc2864e6467bcfec461523e;hp=ca2934f7b6cd3e9f1d2fb759a8dd4394b3b38cff;hb=572e4b0f128dc3e7c44331d21f366fb8b19665e4;hpb=43885129ac24cee5545a8a5ad51e90aa182fdf46 diff --git a/doubler.php b/doubler.php index ca2934f7b6..eab1a6d533 100644 --- a/doubler.php +++ b/doubler.php @@ -42,7 +42,7 @@ $GLOBALS['what'] = ""; $GLOBALS['action'] = ""; // Set module $GLOBALS['module'] = "doubler"; $GLOBALS['refid'] = 0; -$CSS = "0"; +$CSS = 0; // Load the required file(s) require ("inc/config.php"); @@ -138,16 +138,9 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // 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)) { @@ -159,7 +152,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install } // 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