1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

r7005: added a esp page to demonstrate exception handling

(This used to be commit 96c15646d2f29dd2839a2bab4b9e57bddfd2cee1)
This commit is contained in:
Andrew Tridgell 2005-05-27 04:37:51 +00:00 committed by Gerald (Jerry) Carter
parent 2cdce8d1aa
commit 96df7fcbf9
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,37 @@
<HTML>
<TITLE>
Samba4 ESP test
</TITLE>
<BODY>
<h1>Samba4 exception test</h1>
<form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']">
<input name="submit" type="submit" value="Generate Exception">
<input name="submit" type="submit" value="No Exception">
<input name="submit" type="submit" value="Cancel"><br>
</form>
<%
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
redirect("index.esp");
}
function TestFunction(arg1, arg2) {
return "OK";
}
if (form['submit'] == "Generate Exception") {
write("I expect you to die Mr Bond!<br>\n");
TestFunction("foo");
} else {
write("no exception<br>\n");
TestFunction("foo", "bar");
}
}
%>
and here is some filler text ...
</BODY>
</HTML>

View File

@ -1,5 +1,6 @@
<%
var tests = new Array("formtest", "showvars", "include", "session", "loadparm");
var tests = new Array("formtest", "showvars", "include",
"session", "loadparm", "exception");
%>
<HTML>