$frag_content = htmlspecialchars($edit_session->content()); $frag_edithash = htmlspecialchars($edit_session->edithash()); $frag_xsrfhash = htmlspecialchars($edit_session->xsrfhash()); $frag_remarks = htmlspecialchars($_POST['remarks']); $frag_partlength = $edit_session->is_part() ? '<input type="hidden" name="partlength" value="' . $edit_session->partlength() . '" />' . PHP_EOL : ''; lwiki\page\begin_document($frag_title, '<meta name="robots" content="none" />' . PHP_EOL); echo '<p class="lwiki-linkbar-main">'; $url_main = htmlspecialchars(lwiki_link_page()); $url_list = htmlspecialchars(lwiki_link_page(null, 'mode=list')); echo '[ <a href="' . $url_main . '">表紙</a>' . ' | <a href="' . $url_list . '">一覧</a> ]'; $url_read = htmlspecialchars(lwiki_link_page($pageid)); $url_hist = htmlspecialchars(lwiki_link_page($pageid, 'mode=hist')); $url_diff = htmlspecialchars(lwiki_link_page($pageid, 'hist=last')); echo ' [ <a href="' . $url_read . '">' . $ht_page_title . '</a>' . ' | <b>編集</b>' . ' | <a href="' . $url_hist . '">履歴</a>' . ' - <a href="' . $url_diff . '">差分</a>]' . PHP_EOL; echo '</p>'; echo '<p class="lwiki-linkbar-modified">' . page_modified_date() . '</p>'; echo '<div class="lwiki-page-content">'; if ($lwiki_edit_error != '') { echo "{$lwiki_edit_error}"; } echo '<form method="post" action="' . $frag_action . '" style="width:600px;" id="lwiki_form_edit">'; echo ' ' . $frag_partlength; echo ' <input type="hidden" name="edithash" value="' . $frag_edithash . '" />'; echo ' <input type="hidden" name="sigma" value="' . $frag_xsrfhash . '" />'; echo ' <textarea name="content" rows="20" style="width:590px;padding:5px;">' . $frag_content . '</textarea>'; echo ' <div><label>備考: <input type="text" style="width:500px;" name="remarks" value="' . $frag_remarks . '" /></label></div>'; echo ' <div style="text-align:center;margin:0.5em;">'; echo ' ' . $frag_captcha; echo ' <input type="submit" name="page_preview" value="プレビュー" />'; echo ' <input type="submit" name="page_update" value="保存" /></div>'; echo '</form>';
lwiki\page\begin_document($ht_page_title); ?> <p class="lwiki-linkbar-main"> <?php $url_main = htmlspecialchars(lwiki_link_page()); $url_list = htmlspecialchars(lwiki_link_page(null, 'mode=list')); echo '[ <a href="' . $url_main . '">表紙</a>' . ' | <a href="' . $url_list . '">一覧</a> ]'; $ht_nested = lwiki\page\generate_ancestor_links($page_title); $url_edit = htmlspecialchars(lwiki_link_page($pageid, 'mode=edit')); $url_hist = htmlspecialchars(lwiki_link_page($pageid, 'mode=hist')); $url_diff = htmlspecialchars(lwiki_link_page($pageid, 'hist=last')); echo ' [ ' . $ht_nested . ' | <a href="' . $url_edit . '">編集</a>' . ' | <a href="' . $url_hist . '">履歴</a>' . ' - <a href="' . $url_diff . '">差分</a>]' . PHP_EOL; ?> </p> <p class="lwiki-linkbar-modified"><?php echo page_modified_date(); ?> </p> <div class="lwiki-page-content"> <?php // content $fname_content = '.lwiki/data/page.' . $pageid . '.htm'; $content_exists = file_exists($fname_content); if ($content_exists) { include $fname_content; } else { echo '<p><b>Error</b>: 指定された名前「<b>' . $ht_page_title . '</b> (' . $pageid . ')」のページは存在しません。</p>'; } // comment if ($content_exists) { echo '<h2 class="comment">コメント</h2>';