📄 function.asp
字号:
end if
Rs.close
get_MonthTop = get_MonthTop & "</table>"& vbcrlf
end function
'***********************************************************************
'推荐软件
function get_Commend(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits,strSoftName
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,AllHits from SoftDown_SoftInfo where isCommend=1 order by SoftTime desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,AllHits from SoftDown_SoftInfo where RootID="&CatalogID&" and isCommend=1 order by SoftTime desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,AllHits from SoftDown_SoftInfo where CatalogID="&CatalogID&" and isCommend=1 order by SoftTime desc"
end if
end if
get_Commend = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_Commend = get_Commend & " <tr>"& vbcrlf
get_Commend = get_Commend & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_Commend = get_Commend & " </tr>"& vbcrlf
else
do while not Rs.eof
if showHits=0 then
strHits=""
else
strHits=Rs("AllHits")
end if
strSoftName=rs("SoftName")&" "&rs("SoftVer")
get_Commend = get_Commend & " <tr>"& vbcrlf
get_Commend = get_Commend & " <td>·<a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&""">"&cutStr(trim(strSoftName),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
get_Commend = get_Commend & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
get_Commend = get_Commend & "</table>"& vbcrlf
end function
'******************************************************************************************
'图片最近更新调用过程
function get_update_imgages(CatalogID,topNum,cutNum,intWidth,intHeight,isWH,isRoot)
if CatalogID=0 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime,images from SoftDown_SoftInfo where images<>'' order by SoftTime desc"
else
if isRoot=1 then
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime,images from SoftDown_SoftInfo where RootID="&CatalogID&" and images<>'' order by SoftTime desc"
else
sql="select top "&topNum&" SoftID,SoftName,SoftVer,SoftTime,images from SoftDown_SoftInfo where CatalogID="&CatalogID&" and images<>'' order by SoftTime desc"
end if
end if
get_update_imgages = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""3"">"& vbcrlf
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
get_update_imgages = get_update_imgages & " <tr>"& vbcrlf
get_update_imgages = get_update_imgages & " <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
get_update_imgages = get_update_imgages & " </tr>"& vbcrlf
else
if isWH=1 then get_update_imgages = get_update_imgages & " </tr>"& vbcrlf
do while not Rs.eof
strSoftName=rs("SoftName")&" "&rs("SoftVer")
if isWH=2 then get_update_imgages = get_update_imgages & " <tr>"& vbcrlf
get_update_imgages = get_update_imgages & " <td align=""center""><a href=""../SoftView/SoftView_"&Rs("SoftID")&".html"" target=""_blank"" Title="""&strSoftName&"""><img src="""&Rs("images")&""" border=0 width="""&intWidth&""" height="""&intHeight&"""><br>"&cutStr(strSoftName,cutNum)&"</a></td><TR>"& vbcrlf
if isWH=2 then get_update_imgages = get_update_imgages & " </tr>"& vbcrlf
Rs.movenext
loop
end if
Rs.close
if isWH=1 then get_update_imgages = get_update_imgages & " </tr>"& vbcrlf
get_update_imgages = get_update_imgages & "</table>"& vbcrlf
end function
'分类导航栏
function soft_catemenu()
sql="select CatalogID,CatalogName,Readme from SoftDown_Catalog Where Depth=0 order by RootID,Orders"
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
soft_catemenu="无分类"
else
do while not rs.eof
soft_catemenu = soft_catemenu & ":<a href=""../../"&System_info(4)&"SoftList/Catalog_"&rs(0)&"_SoftTime_Desc_1.html"""
'if rs(2)<>"" then soft_catemenu = soft_catemenu & " son=hint alt=""... "&left(rs(2),120)&" ..."" style=""behavior:url(../../"&System_info(4)&"0007.htc)"""
soft_catemenu = soft_catemenu & ">"&rs(1)&"</a>:"& vbcrlf
rs.movenext
loop
end if
rs.close
end function
'软件列表中左侧分类导航
function soft_cate_nav(CatalogID)
soft_cate_nav="<table width=""80%"" border=""0"" align=""center"">" & vbcrlf
if CatalogID=0 then
sql="select CatalogID,CatalogName,Child,SoftNum,Readme from SoftDown_Catalog Where Depth=0 order by RootID,Orders"
Rs.open sql,conn,1,1
if rs.eof and rs.bof then
soft_cate_nav = soft_cate_nav & "<tr><td>没有数据记录</td></tr>"
else
do while not rs.eof
soft_cate_nav = soft_cate_nav & "<tr><td>"
if rs(2)>0 then
soft_cate_nav = soft_cate_nav & "<img src=""../images/+.gif"" border=""0"" align=""absmiddle""> "
else
soft_cate_nav = soft_cate_nav & "<img src=""../images/-.gif"" border=""0"" align=""absmiddle""> "
end if
soft_cate_nav = soft_cate_nav & "<a href=""../SoftList/Catalog_"&rs(0)&"_SoftTime_Desc_1.html"""
if rs(4)<>"" then soft_cate_nav = soft_cate_nav & " son=hint alt=""... "&left(rs(4),120)&" ..."" style=""behavior:url(../0007.htc)"""
soft_cate_nav = soft_cate_nav & ">"&rs(1)&"</a>"
soft_cate_nav = soft_cate_nav & " (<font color=""#FF0000"">"&rs(3)&"</font>个)"
soft_cate_nav = soft_cate_nav & "</td></tr>"
rs.movenext
loop
end if
rs.close
else
dim ParentID,Child
sql="select ParentID,Child,SoftNum from SoftDown_Catalog Where CatalogID="&CatalogID
Rs.open sql,conn,1,1
if rs.eof and rs.bof then
soft_cate_nav = soft_cate_nav & "</table>"
exit function
else
ParentID=rs(0)
Child=rs(1)
end if
rs.close
if Child=0 then
sql="select CatalogID,CatalogName,Child,SoftNum,Readme from SoftDown_Catalog Where ParentID="&ParentID&" order by RootID,Orders"
else
sql="select CatalogID,CatalogName,Child,SoftNum,Readme from SoftDown_Catalog Where ParentID="&CatalogID&" order by RootID,Orders"
end if
Rs.open sql,conn,1,1
if rs.eof and rs.bof then
soft_cate_nav = soft_cate_nav & "<tr><td>没有数据记录</td></tr>"
else
do while not rs.eof
soft_cate_nav = soft_cate_nav & "<tr><td>"
if rs(2)>0 then
soft_cate_nav = soft_cate_nav & "<img src=""../images/+.gif"" border=""0"" align=""absmiddle""> "
else
soft_cate_nav = soft_cate_nav & "<img src=""../images/-.gif"" border=""0"" align=""absmiddle""> "
end if
soft_cate_nav = soft_cate_nav & "<a href=""../SoftList/Catalog_"&rs(0)&"_SoftTime_Desc_1.html"""
if rs(4)<>"" then soft_cate_nav = soft_cate_nav & " son=hint alt=""... "&left(rs(4),120)&" ..."" style=""behavior:url(../0007.htc)"""
soft_cate_nav = soft_cate_nav & ">"&rs(1)&"</a>"
soft_cate_nav = soft_cate_nav & " (<font color=""#FF0000"">"&rs(3)&"</font>个)"
soft_cate_nav = soft_cate_nav & "</td></tr>"
rs.movenext
loop
end if
rs.close
end if
soft_cate_nav = soft_cate_nav & "</table>"
end function
function soft_nav(CatalogID,GetTitle,GetUrl)
dim ParentID,ParentStr
soft_nav="<a href=""../"">"&System_info(0)&"</a> → "
if CatalogID<>0 then
sql="select CatalogName,ParentID,ParentStr from SoftDown_Catalog where CatalogID="&CatalogID
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
CatalogName=rs(0)
ParentID=rs(1)
ParentStr=rs(2)
end if
rs.close
if ParentID<>0 then
sql="select CatalogID,CatalogName from SoftDown_Catalog where CatalogID in("&ParentStr&")"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
soft_nav=soft_nav & "<a href=""../SoftList/Catalog_"&rs(0)&"_SoftTime_Desc_1.html"">"&rs(1)&"</a> → "
rs.movenext
loop
end if
rs.close
end if
soft_nav=soft_nav & "<a href=""../SoftList/Catalog_"&CatalogID&"_SoftTime_Desc_1.html"">"&CatalogName&"</a> → "
end if
if GetUrl<>"" then
soft_nav = soft_nav &"<a href="""&GetURL&""">"&GetTitle&"</a>"
else
soft_nav = soft_nav & GetTitle
end if
end function
'表单中分类下拉列表
function Catalog_Select(CatalogID,CategoryName)
Catalog_Select=" <option value="""">所有分类</option>" & vbcrlf
sql = "select RootID,CatalogID,CatalogName,depth from "&CategoryName&"_Catalog order by rootid,orders"
rs.open sql,conn,1,1
do while not rs.eof
Catalog_Select = Catalog_Select & " <option value="""&rs(0)&","&rs(1)&","&rs(3)&","&rs(2)&""" "
if CatalogID<>0 then
if rs(1)=CatalogID then Catalog_Select = Catalog_Select & "selected"
end if
Catalog_Select = Catalog_Select & ">"
if rs(3) = 1 then Catalog_Select = Catalog_Select & " ├ "
if rs(3) >1 then
for i=2 to rs(3)
Catalog_Select = Catalog_Select & " │"
next
Catalog_Select = Catalog_Select & " ├ "
end if
Catalog_Select = Catalog_Select & rs(2)&"</option>" & vbcrlf
rs.MoveNext
loop
rs.Close
end function
function Search_Soft()
Search_Soft = Search_Soft & "<table border=""0"" cellspacing=""0"" cellpadding=""3"">" & vbcrlf
Search_Soft = Search_Soft & " <form name=""form1"" method=""post"" action=""../../"&System_info(4)&"Search_Soft.asp"">" & vbcrlf
Search_Soft = Search_Soft & " <tr> " & vbcrlf
Search_Soft = Search_Soft & " <td valign=""middle""> 软件搜索:分类 " & vbcrlf
Search_Soft = Search_Soft & " <select name=""catalog"">" & vbcrlf
Search_Soft = Search_Soft & Catalog_Select(0,"SoftDown")
Search_Soft = Search_Soft & " </select>" & vbcrlf
Search_Soft = Search_Soft & " 关键字 " & vbcrlf
Search_Soft = Search_Soft & " <input type=""text"" name=""keyword"" size=""20"" maxlength=""50"" >" & vbcrlf
Search_Soft = Search_Soft & " <select name=""selby"" id=""selby"">" & vbcrlf
Search_Soft = Search_Soft & " <option value=""1"">软件名称</option>" & vbcrlf
Search_Soft = Search_Soft & " <option value=""2"">软件简介</option>" & vbcrlf
Search_Soft = Search_Soft & " <option value=""0"">两者搜索</option>" & vbcrlf
Search_Soft = Search_Soft & " </select> <input name=""action"" type=""hidden"" value=""soft""> " & vbcrlf
Search_Soft = Search_Soft & " <input type=""submit"" name=""Submit"" value=""搜 索"">" & vbcrlf
Search_Soft = Search_Soft & " ※<a href=""../../"&System_info(4)&"Search_Soft.asp"">高级搜索</a>" & vbcrlf
Search_Soft = Search_Soft & " ※<a href=""../../"&System_info(4)&"Publish.asp"">发布软件</a></td>" & vbcrlf
Search_Soft = Search_Soft & " </tr>" & vbcrlf
Search_Soft = Search_Soft & " </form>" & vbcrlf
Search_Soft = Search_Soft & "</table>" & vbcrlf
end function
function Search_article()
Search_article = Search_article & "<table border=""0"" cellspacing=""0"" cellpadding=""3"">" & vbcrlf
Search_article = Search_article & " <form name=""form1"" method=""post"" action=""../../"&System_info(4)&"Search_Article.asp"">" & vbcrlf
Search_article = Search_article & " <tr> " & vbcrlf
Search_article = Search_article & " <td> 文章搜索: " & vbcrlf
Search_article = Search_article & " 关键字 " & vbcrlf
Search_article = Search_article & " <input type=""text"" name=""keyword"" size=""14"" maxlength=""50"" >" & vbcrlf
Search_article = Search_article & " <select name=""selby"" id=""selby"">" & vbcrlf
Search_article = Search_article & " <option value=""1"">文章标题</option>" & vbcrlf
Search_article = Search_article & " <option value=""2"">文章内容</option>" & vbcrlf
Search_article = Search_article & " <option value=""0"">两者都要</option>" & vbcrlf
Search_article = Search_article & " </select> <input name=""action"" type=""hidden"" value=""article""> " & vbcrlf
Search_article = Search_article & " <INPUT type=""image"" height=""18"" width=""55"" src=""http://202.116.83.50/shaoli/down/images/search_botton.gif"" align=""absMiddle"" name=""image"">" & vbcrlf
Search_article = Search_article & " </td>" & vbcrlf
Search_article = Search_article & " </tr>" & vbcrlf
Search_article = Search_article & " </form>" & vbcrlf
Search_article = Search_article & "</table>" & vbcrlf
end function
function article_nav(CatalogID,GetTitle,GetUrl)
dim ParentID,ParentStr
article_nav="<a href=""../default_study.html"">网络学院</a> → "
if CatalogID<>0 then
sql="select CatalogName,ParentID,ParentStr from info_Catalog where CatalogID="&CatalogID
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
CatalogName=rs(0)
ParentID=rs(1)
ParentStr=rs(2)
end if
rs.close
if ParentID<>0 then
sql="select CatalogID,CatalogName from info_Catalog where CatalogID in("&ParentStr&")"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
do while not rs.eof
article_nav=article_nav & "<a href=""../infoList/Catalog_"&rs(0)&"_1.html"">"&rs(1)&"</a> → "
rs.movenext
loop
end if
rs.close
end if
article_nav=article_nav & "<a href=""../infoList/Catalog_"&CatalogID&"_1.html"">"&CatalogName&"</a> → "
end if
if GetUrl<>"" then
article_nav = article_nav &"<a href="""&GetURL&""">"&GetTitle&"</a>"
else
article_nav = article_nav & GetTitle
end if
end function
'软件列表中左侧分类导航
function article_cate_nav(CatalogID)
article_cate_nav="<table width=""98%"" border=""0"" align=""center"">" & vbcrlf
if CatalogID=0 then
sql="select CatalogID,CatalogName,Child,articleNum,Readme from info_Catalog Where Depth=0 order by RootID,Orders"
Rs.open sql,conn,1,1
if rs.eof and rs.bof then
article_cate_nav = article_cate_nav & "<tr><td>没有数据记录</td></tr>"
else
do while not rs.eof
article_cate_nav = article_cate_nav & "<tr><td>"
if rs(2)>0 then
article_cate_nav = article_cate_nav & "<img src=""../images/+.gif"" border=""0"" align=""absmiddle""> "
else
article_cate_nav = article_cate_nav & "<img src=""../images/-.gif"" border=""0"" align=""absmiddle""> "
end if
article_cate_nav = article_cate_nav & "<a href=""../InfoList/Catalog_"&rs(0)&"_1.html"""
if rs(4)<>"" then article_cate_nav = article_cate_nav & " son=hint alt=""... "&left(rs(4),120)&" ..."" style=""behavior:url(../0007.htc)"""
article_cate_nav = article_cate_nav & ">"&rs(1)&"</a>"
article_cate_nav = article_cate_nav & " (<font color=""#FF0000"">"&rs(3)&"</font>篇)"
article_cate_nav = article_cate_nav & "</td></tr>"
rs.movenext
loop
end if
rs.close
else
dim ParentID,Child
sql="select ParentID,Child,articleNum from info_Catalog Where CatalogID="&CatalogID
Rs.open sql,conn,1,1
if rs.eof and rs.bof then
article_cate_nav = article_cate_nav & "</table>"
exit function
else
ParentID=rs(0)
Child=rs(1)
end if
rs.close
if Child=0 then
sql="select CatalogID,CatalogName,Child,articleNum,Readme from info_Catalog Where ParentID="&ParentID&" order by RootID,Orders"
else
sql="select CatalogID,CatalogName,Child,articleNum,Readme from info_Catalog Where ParentID="&CatalogID&" order by RootID,Orders"
end if
Rs.open sql,conn,1,1
if rs.eof and rs.bof then
article_cate_nav = article_cate_nav & "<tr><td>没有数据记录</td></tr>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -