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