예제 #1
0
 }
 $article->loadPostVars();
 if (empty($HTTP_POST_VARS['maintext']) || $HTTP_POST_VARS['ishtml']) {
     xoops_cp_header();
     echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"even\">";
     //echo $HTTP_POST_VARS['ishtml'];
     echo _AM_NOMAINTEXT . "<br />";
     echo "</td></tr></table>";
     break;
 }
 if ($article->approved && $article->type() != "admin") {
     $article->setPublished(time());
     $isnew = '1';
 }
 $article->store();
 if (!empty($isnew) && $article->notifypub() && $article->uid() != 0) {
     $poster = new XoopsUser($article->uid());
     $subject = _AM_ARTPUBLISHED;
     $message = sprintf(_AM_HELLO, $poster->uname());
     $message .= "\n\n" . _AM_YOURARTPUB . "\n\n";
     $message .= _AM_TITLEC . $article->title() . "\n" . _AM_URLC . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/article.php?articleryid=" . $article->storyid() . "\n" . _AM_PUBLISHEDC . formatTimestamp($article->published(), "{$timestanp}", 0) . "\n\n";
     $message .= $xoopsConfig['sitename'] . "\n" . XOOPS_URL . "";
     $xoopsMailer =& getMailer();
     $xoopsMailer->useMail();
     $xoopsMailer->setToEmails($poster->getVar("email"));
     $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
     $xoopsMailer->setFromName($xoopsConfig['sitename']);
     $xoopsMailer->setSubject($subject);
     $xoopsMailer->setBody($message);
     $xoopsMailer->send();
 }