%
Class const_Cls
Public LongTime, ShortTime, GetUserIP
Private Sub Class_Initialize()
LongTime = Now()
ShortTime = Date()
GetUserIP = Request.ServerVariables("REMOTE_ADDR")
statusStr = "this:"+Session("adminname")+"______IP:"+GetUserIP
'Response.Write("")
End Function
'*************************************************************
'函数作用:跳转到某个页面
'*************************************************************
Public Function GotoUrl(Str)
Response.write("")
End Function
'*************************************************************
'函数作用:返回前页
'*************************************************************
Public Function Back(ID)
Response.write("")
End Function
'*************************************************************
'函数作用:返回下载类别列表(无限级别)
'*************************************************************
Function getcatalogs(parentid,str)
Dim Sql,rstemp,TemptempStr,tempStr
if str="" then
tempStr=str&""
else
tempStr=str&""
end if
sql="select * from pclass where parentid="&parentid&" order by orders asc"
Set rstemp = conn.Execute(Sql)
if rstemp.eof then exit function
do while Not rstemp.Eof
Set rsP = conn.execute("select * from pclass where parentid="&rstemp("id"))
if rsP.eof then
getcatalogs = getcatalogs &"
"
end if
getcatalogs = getcatalogs & getcatalogs(rstemp("id"),tempStr)
rstemp.MoveNext
loop
Set rstemp = Nothing
End Function
'*************************************************************
'函数作用2:返回下载类别列表(无限级别)
'*************************************************************
Function getcatalogs2(parentid,str)
Dim Sql,rstemp,TemptempStr,tempStr
if str="" then
tempStr=str&""
else
tempStr=str&""
end if
sql="select * from psize where parentid="&parentid&" order by orders asc"
Set rstemp = conn.Execute(Sql)
if rstemp.eof then exit function
do while Not rstemp.Eof
Set rsP = conn.execute("select * from psize where parentid="&rstemp("id"))
if rsP.eof then
getcatalogs2 = getcatalogs2 &"
"
end if
getcatalogs2 = getcatalogs2 & getcatalogs2(rstemp("id"),tempStr)
rstemp.MoveNext
loop
Set rstemp = Nothing
End Function
'*************************************************************
'函数作用:返回下载类别下拉选项(无限级别)
'*************************************************************
Function getDownlist(parentid,str)
Dim Sql,rstemp,TemptempStr,tempStr
tempStr=str&"│ "
sql="select * from pclass where parentid="&parentid&""
Set rstemp = conn.Execute(Sql)
if rstemp.eof then exit function
do while Not rstemp.Eof
dim mySelect
mySelect = ""
if cint(request("ParentID"))=cint(rstemp("id")) Then mySelect = "selected"
getDownlist = getDownlist & ""
getDownlist = getDownlist & getDownlist(rstemp("id"),tempStr)
rstemp.MoveNext
loop
Set rstemp = Nothing
End Function
'*************************************************************
'函数作用:查询出来某一类别下的所有下载类别(无限搜索)
'*************************************************************
Function selectclass(ID)
Dim sql,rstemp
sql="select * from pclass where parentid="&ID
Set rstemp = conn.Execute(Sql)
if rstemp.eof then exit function
do while Not rstemp.Eof
if selectclass = "" then
selectclass = rstemp("id")& "," & selectclass(rstemp("id"))
else
selectclass = selectclass & "," & rstemp("id") & "," & selectclass(rstemp("id"))
end if
rstemp.Movenext
loop
Set rstemp = Nothing
End Function
End Class
'*************************************************************
'/* 函数名称:Zxj_ReplaceHtml ClearHtml
'/* 函数语言:VBScript Language
'/* 作 用:清除文件HTML格式函数
'/* 传递参数:Content (注:需要进行清除的内容)
'/* 函数说明:正则匹配(正则表达式)模式进行数据匹配替换
'*************************************************************
Function ClearHtml(Content)
Content=Zxj_ReplaceHtml("[^>]*;", "", Content)
Content=Zxj_ReplaceHtml("?marquee[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?object[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?param[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?embed[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?table[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?tr[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?th[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?p[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?a[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?img[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?tbody[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?li[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?span[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?div[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?th[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?td[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?script[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("(javascript|jscript|vbscript|vbs):", "", Content)
Content=Zxj_ReplaceHtml("on(mouse|exit|error|click|key)", "", Content)
Content=Zxj_ReplaceHtml("<\\?xml[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("<\/?[a-z]+:[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?font[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?h2[^>]*>", "", Content)
Content=Zxj_ReplaceHtml("?h1[^>]*>", "", Content) '除去h2标签
Content=Zxj_ReplaceHtml("?b[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?u[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?i[^>]*>","",Content)
Content=Zxj_ReplaceHtml("?strong[^>]*>","",Content)
ClearHtml=Content
End Function
Function Zxj_ReplaceHtml(patrn, strng,content)
IF IsNull(content) Then
content=""
End IF
Set regEx = New RegExp ' 建立正则表达式。
regEx.Pattern = patrn ' 设置模式。
regEx.IgnoreCase = true '设置忽略字符大小写。
regEx.Global = True '设置全局可用性。
Zxj_ReplaceHtml=regEx.Replace(content,strng) '执行正则匹配
End Function
%>