6 <h1>Samba4 session test</h1>
8 <form name="SessionTest" method="POST" action="@@request['SCRIPT_NAME']">
9 Name: <input name="Name" type="text" value=""><br>
10 Value: <input name="Value" type="text" value=""><br>
11 Timeout: <input name="Timeout" type="text" value=""><br>
12 <input name="submit" type="submit" value="Append">
13 <input name="submit" type="submit" value="Reset">
14 <input name="submit" type="submit" value="Destroy">
15 <input name="submit" type="submit" value="Cancel"><br>
19 /* if its a post then the user has filled in the form, so
22 if (request['REQUEST_METHOD'] == "POST") {
23 /* if they cancelled then take them back to the list of tests */
24 if (form['submit'] == "Cancel") {
25 redirect("index.esp");
29 value = form['Value'];
30 timeout = form['Timeout'];
36 if (form['submit'] == "Reset" && name) {
40 if (form['submit'] == "Append" && name) {
41 session[name] = "" + session[name] + value;
44 if (form['submit'] == "Destroy") {
49 function showArray(name, array) {
50 write("<h3>Array: " + name + "</h3>\n");
51 if (array == undefined) {
52 write("undefined<br>\n");
56 write(name + "[" + v + "]=" + array[v] + "<br>\n");
60 showArray("session", session);
61 write("SessionId=" + request['SESSION_ID'] + "<br>\n");