1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00
samba-mirror/swat/esptest/exception.esp
Andrew Tridgell 580b5bb8ef r7132: - start a convention of making object constructors end in Obj, so we
now have FormObj(). This follows the style in the ejs manual

- make a new MenuObj object type, with a display_menu() to display
  it. This will make it easier to make different types of
  menus. Currently only veritical simple menus are supported.
(This used to be commit ac978d4124f773d872dd15205d90a41dcec8a38f)
2007-10-10 13:17:20 -05:00

31 lines
578 B
Plaintext

<% page_header("columns", "ESP Exception test"); %>
<h1>Samba4 exception test</h1>
<%
var f = FormObj("ExceptionTest", 0, 2);
f.submit[0] = "Generate Exception";
f.submit[1] = "No Exception";
display_form(f);
if (request['REQUEST_METHOD'] == "POST") {
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 ...
<% page_footer(); %>