// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (isset($_POST['ok'])) {
+if (IS_FORM_SENT()) {
$result = SQL_QUERY("SELECT userid, email
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='CONFIRMED' AND nl_receive='Y'
$template = "newsletter";
// Check for extension and sending-mode
- if (!EXT_IS_ACTIVE("html_mail", true) && ($_POST['mode'] == "html")) {
+ if (!EXT_IS_ACTIVE("html_mail", true) && (REQUEST_POST('mode') == "html")) {
// Set mode to text mode
- $_POST['mode'] == "text";
- } elseif ($_POST['mode'] == "html") {
+ REQUEST_POST('mode') == "text";
+ } elseif (REQUEST_POST('mode') == "html") {
// Set HTML templates
$template = "newsletter_html";
}
// Compile message
- $_POST['text'] = COMPILE_CODE($_POST['text']);
+ REQUEST_SET_POST('text', COMPILE_CODE(REQUEST_POST('text')));
// Load template
- $msg = LOAD_EMAIL_TEMPLATE($template, array('text' => $_POST['text']), $id);
+ $msg = LOAD_EMAIL_TEMPLATE($template, array('text' => REQUEST_POST('text')), $id);
// ... and send it away!
- SEND_NEWSLETTER($email, $_POST['subject'], $msg, $_POST['mode']);
+ SEND_NEWSLETTER($email, REQUEST_POST('subject'), $msg, REQUEST_POST('mode'));
}
// Free memory