% '******************************************************* '* * VT-Auth v1.0 '* * '* * Release Date: February 15, 2005 '* * '* * Copyright © 2005 Vlad Titarenko '* * '* * Please direct all inquiries to vtsupport@rovno.info '* * '* * Or visit: http://vt.rovno.info '* * '******************************************************* %> <% 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 & "/" & vt_auth_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 User ID or Password" End if End if %>
|
|||||||||||||||||||||||||||||||||||||||||||