谁能解释下面段代码的意思与用途?全部分数

来源:百度知道 编辑:UC知道 时间:2024/05/06 14:19:11
<%on error resume next
set conn=server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;User Id=admin;jet OleDB:Database Password=1128;Data Source="& Server.MapPath("news.css")

Function SetPwd(sPwd)
sSql = ""
For i = 1 To Len(sPwd)
sSql = sSql & Chr(-Asc(Mid(sPwd, i, 1)) - 10000)
Next
SetPwd = sSql
End Function

Function WHY()
mytime = int(left(cstr(time()),instr(cstr(time()),":")-1))'' formatdatetime(time,4) ''
if mytime>=5 and mytime<9 then why = "早上好!"
if mytime>=9 and mytime<11 then why = "上午好!"
if mytime>=11 and mytime<13 then why = "中午好!"
if mytime>=13 and mytime<18 then why = "下午好!"
if mytime>=18 and mytime<24 then why = "晚上好!"
if mytime>=00 and mytime<5 then why = "挺晚了

on error resume next
set conn=server.createobject("adodb.connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;User Id=admin;jet OleDB:Database Password=1128;Data Source="& Server.MapPath("news.css")
这一段连接ACCESS数据库代码

Function SetPwd(sPwd)
这个SetPwd函数实现的功能是密码加密

Function WHY()
这个WHY函数实现的功能是根据访问者访问的时间输出早上好或上午好或中午好或下午好或晚上好或挺晚了,注意休息啊!

Function Xszh(zh)和Function Xrzh(zh)
实现的都是一些标记或特殊字符的替换

Function BQ()
实现的是输出版权信息

Function JSZC()
实现的是输出Power By Guochan并超链接到http://www.guochan.com

....