Add some comments and replace get_post_args with load_post_args

This commit is contained in:
Uriel 2009-01-24 07:11:39 +01:00
parent ce23320a4d
commit f87339e98b
5 changed files with 49 additions and 23 deletions

View file

@ -1,6 +1,29 @@
<pre>
% env | escape_html
---------------------
% umask
</pre>
% if(! ~ $#debug_shell 0) {
<form method="POST" name="prompt">
<input type="text" name="command" />
<input type="submit" Value="Run" />
</form>
<script language="javascript"><!--
document.prompt.command.focus()
//--></script>
%{
fn evl {
# Buffering is probably messing this up:
#rc -c 'flag x +;{'^$post_arg_command'} |[2] awk ''{print ">> "$0}'''
rc -c 'flag x +;'^$post_arg_command
}
if(! ~ $#post_arg_command 0 && ! ~ $#post_arg_command '') {
echo '<hr /><pre>'
evl | escape_html |[2] awk '{print "<b>"$0"</b>"}'
echo '</pre>'
}
%}
% }
<hr /><pre>
% env | escape_html
</pre><hr />
% umask

View file

@ -1,13 +1,14 @@
%{
if(check_user)
echo 'You are logged in as' $logged_user
if not if (~ $REQUEST_METHOD POST)
echo 'Login failed!'
%}
<h1>User login</h1>
<br />
% if(check_user) {
You are logged in as: <b>%($logged_user%)</b>
% }
% if not {
% if (~ $REQUEST_METHOD POST)
% echo 'Login failed!'
<form method="POST">
User name: <input type="text" name="user_name" /><br />
User password: <input type="password" name="user_password" /><br />
<input name="s" type="submit" value="Login" />
</form>
% }