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>
33 <form method="GET" action="/${SCRIPTNAME}" accept-charset="utf-8">
34 <input type="hidden" name="p" value="Wiki">
35 <input type="text" name="s" placeholder="Search"><br>
36 <input type="submit" value="Search Wiki">
41 $(rno=1; for each in Wiki/$info.<0000000000-9999999999>; do
42 revi=$(cut -d. -f2 <<<"$each")
43 echo "<a class='rev' href='?p=Wiki&i=$info&r=$revi'>$rno</a>"
45 done) <a class='rev' href='?p=Wiki&i=$info'>Latest</a><br>
47 $($LOGIN && if [ -z "$lock" ]; then
48 [ -z "$rev" ] && echo "<a class='function' href='/?action=lock&p=Wiki&e=$info'>edit this page</a>"
49 [ -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."
51 echo "<b>This page is currently being edited by $lock</b><a class='function' href='/?action=lock&p=Wiki&e=$info'>edit anyway</a>"
53 $LOGIN && echo '<hr>')
54 <h1>Table of Content</h1>
56 $(cat Wiki/"${info}${rev}" |while read line; do
57 if (egrep -q '^ *###' <<<"$line"); then
58 echo "<a class='i2' href='#$(sed 's,^ *### *,,;' <<<"$line")'>$(sed 's,^ *###,,' <<<"$line")</a><br>"
59 elif (egrep -q '^ *##' <<<"$line"); then
60 echo "<a class='i1' href='#$(sed 's,^ *## *,,;' <<<"$line")'>$(sed 's,^ *##,,' <<<"$line")</a><br>"
61 elif (egrep -q '^ *#' <<<"$line"); then
62 echo "<a class='i0' href='#$(sed 's,^ *# *,,;' <<<"$line")'>$(sed 's,^ *#,,' <<<"$line")</a><br>"
69 <div class="wiki"><div class="wikitext">
70 <h1 class="wikihead">$title</h1>
71 $(_wiki Wiki/"${info}${rev}")
76 $($LOGIN && add_comment $info)
77 $(list_comments $info)