<?php define('_VALID_MOS', 1); require_once '/home1/ctcweb9/public_html/includes/alastair.php'; require_once '/home1/ctcweb9/public_html/mailchimp/moderation.config.php'; GetLogonDetails($con, $username); $dirs = array(ModerationConfig::GetInboxDir() . "/cur", ModerationConfig::GetInboxDir() . "/new", ModerationConfig::GetUnmoderatedDir() . "/cur", ModerationConfig::GetUnmoderatedDir() . "/new", ModerationConfig::GetModeratedDir() . "/cur", ModerationConfig::GetModeratedDir() . "/new"); foreach ($dirs as $dir) { $files = scandir($dir); foreach ($files as $file) { if (is_dir("{$dir}/{$file}")) { continue; } echo "deleting {$dir}/{$file}</br>"; unlink("{$dir}/{$file}"); } } $dir = "/home1/ctcweb9/public_html/mailchimp/TestEmails"; $files = scandir($dir); foreach ($files as $file) { if (is_dir("{$dir}/{$file}")) { continue; } echo "copying {$dir}/{$file} to " . ModerationConfig::GetInboxDir() . "/cur/{$file}</br>"; file_put_contents(ModerationConfig::GetInboxDir() . "/cur/{$file}", file_get_contents("{$dir}/{$file}")); }
} $args = array("action" => "edit", "msgid" => $msgid, "ctcid" => $ctcid, "modid" => $modid); $title = "Click to edit before sending"; $modbody .= "<a href='{$step2Url}?" . http_build_query($args) . "'>\n\t\t\t <img src='{$step2ImageUrl}?img=1&" . http_build_query($args) . "' {$props} title='" . htmlentities($title) . "'/></a><br/>"; $args = array("action" => "discard", "msgid" => $msgid, "ctcid" => $ctcid, "modid" => $modid); $title = "Click to discard"; $modbody .= "<a href='{$step2Url}?" . http_build_query($args) . "'>\n\t\t\t <img src='{$step2ImageUrl}?img=1&" . http_build_query($args) . "' {$props} title='" . htmlentities($title) . "'/></a><br/>"; $modbody .= "\t\t</td></tr>\n\t\t\t\t\t</table>"; if (ModerationConfig::Step1SendEnabled) { # Invoke JMail Class $mailer = JFactory::getMailer(); # Set sender array so that my name will show up neatly in your inbox $mailer->setSender($sender); # Add a recipient -- this can be a single address (string) or an array of addresses $mailer->addRecipient($modemail); $mailer->isHtml(true); $mailer->setBody($modbody); $mailer->setSubject(ModerationConfig::Step1SubjectPrefix . $subject); # Send once you have set all of your options $result = $mailer->send(); //$result = mail($modemail, ModerationConfig::Step1SubjectPrefix.$subject, $modbody, $headers); } else { $result = "Send Disabled"; } echo "\t<tr><th>Moderator</th><td>{$modemail} {$modname}</td></tr>\n\t\t\t\t<tr><th>mail() result</th><td>{$result}</td></tr>\n\t\t\t\t<tr><th>Moderation message</th><td>{$modbody}</td></tr>"; } echo "</table>"; file_put_contents(ModerationConfig::GetUnmoderatedDir() . "/cur/{$msgid},S=" . strlen($raw), $raw); unlink("{$dir}/{$file}"); } }
$ctcaction = ""; $action = "edit"; $captionimg = "Click to edit before sending or discarding"; $captionweb = "Edit before sending or discarding"; } else { $action = "warning"; $captionimg = "Already {$ctcaction}"; $captionweb = "Already {$ctcaction}"; } } } } } } if ($isImg) { $css = ModerationConfig::GetCss(); $actionSizeX = $css[".action"]["width"]; $actionSizeY = $css[".action"]["height"]; $actionGap = $css[".actiongap"]["height"]; $icon = @imagecreatefrompng("{$action}.png") or die("cannot create png image - {$action}.png"); $image = @imagecreatetruecolor($actionSizeX, $actionSizeY) or die("cannot create image"); $colorfg = $css[".{$action}"]["color"]; $colorbg = $css[".{$action}"]["background"]; $fillX = $actionSizeX; $fillY = $actionSizeY - $actionGap; imagefilledrectangle($image, 0, 0, $actionSizeX, $actionSizeY, GetColor($image, "white")); imagefilledrectangle($image, 0, 0, $fillX - 1, $fillY - 1, GetColor($image, $colorbg)); for ($x1 = 0, $y1 = 0, $x2 = $fillX - 1, $y2 = $fillY - 1; $x1 < $actionGap; $x1++, $y1++, $x2--, $y2--) { imagefilledrectangle($image, $x1, $y2, $x2, $y2, GetColor($image, $colorbg, "black")); imagefilledrectangle($image, $x2, $y1, $x2, $y2, GetColor($image, $colorbg, "black")); imagefilledrectangle($image, $x1, $y1, $x2, $y1, GetColor($image, $colorbg, "white"));