コード例 #1
0
ファイル: submit.php プロジェクト: severnaya99/Sg-2010
         $message = $story->renderErrors();
     }
     redirect_header(XOOPS_URL . '/modules/AMS/article.php?storyid=' . $story->storyid, 3, $message);
     break;
 case _AMS_NW_FINDVERSION:
     if (!$approveprivilege || !$xoopsUser) {
         redirect_header(XOOPS_URL . '/modules/AMS/index.php', 3, _NOPERM);
         exit;
     }
     $story = new AmsStory($_POST['storyid']);
     $story->setUid($xoopsUser->getVar('uid'));
     $story->setHometext($hometext);
     $story->setBodytext($bodytext);
     $change = isset($_POST['change']) ? $_POST['change'] : 0;
     $story->setChange($change);
     if ($story->calculateVersion(true)) {
         if ($story->updateVersion()) {
             $message = sprintf(_AMS_NW_VERSIONUPDATED, $story->version . "." . $story->revision . "." . $story->revisionminor);
             //redirect_header('article.php?storyid='.$story->storyid(), 3, $message);
             //exit();
         } else {
             $message = $story->renderErrors();
         }
     } else {
         $message = $story->renderErrors();
     }
     redirect_header(XOOPS_URL . '/modules/AMS/article.php?storyid=' . $story->storyid(), 3, $message);
     break;
 case 'form':
 default:
     $story = new AmsStory();