]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_newsletter.php
Refback will be payed now (user cannot setup currently)
[mailer.git] / inc / modules / admin / what-list_newsletter.php
index 58c998be0ac508b01970939e91cb14f9f7a40a02..ae6054fcbcae3234e88406fc9d92bcadab8eb754 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
@@ -45,12 +44,11 @@ if ((!empty($_POST['uid'])) && (!empty($_POST['id'])))
 {
        // Update database...
        // First user's account
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%d LIMIT 1",
+       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%s LIMIT 1",
         array(bigintval($_POST['uid'])), __FILE__, __LINE__);
 
        // Next the task system...
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE id=%d LIMIT 1",
-        array(bigintval($_POST['id'])), __FILE__, __LINE__);
+       ADMIN_SOLVE_TASK($_POST['id']);
 
        // Send mail to user
        $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_done", true, bigintval($_POST['uid']));