]> git.mxchange.org Git - mailer.git/blobdiff - inc/reset/reset_beg.php
Mahor rewrite:
[mailer.git] / inc / reset / reset_beg.php
index c668ba3b2ebd77861dccec11cc674b5120df1664..3fdf322e81a1793c8cacfec3f3bf021b510d7fdc 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
-       ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
+} elseif (!EXT_IS_ACTIVE("beg")) {
        return;
 }
 
 // Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!isBooleanConstantAndTrue('__DAILY_RESET')) || ($_CONFIG['beg_rallye'] == "Y")) return;
+if (($CSS == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') == "Y")) return;
+//* DEBUG: */ echo basename(__FILE__)."<br />\n";
 
 // Reset accounts
-$result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=0.00000 WHERE beg_points > 0",
+$result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=0.00000 WHERE beg_points > 0",
  __FILE__, __LINE__);
 
 //