if [ -n "$edit" -a -r "Wiki/${edit}${rev}" ]; then
title="$(egrep -x 'title=.+' "Wiki/$edit.meta" |cut -d= -f2- || echo '(Untitled)')"
cat <<WikiEND
- <form class="edit" action="write/wikiedit.cgi?i=$edit" method="post" accept-charset="UTF-8">
+ <form class="edit" action="write/$($LOGIN && echo user_)wikiedit.cgi?i=$edit" method="post" accept-charset="UTF-8">
<div id="LEFT">
Editing <b>$title</b><br>
<input type="submit" value="Submit">
done) <a class='rev' href='?p=Wiki&i=$info'>Latest</a><br>
<hr>
$($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."
+ [ -z "$rev" ] && echo "<a class='function' href='write/$($LOGIN && echo user_)lock.cgi?p=Wiki&e=$info'>edit this page</a>"
+ [ -n "$rev" ] && echo "Click <a class='function' href='write/$($LOGIN && echo user_)lock.cgi?p=Wiki&e=${info}&r=${rev:s/.//}'>edit</a> to derive a new page revision from this one."
else
- echo "<b>This page is currently being edited by $lock</b><a class='function' href='write/lock.cgi?p=Wiki&e=$info'>edit anyway</a>"
+ echo "<b>This page is currently being edited by $lock</b><a class='function' href='write/$($LOGIN && echo user_)lock.cgi?p=Wiki&e=$info'>edit anyway</a>"
fi
$LOGIN && echo '<hr>')
<h1>Table of Content</h1>
$LOGIN && cat <<WikiEND
<a id='comment_button' class='function' href='#' onclick='javascript:show_screen("comment");hide_screen("comment_button");'>Comment / Ask</a>
<div id="comment" style="display: none;">
- <form action="/write/wikimeta.cgi?i=$info" method="post" accept-charset="UTF-8">
+ <form action="/write/$($LOGIN && echo user_)wikimeta.cgi?i=$info" method="post" accept-charset="UTF-8">
<b>Comment:</b><br>
<textarea name="comm" rows="6" style="width:99%;"></textarea><br>
<input type="submit" value="Submit">
$LOGIN && cat <<WikiEND
<a id='addp_button' class='function' href='#' onclick='javascript:show_screen("add_page");hide_screen("addp_button");'>Add a new Page</a>
<div id="add_page" style="display: none;">
- <form action="/write/wikimeta.cgi" method="post" accept-charset="UTF-8">
+ <form action="/write/$($LOGIN && echo user_)wikimeta.cgi" method="post" accept-charset="UTF-8">
<br><b>Title:</b><br>
<input type="text" name="title" placeholder="Fill in a title"><br>
<b>Description:</b><br>