X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Freset%2Freset_bonus.php;h=449a2c1f094f163213b0cfe23be812cddd9ed5cc;hb=ae3dec50dc9e51c8cc08939017763839493f7064;hp=d0a57bf66bd104e9f5093b8a67027bdd0ee5c250;hpb=e6e3183f794b385f5acc38b371c220cc35cdac38;p=mailer.git diff --git a/inc/reset/reset_bonus.php b/inc/reset/reset_bonus.php index d0a57bf66b..449a2c1f09 100644 --- a/inc/reset/reset_bonus.php +++ b/inc/reset/reset_bonus.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Bonus-Punkte zuruecksetzen * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,19 +38,22 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) { - ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus"); +} elseif (!EXT_IS_ACTIVE('bonus')) { return; } // Do not execute when script is in CSS mode or no daily reset -if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; +if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled())) return; +//* DEBUG: */ echo basename(__FILE__)."
\n"; + +// Purge expired entries in _bonus_turbo +BONUS_PURGE_EXPIRED_TURBO_BONUS(); // Reset accounts -$result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", - __FILE__, __LINE__); +$result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", +__FILE__, __LINE__); // ?>