Пример #1
0
         $article->setUid($article->uid());
     } else {
         $article->setUid($HTTP_POST_VARS['changeuser']);
     }
 } else {
     $article = new WfsArticle();
     if ($HTTP_POST_VARS['changeuser'] == '-1') {
         $uid = $xoopsUser->getvar('uid');
         $article->setUid($uid);
     } else {
         $article->setUid($HTTP_POST_VARS['changeuser']);
     }
     $article->settype("admin");
     $article->setPublished(time());
 }
 $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());