当前位置:淘百问>百科问答><%@ LANGUAGE = VBScript.Encode %>

<%@ LANGUAGE = VBScript.Encode %>

2023-08-13 01:22:21 编辑:join 浏览量:575

<%@ LANGUAGE = VBScript.Encode %>

这一部分解出来就是下边

<%

Function OpenOrGet_Database(SessionName )

Dim conn

If Not IsObject(Session(SessionName)) Then

Set conn = Server.CreateObject("ADODB.Connection")

db="aspdata/g0p0s1!#@001.mdb"

connstr="driver=2Microsoft Access Driver (*.mdb)};Pwd=gps001; dbq=" & Server.MapPath(""&db&"")

'connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")

conn.Open connstr

Set Session(SessionName) = conn

End If

Set OpenOrGet_Database = Session(SessionName)

End Function

Function CheckPwd( ID, Pwd )

Dim conn, param, rs

Set conn = OpenOrGet_Database("gpsdepot_conn")

sql = "Select * From USERS Where USR_NAME = " & Sqlstr(ID)

Set rs = Server.CreateObject("ADODB.Recordset")

rs.Open sql, conn, 1,1

Dim InitialPS.,PassWord,MyPass,Standard

If rs.RecordCount > 0 then

InitialPS. = rs("USR_INTPSW")

MyDate = Date()

MyYear = Year(MyDate)

MyMonth = Month(MyDate)

MyDay = Day(MyDate)

MyPass = (InitialPSW + 2 + MyYear +MyMonth)* MyDay

Password = Right(MyPass,6)

'Password = rs("USR_INTPSW")

Standard = Password n Pwd

End if

If rs.RecordCount <= 0 then

CheckPwd = False

Elseif rs.EOF Then

CheckPwd = False

Elseif Standard = 0 Then

CheckPwd = True

Session("Usr_Name") = ID

Session("Usr_IntPsw") = InitialPS.

Session("Usr_Company")= rs("USR_COMPANY")

Session("Usr_Class") = rs("USR_CLASS")

Session("Usr_Chnname") = rs("USR_CHNNAME")

Session("Usr_CMPCODE") = rs("CMP_CODE")

Session.timeout= 55

Else

CheckPwd = False

End If

End Function

%>

标签:LANGUAGE,VBScript,Encode

版权声明:文章由 淘百问 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.taobaiwen.com/answer/279485.html
热门文章