コード例 #1
0
ファイル: submit.php プロジェクト: severnaya99/Sg-2010
     if (!$approveprivilege) {
         redirect_header(XOOPS_URL . '/modules/AMS/index.php', 0, _NOPERM);
         break;
     }
     $storyid = $_REQUEST['storyid'];
     $story = new AmsStory($storyid);
     echo $story->getPath(true) . " > " . _EDIT . " " . $story->title();
     echo "<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
     echo "<h4>" . _AMS_AM_EDITARTICLE . "</h4>";
     if ($story->published() > 0) {
         $story->setApproved(1);
     } else {
         $story->setApproved(0);
     }
     $edit = true;
     $type = $story->type();
     $story->uname();
     $author = $story->uname;
     include "include/storyform.inc.php";
     echo "</td></tr></table>";
     break;
 case "preview":
     $xt = new AmsTopic($xoopsDB->prefix("ams_topics"), $_POST['topic_id']);
     //$hometext = $_POST['hometext'];
     //$bodytext = $_POST['bodytext'];
     if (isset($_POST['storyid'])) {
         $story = new AmsStory($storyid);
         $edit = true;
     } else {
         $story = new AmsStory();
         $story->setPublished(0);