X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-send_newsletter.php;h=3b2a13d966335ebdf3783e7bb8e0b99170a20519;hp=9a4377833fc953976f36a94e5fdb466153539182;hb=3c2f106c02f6d86a90f529a0564abcbbe716fe71;hpb=5dfaf0ed80b30f53574a8866858d3e7cf05ce325 diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index 9a4377833f..3b2a13d966 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -32,15 +32,14 @@ ************************************************************************/ // 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); } + // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -OPEN_TABLE("100%", "admin_content admin_content_align", ""); if (isset($_POST['ok'])) { $result = SQL_QUERY("SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND nl_receive='Y' ORDER BY userid", __FILE__, __LINE__); @@ -68,7 +67,7 @@ if (isset($_POST['ok'])) $_POST['text'] = COMPILE_CODE($_POST['text']); // Load template - $msg = LOAD_EMAIL_TEMPLATE($template, $_POST['text'], $id); + $msg = LOAD_EMAIL_TEMPLATE($template, array('text' => $_POST['text']), $id); // ... and send it away! SEND_NEWSLETTER($email, $_POST['subject'], $msg, $_POST['mode']); @@ -96,6 +95,6 @@ if (isset($_POST['ok'])) LOAD_TEMPLATE("admin_newsletter_nohtml"); } } -CLOSE_TABLE(); + // ?>