6 stat -c '' Wiki/${base}.comment.<0000000001-9999999999>_<000-999> \
7 && for each in $(ls -c Wiki/${base}.comment.<0000000001-9999999999>_<000-999>); do
8 author=$(grep -m1 '^author=' "$each" |cut -d= -f2-)
9 echo "<div class='comment'><h1>$author wrote:</h1><div class='wikitext'>"
10 tail -n+2 $each |_wiki
19 <a id='comment_button' class='function' href='#'
20 onclick='javascript:show_screen("comment");hide_screen("comment_button");'>Comment / Ask</a>
21 <div id="comment" style="display: none;">
22 <form action="/?action=wikimeta&i=$info" method="post" accept-charset="UTF-8">
24 <textarea name="comm" rows="6" style="width:99%;"></textarea><br>
25 <input type="submit" value="Submit">
26 <a class="function" href="#" onclick="javascript:hide_screen('comment');show_screen('comment_button');">Cancel</a>
34 <form method="GET" action="/${SCRIPTNAME}" accept-charset="utf-8">
35 <input type="hidden" name="p" value="Wiki">
36 <input type="text" name="s" placeholder="Search"><br>
37 <input type="submit" value="Search Wiki">
42 $(rno=1; for each in Wiki/$info.<0000000000-9999999999>; do
43 revi=$(cut -d. -f2 <<<"$each")
44 echo "<a class='rev' href='?p=Wiki&i=$info&r=$revi'>$rno</a>"
46 done) <a class='rev' href='?p=Wiki&i=$info'>Latest</a><br>
48 $($LOGIN && if [ -z "$lock" ]; then
49 [ -z "$rev" ] && echo "<a class='function' href='/?action=lock&p=Wiki&e=$info'>edit this page</a>"
50 [ -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."
52 echo "<b>This page is currently being edited by $lock</b><a class='function' href='/?action=lock&p=Wiki&e=$info'>edit anyway</a>"
54 $LOGIN && echo '<hr>')
55 <h1>Table of Content</h1>
57 $(cat Wiki/"${info}${rev}" |while read line; do
58 if (egrep -q '^ *###' <<<"$line"); then
59 echo "<a class='i2' href='#$(sed 's,^ *### *,,;' <<<"$line")'>$(sed 's,^ *###,,' <<<"$line")</a><br>"
60 elif (egrep -q '^ *##' <<<"$line"); then
61 echo "<a class='i1' href='#$(sed 's,^ *## *,,;' <<<"$line")'>$(sed 's,^ *##,,' <<<"$line")</a><br>"
62 elif (egrep -q '^ *#' <<<"$line"); then
63 echo "<a class='i0' href='#$(sed 's,^ *# *,,;' <<<"$line")'>$(sed 's,^ *#,,' <<<"$line")</a><br>"
70 <div class="wiki"><div class="wikitext">
72 $(_wiki Wiki/"${info}${rev}")
77 $($LOGIN && add_comment $info)
78 $(list_comments $info)