%
'*******************************************************
'*******************************************************
%>
Login Page
<%
if request.form("dologout") = "true" then
Session("userlogin")=""
response.write "You have successfully logged out"
end if
function ValidateLogin(xuserID,xpassword)
Dim FSObject
Dim LoginFile
Set FSObject = Server.CreateObject("Scripting.FileSystemObject")
Set LoginFile = FSObject.OpenTextFile(Server.MapPath(txtName),1)
ValidateLogin = False
While Not LoginFile.AtEndOfStream
line=LoginFile.ReadLine
lines_txt = Split(line,"|")
c_xuserID = lines_txt(0)
c_xpassword = lines_txt(1)
redirectpath = lines_txt(2)
if xuserID=c_xuserID and c_xpassword=xpassword Then
Session("userlogin")=c_xuserID
response.redirect siteroot & "/" & loging_folder & "/" & redirectpath
End if
Wend
LoginFile.Close
Set LoginFile = Nothing
Set FSObject = Nothing
End function
Dim xError
If Request.form("Login").Count <> 0 Then
user=Request.Form("userid")
pass=Request.Form("userpass")
if ValidateLogin(user,pass) = False Then
xError = "Wrong Username or Password"
End if
End if
%>
For THzImaging project members