hi all
i asked myself, why there is no web-based admin tool for LRP which allows
the admin to ENTER something. weblet is great but just a viewer.
i first tried to use weblet for HTML forms with post or get method. i found
out, that weblet don't support any methods.
BUT thttpd does! then i tried how to get form entries parsed with bash. i
wrote a script which parses the entries from the user by GET method. result
is:
$[fieldname]=[string by user]
it runs with more than one form field....
i'm not the bash guru, can someone have a look at my script and tell me, if
there is a better way to do that (w/o writing to a temp file).
i hope this example is useful for those who want to develop some html forms
which allows to admin a LRP box through browser. i know that this is a
potential security whole but perhaps someone knows how to protect webpages
with a password in thttpd
(.htaccess !?)
greetings
Sandro Minola
(Script at the bottom)
Example Script:
#!/bin/sh
STRINGS=`echo $QUERY_STRING|cut -d'&' -f*`
for STRING in $STRINGS ; do
echo $STRING >> /var/tmp/wwwget.tmp
done ; unset STRING ; unset STRINGS
. /var/tmp/wwwget.tmp
cat <<- /HTML-DATA
Content-type: text/html
<HTML><HEAD><TITLE>HTML Form TEST Page</TITLE></HEAD>
$(echo $NAMEOFFIELD1)
$(echo $NAMEOFFIELD2)
$(echo $NAMEOFFIELD?)
$(rm /var/tmp/wwwget.tmp)
</BODY></HTML>
/HTML-DATA
_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user