r7088: start on some real structure for the SWAT web pages
[samba.git] / swat / login.esp
1 <% page_header("plain", "SWAT Login"); %>
2
3 <form name="login" method="POST" action="@@request.SCRIPT_NAME"> 
4     Username:   <input name="Username"  type="text" value=""><br>
5     Password:  <input name="Password" type="password" value=""><br>
6     <br>
7     <input name="submit" type="submit" value="Login"><br>
8 </form>
9
10 <%
11         if (request.REQUEST_METHOD == "POST") {
12                 /* for now just authenticate everyone */
13                 session.AUTHENTICATED = true;
14                 session.authinfo = new Object();
15
16                 session.authinfo.username = form.Username;
17
18                 /* if the user was asking for the login page, then now
19                    redirect them to the main page. Otherwise just
20                    redirect them to the current page, which will now
21                    show its true content */
22                 if (request.REQUEST_URI == "/login.esp") {
23                    redirect("/");
24                 } else {
25                    redirect(request.REQUEST_URI);
26                 }
27         }
28 %>
29 <% page_footer(); %>