<?cs include:"zeromin2/header.cs" ?>

<?cs include:"zeromin2/menu_bbs.cs" ?>

<?cs include:"zeromin2/res_side_menu.cs" ?>

<div id="main">

<form id="threadEditContainerForm" action="<?cs var:html_escape(ZerominScript) ?>" method="post">

<div id="navhead">
  <hr />
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=bbs&amp;method=load&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">掲示板管理</a>
  &gt;
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=bbs&amp;method=load_index&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false"><?cs var:html_escape(BBS_TITLE) ?></a>
  &gt;
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=thread&amp;method=load&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;key=<?cs var:html_escape(KEY) ?>&amp;option=l50&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false"><?cs var:Subject ?></a>
  &gt;
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=thread&amp;method=load_revision&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;key=<?cs var:html_escape(KEY) ?>&amp;resno=<?cs var:html_escape(Resno) ?>&amp;revision=<?cs var:html_escape(CurrentId) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">レスのリビジョン管理</a>
</div>

<h1>レスのリビジョン管理</h1>

<?cs if:Code0 ?>
<?cs if:Done_thread_revert_res ?><div class="noticeSuccess" id="notify"><p>レス内容を指定されたリビジョン番号に戻しました</p></div>
<?cs else ?><div class="" id="notify"></div><?cs /if ?>
<?cs else ?>
<?cs if:Code1 ?><div class="noticeFailed" id="notify"><p>実行権限がありません</p></div><?cs /if ?>
<?cs /if ?>

<script type="text/javascript" src="<?cs var:html_escape(StaticURI) ?>/js/zeromin2/respreview.js" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8">
//<![CDATA[
var formArea;
jQuery(function(){
new Zeromin2.ResPreview({
    "content":     "<div class='footer' id='preview'></div>",
    "date":        "<?cs var:html_escape(item.date) ?>",
    "formID":      "threadEditContainerForm",
    "isTypeTheme": <?cs if:IsTypeTheme ?>true<?cs else ?>false<?cs /if ?>,
    "staticURI":   "<?cs var:html_escape(StaticURI) ?>",
    "text":        "<?cs var:text ?>",
    "typeTheme":   "<?cs var:html_escape(BBS_TYPE_THEME) ?>" });
});
//]]>
</script>

<p>
現在のレスのリビジョン番号は<?cs var:html_escape(CurrentId) ?>です。<br />
リビジョン番号を指定し、「参照」でレス内容を参照、「リバート」でレス内容を戻すことが出来ます。
</p>
<p>
<?cs if:LatestId ?>
リビジョン番号
<select name="revision">
<?cs each:item = Revisions ?><option value="<?cs var:html_escape(item.revision) ?>"<?cs if:item.selected ?> selected="selected"<?cs /if ?>><?cs var:html_escape(item.revision) ?></option><?cs /each ?>
</select>
<select name="method">
<option value="load_revision">参照</option>
<option value="revert_res">リバート</option>
</select><br />
<input type="submit" value="実行" />
<?cs /if ?>
</p>

<p>
<div id="previewFrame" class="hide"><iframe></iframe></div>
<label for="FROM" title="FROM">名前欄</label>
<input type="text" size="40" id="FROM" name="FROM" title="FROM" value="<?cs var:html_escape(Name) ?>" <?cs if:!IsNameEditable ?>disabled="disabled"<?cs /if ?>/><br />
<label for="mail" title="mail">メール欄</label>
<input type="text" size="40" id="mail" name="mail" title="mail" value="<?cs var:html_escape(Mail) ?>" disabled="disabled" /><br />
<label for="date" title="date">時刻</label>
<input type="text" size="40" id="date" name="date" title="date" value="<?cs var:html_escape(Date) ?>" disabled="disabled"/><br />
本文<br />
<textarea name="MESSAGE" cols="50" rows="10" disabled="disabled">
<?cs var:html_escape(Message) ?>
</textarea><br />
</p>

<div class="formFooter">
<input type="hidden" name="<?cs var:html_escape(SessionName) ?>" value="<?cs var:html_escape(Session) ?>" />
<input type="hidden" name="token" value="<?cs var:html_escape(Token) ?>" />
<input type="hidden" name="class" value="thread" />
<input type="hidden" name="bbs" value="<?cs var:html_escape(BBS) ?>" />
<input type="hidden" name="key" value="<?cs var:html_escape(KEY) ?>" />
<input type="hidden" name="resno" value="<?cs var:html_escape(Resno) ?>" />
<input type="hidden" name="OK" value="load_revision" />
<input type="hidden" name="NG" value="load_revision" />
<br id="endmain" />
</div>

</form>

</div>

<?cs include:"zeromin2/footer.cs" ?>
