<?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:html_escape(Subject) ?></a>
  &gt;
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=thread&amp;method=edit_res_form&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;key=<?cs var:html_escape(KEY) ?>&amp;resno=<?cs var:html_escape(Resno) ?>&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_edit_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:Code2 ?><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>
レスの編集を行います。レス編集または通常削除をする前のレスに戻す場合は<br />
<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;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">レスのリビジョン管理</a>でレス内容の復帰を行ってください。
</p>

<p>
<div id="previewFrame" class="hide"><iframe></iframe></div>
<input type="submit" value="レス番号<?cs var:html_escape(Resno) ?>を下記の内容に更新する" /><br />
<?cs if:IsFirstRes ?>
<label for="subject" title="subject">スレッドの題名</label>
<input type="text" size="40" id="subject" name="subject" title="subject" value="<?cs var:html_escape(Subject) ?>" />
<?cs /if ?>
<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) ?>" /><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 />
<label for="MESSAGE" title="MESSAGE">本文</label>
<textarea name="MESSAGE" cols="50" rows="10">
<?cs var:html_escape(Message) ?>
</textarea>
</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="method" value="edit_res" />
<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="edit_res_form" />
<input type="hidden" name="NG" value="edit_res_form" />
<br id="endmain" />
</div>

</form>

</div>

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