- $($LOGIN && [ -z "$rev" ] && if [ -z "$lock" ]; then
- echo "<a class='function' href='write/lock.cgi?p=Wiki&e=$info'>edit this page</a>"
+ $($LOGIN && if [ -z "$lock" ]; then
+ [ -z "$rev" ] && echo "<a class='function' href='write/lock.cgi?p=Wiki&e=$info'>edit this page</a>"
+ [ -n "$rev" ] && echo "Click <a class='function' href='write/lock.cgi?p=Wiki&e=${info}&r=${rev:s/.//}'>edit</a> to derive a new page revision from this one."
<form action="/write/wikimeta.cgi?i=$info" method="post" accept-charset="UTF-8">
<b>Comment:</b><br>
<textarea name="comm" rows="6" style="width:99%;"></textarea><br>
<form action="/write/wikimeta.cgi?i=$info" method="post" accept-charset="UTF-8">
<b>Comment:</b><br>
<textarea name="comm" rows="6" style="width:99%;"></textarea><br>
<a class="function" href="#" onclick="javascript:hide_screen('comment');show_screen('comment_button');">Cancel</a>
</form>
</div>
WikiEND
stat -c '' Wiki/${info}.comment.<0000000000-9999999999>_<000-999> && for each in $(ls -c Wiki/${info}.comment.<0000000000-9999999999>_<000-999>); do
author=$(grep -m1 '^author=' "$each" |cut -d= -f2-)
<a class="function" href="#" onclick="javascript:hide_screen('comment');show_screen('comment_button');">Cancel</a>
</form>
</div>
WikiEND
stat -c '' Wiki/${info}.comment.<0000000000-9999999999>_<000-999> && for each in $(ls -c Wiki/${info}.comment.<0000000000-9999999999>_<000-999>); do
author=$(grep -m1 '^author=' "$each" |cut -d= -f2-)
for each in $(grep -ile "$search" Wiki/<0000000000-9999999999>_<000-999>); do
echo "<div class='search'><a href='?p=Wiki&i=${each:t}'><h2>$(grep '^title=' "$each.meta" |cut -d= -f2-)</h2></a>"
grep -C1 -ie "$search" "$each" |sed "s:$search:<b>&</b>:g;s:$:<br>:g"
for each in $(grep -ile "$search" Wiki/<0000000000-9999999999>_<000-999>); do
echo "<div class='search'><a href='?p=Wiki&i=${each:t}'><h2>$(grep '^title=' "$each.meta" |cut -d= -f2-)</h2></a>"
grep -C1 -ie "$search" "$each" |sed "s:$search:<b>&</b>:g;s:$:<br>:g"
<input type="text" name="title" placeholder="Fill in a title"><br>
<b>Description:</b><br>
<textarea name="desc" rows="6" ></textarea><br>
<input type="text" name="title" placeholder="Fill in a title"><br>
<b>Description:</b><br>
<textarea name="desc" rows="6" ></textarea><br>
<a name="$info" href="/?p=Wiki&i=$info"><h1>$title</h1></a>
$description<br><br>
<a class="function" href="/?p=Wiki&i=$info">View</a>
<a name="$info" href="/?p=Wiki&i=$info"><h1>$title</h1></a>
$description<br><br>
<a class="function" href="/?p=Wiki&i=$info">View</a>
<b>Title:</b> <input type="text" name="title" value="$title"><br>
<b>Description:</b><br>
<textarea name="desc" rows="6" style="width:100%;">$description</textarea><br>
<b>Title:</b> <input type="text" name="title" value="$title"><br>
<b>Description:</b><br>
<textarea name="desc" rows="6" style="width:100%;">$description</textarea><br>