diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-05-26 02:40:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:17:02 -0500 |
commit | 9f9b8aa8ea9b0d2fadaa4259c821ad9aae0af0cc (patch) | |
tree | ef3957d6294a228d6f60c509fc76c7a9db9a6681 /swat/esptest | |
parent | a81630c0c43c756b74feea84019769357f03a3e5 (diff) | |
download | samba-9f9b8aa8ea9b0d2fadaa4259c821ad9aae0af0cc.tar.gz samba-9f9b8aa8ea9b0d2fadaa4259c821ad9aae0af0cc.tar.xz samba-9f9b8aa8ea9b0d2fadaa4259c821ad9aae0af0cc.zip |
r6985: rearranged the directory structure so as to make it possible to support esp include() call
(This used to be commit d747b063393097c05ab1d2c0f78178f166eb6b92)
Diffstat (limited to 'swat/esptest')
-rw-r--r-- | swat/esptest/formtest.html | 41 | ||||
-rw-r--r-- | swat/esptest/index.html | 23 | ||||
-rw-r--r-- | swat/esptest/showvars.html | 32 |
3 files changed, 96 insertions, 0 deletions
diff --git a/swat/esptest/formtest.html b/swat/esptest/formtest.html new file mode 100644 index 00000000000..8de25f76a5d --- /dev/null +++ b/swat/esptest/formtest.html @@ -0,0 +1,41 @@ +<HTML> +<TITLE> +Samba4 ESP test +</TITLE> +<BODY> +<h1>Samba4 form test</h1> + +<form name="FormTest" method="POST" action="@@request['SCRIPT_NAME']"> + firstName: <input name="firstName" type="text" value=""><br> + lastName: <input name="lastName" type="text" value=""><br> + <input name="submit" type="submit" value="OK"> + <input name="submit" type="submit" value="Cancel"><br> +</form> + +<% + /* if its a post then the user has filled in the form, so + report the values + */ + if (request['REQUEST_METHOD'] == "POST") { + + /* if they cancelled then take them back to the list of tests */ + if (form['submit'] == "Cancel") { + redirect("index.html"); + } +%> + You chose firstName=@@form['firstName'] lastName=@@form['lastName'] +<% + + function showArray(name, array) { + write("<h3>Array: " + name + "</h3>\n"); + for (v in array) { + write(name + "[" + v + "]=" + array[v] + "<br>\n"); + } + } + + showArray("form", form); + } +%> + +</BODY> +</HTML> diff --git a/swat/esptest/index.html b/swat/esptest/index.html new file mode 100644 index 00000000000..957e7d94fa7 --- /dev/null +++ b/swat/esptest/index.html @@ -0,0 +1,23 @@ +<% + var tests = new Array("formtest", "showvars"); +%> + +<HTML> +<TITLE> +Samba4 ESP test +</TITLE> +<BODY> +<img src="/images/logo.png" alt="Samba"> +<h1>Samba4 ESP test</h1> + +Please choose one of the following tests: +<ul> +<% + for (test in tests) { + url = tests[test] + ".html"; + write("<li> <a href=" + url + ">" + tests[test] + "</a>"); + } +%> +</ul> +</BODY> +</HTML> diff --git a/swat/esptest/showvars.html b/swat/esptest/showvars.html new file mode 100644 index 00000000000..4c4a5b93f44 --- /dev/null +++ b/swat/esptest/showvars.html @@ -0,0 +1,32 @@ +<HTML> +<TITLE> +Samba4 ESP test +</TITLE> +<BODY> +<h1>Samba4 showvars test</h1> + +<% + function showArray(name, array) { + write("<h3>Array: " + name + "</h3>\n"); + for (v in array) { + write(name + "[" + v + "]=" + array[v] + "<br>\n"); + } + } + + showArray("form", form); + showArray("headers", headers); + showArray("application", application); + showArray("cookies", cookies); + showArray("files", files); + showArray("request", request); + showArray("server", server); + showArray("session", session); +%> + +<form name="Cancel" method="POST" action="index.html"> + <input name="submit" type="submit" value="Cancel"><br> +</form> + +</ul> +</BODY> +</HTML> |