<?php // Set flag that this is a parent file define('_JEXEC', 1); require_once 'mailchimp.connect.php'; $listid = $_POST['listid'] ? $_POST['listid'] : ''; $subject = $_POST['subject'] ? $_POST['subject'] : 'Enter Subject here'; $body = $_POST['body'] ? $_POST['body'] : 'Enter Body here'; $result = 'Not yet sent'; if ($_POST['send'] == 'Send') { $result = MailChimpSend($listid, $subject, $body, "*****@*****.**", "*****@*****.**", "You"); } ?> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="../media/editors/tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinyMCE.init({ mode : "textareas", theme : "simple" }); </script> <style> </style> <script> </script>
$subject = $body = $msgid = $raw = $ctcaction = ""; } else { if ($location == "unmoderated" && $action == "sending") { $captionimg = "Click to send to the {$listname} list"; } else { if ($location == "unmoderated" && ($action == "discard" || $action == "send")) { $query = SqlResultArray($con, "select firstname, lastname from ctcweb9_ctc.members where id = {$modid}"); $modname = $query[0]["firstname"] . " " . $query[0]["lastname"]; if ($action == "discard") { $ctcaction = "discarded by {$modname}"; $captionimg = "Click to discard this message"; } else { if (!ModerationConfig::Step2SendEnabled) { $ctcaction = "sent to {$listname} by {$modname} (disabled)"; } else { if (MailChimpSend($listid, $step2SubjectPrefix . $subject, $body, $from, $from, "You") === false) { $ctcaction = "NOT sent to {$listname} by {$modname} - API call failed"; $action = "warning"; } else { $ctcaction = "sent to {$listname} by {$modname}"; } } } $captionweb = "This message has just been {$ctcaction}"; if (!$isImg) { // Add ctcaction to the message $raw = "ctc-action: {$ctcaction}\n{$raw}"; file_put_contents(ModerationConfig::GetModeratedDir() . "/cur/{$msgid},S=" . strlen($raw), $raw); unlink($files[0]); if ($prevaction == "edit") { file_put_contents(ModerationConfig::GetModeratedDir() . "/cur/{$msgid}.edited.html", "<h3>" . htmlentities($subject) . "</h3>\n{$body}");