<% Username = Request.Form("txtUsername") Password = Request.Form("txtPassword") Lang=Request.Form("language") if lang="-" then Response.Redirect("AdminLogin.asp?login=selLanguage") end if set conn = server.CreateObject ("ADODB.Connection") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("SubscribersChineseTest.mdb") set rs = server.CreateObject ("ADODB.Recordset") rs.Open "SELECT * FROM userlist where username='"& Username &"'", conn, 1 If rs.recordcount = 0 then rs.close conn.close set rs=nothing set conn=nothing Response.Redirect("AdminLogin.asp?login=passfailed") end if if rs("password") = Password and rs("Type") = "Administrator" then rs.Close conn.Close set rs=nothing set conn=nothing Session("Admin") = true Response.Redirect("index.asp?lang=" & lang & "") elseif rs("password") = Password and rs("Type") = "Guest" then rs.Close conn.Close set rs=nothing set conn=nothing Session("Admin") = false Response.Redirect("index.asp?lang=" & lang & "") else rs.Close conn.Close set rs=nothing set conn=nothing Response.Redirect("AdminLogin.asp?login=passfailed") end if %>