<% page_header("plain", "SWAT Login"); %> <% var f = Form("login", 2, 1); f.element[0].label = "Username"; f.element[1].label = "Password"; f.submit[0] = "Login"; display_form(f); %> <% if (request.REQUEST_METHOD == "POST") { /* for now just authenticate everyone */ session.AUTHENTICATED = true; session.authinfo = new Object(); session.authinfo.username = form.Username; /* if the user was asking for the login page, then now redirect them to the main page. Otherwise just redirect them to the current page, which will now show its true content */ if (request.REQUEST_URI == "/login.esp") { redirect("/"); } else { redirect(request.REQUEST_URI); } } %> <% page_footer(); %>