************************************************************************/
// 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')) || ($_CONFIG['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",