<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Class const_Cls Public LongTime, ShortTime, GetUserIP Private Sub Class_Initialize() LongTime = Now() ShortTime = Date() GetUserIP = Request.ServerVariables("REMOTE_ADDR") statusStr = "当前管理员:"+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 cclass 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 cclass where parentid="&rstemp("id")) if rsP.eof then getcatalogs = getcatalogs &""&rstemp("id")&""&tempStr&""&rstemp("orders")&"."&rstemp("classname")&"   添加 编辑 删除" else getcatalogs = getcatalogs &""&rstemp("id")&""&tempStr&""&rstemp("orders")&"."&rstemp("classname")&"   添加 编辑 删除" 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 &""&rstemp("id")&""&tempStr&""&rstemp("orders")&"."&rstemp("classname")&"   添加 编辑 删除" else getcatalogs2 = getcatalogs2 &""&rstemp("id")&""&tempStr&""&rstemp("orders")&"."&rstemp("classname")&"   添加 编辑 删除" 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 cclass 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 cclass 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 %>