Example #1
0
    $frag_title = '新規作成:' . $ht_page_title;
} else {
    if ($edit_session->is_part()) {
        $frag_action = htmlspecialchars(lwiki_link_page($pageid, 'mode=edit&part=' . urlencode($_GET['part'])));
        $frag_title = '部分編集:' . $ht_page_title;
    } else {
        $frag_action = htmlspecialchars(lwiki_link_page($pageid, 'mode=edit'));
        $frag_title = '編集:' . $ht_page_title;
    }
}
$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">';
Example #2
0
<?php

// -*- mode:php -*-
require_once 'lib.page.php';
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>';