6 for each in $(ls -r Wiki/${base}.comment.<0000000001-9999999999>_<000-999>); do
7 author=$(grep -m1 '^author=' "$each" |cut -d= -f2-)
8 echo "<div class='comment'><h1>$author wrote:</h1><div class='wikitext'>"
18 <a id='comment_button' class='function' href='#'
19 onclick='javascript:show_screen("comment");hide_screen("comment_button");'>Comment / Ask</a>
20 <div id="comment" style="display: none;">
21 <form action="./?action=wikimeta&i=$info" method="post" accept-charset="UTF-8">
23 <textarea name="comm" rows="6" style="width:99%;"></textarea><br>
24 <input type="submit" value="Submit">
25 <a class="function" href="#" onclick="javascript:hide_screen('comment');show_screen('comment_button');">Cancel</a>
31 wikitext="$(_wiki Wiki/"${info}${rev}")"
32 wikitoc="$(echo -E "$wikitext" \
33 | sed -rn '/<h[0-9]>.+<\/h[0-9]>/s;^.*<h([0-9])><a name="(.+)">(.+)</a></h[0-9]>.*$;<a class="i\1" href="#\2">\3</a><br>;p'
38 <form method="GET" action="./" accept-charset="utf-8">
39 <input type="hidden" name="p" value="Wiki">
40 <input type="text" name="s" placeholder="Search"><br>
41 <input type="submit" value="Search Wiki">
46 $(rno=1; for each in Wiki/$info.<0000000000-9999999999>; do
47 revi=$(cut -d. -f2 <<<"$each")
48 echo "<a class='rev' href='?p=Wiki&i=$info&r=$revi'>$rno</a>"
50 done) <a class='rev' href='?p=Wiki&i=$info'>Latest</a><br>
52 $($LOGIN && if [ -z "$lock" ]; then
53 [ -z "$rev" ] && echo "<a class='function' href='./?action=lock&p=Wiki&e=$info'>edit this page</a>"
54 [ -n "$rev" ] && echo "Click <a class='function' href='./?action=lock&p=Wiki&e=${info}&r=${rev:s/.//}'>edit</a> to derive a new page revision from this one."
56 echo "<b>This page is currently being edited by $lock</b><a class='function' href='./?action=lock&p=Wiki&e=$info'>edit anyway</a>"
58 $LOGIN && echo '<hr>')
59 <h1>Table of Content</h1>
66 <div class="wiki"><div class="wikitext">
67 <h1 class="wikihead">$title</h1>
73 $($LOGIN && add_comment $info)
74 $(list_comments $info)