X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Freset%2Freset_daily.php;h=c763c0ecc5176e2e73d5777cfa65fd6841cc43ae;hb=ca7455674c0f02d34cbfc22a823393ba629a5160;hp=d18d2fbd629c3dbef228117e36d472918b147b23;hpb=c45b1827a16928c65ecc1aea6a9d7a504c4874d4;p=mailer.git diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index d18d2fbd62..c763c0ecc5 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -32,8 +32,7 @@ ************************************************************************/ // 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); } @@ -64,7 +63,7 @@ WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth", while (list($dep, $locked) = SQL_FETCHROW($result_points)) { $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s, locked_points=0.00000 -WHERE userid=%s AND ref_depth=%s LIMIT 1", +WHERE userid=%s AND ref_depth=%d LIMIT 1", array($locked, bigintval($uid), $dep), __FILE__, __LINE__); // Update mediadata as well