⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.asp

📁 动感系统XP Access版,服务器需要安装Jmail 组件 配置SendMessages.asp 最后部分的参数
💻 ASP
📖 第 1 页 / 共 4 页
字号:
	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	
end if
article_cate_nav = article_cate_nav & "</table>"
end function

'分类导航栏
function article_catemenu()
sql="select CatalogID,CatalogName,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_catemenu="无分类"
else
	do while not rs.eof
	article_catemenu = article_catemenu & ":<a href=""../../"&System_info(4)&"infoList/Catalog_"&rs(0)&"_1.html"""
	'if rs(2)<>"" then article_catemenu = article_catemenu & " son=hint alt=""... "&left(rs(2),120)&"  ..."" style=""behavior:url(../../"&System_info(4)&"0007.htc)"""
	article_catemenu = article_catemenu & ">"&rs(1)&"</a>:"& vbcrlf
	rs.movenext
	loop
end if
rs.close
end function
 
 '文章最近更新
function article_update(CatalogID,topNum,cutNum,showTime,isRoot)
dim strHits
if CatalogID=0 then
    sql="select top "&topNum&" ArticleID,Title,Hits,DateTime from info_Article order by DateTime desc"
else
	if isRoot=1 then
		sql="select top "&topNum&" ArticleID,Title,Hits,DateTime from info_Article where RootID="&CatalogID&" order by DateTime desc"
	else
    	sql="select top "&topNum&" ArticleID,Title,Hits,DateTime from info_Article where CatalogID="&CatalogID&" order by DateTime desc"
	end if
end if
article_update = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1 
if Rs.eof and Rs.bof then 
	article_update = article_update & "  <tr>"& vbcrlf
	article_update = article_update & "    <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
	article_update = article_update & "  </tr>"& vbcrlf
else
	do while not Rs.eof 
	if showTime=0 then
		strDateTime=""
	else
		strDateTime=DateTimeFormat(Rs("DateTime"),showTime)
	end if
	article_update = article_update & "  <tr>"& vbcrlf
	article_update = article_update & "    <td><img src=""../images/d_2.gif"">&nbsp;<a href=""../InfoView/Article_"&Rs("ArticleID")&".html"" target=""_blank"" Title="""&rs("Title")&""">"&cutStr(trim(rs("Title")),cutNum)&"</a> </td><td width=""50"">"&strDateTime&"</td>"& vbcrlf
	article_update = article_update & "  </tr>"& vbcrlf
	Rs.movenext
	loop
end if
Rs.close
article_update = article_update & "</table>"& vbcrlf
end function

 '文章最近更新 显示分类 
function article_update_showcat(CatalogID,topNum,cutNum,showTime,isRoot)
dim strDateTime
if CatalogID=0 then
    sql="select top "&topNum&" ArticleID,CatalogID,CatalogName,Title,Hits,DateTime from Info_Article order by DateTime desc"
else
	if isRoot=1 then
    	sql="select top "&topNum&" ArticleID,CatalogID,CatalogName,Title,Hits,DateTime from Info_Article where RootID="&CatalogID&" order by DateTime desc"
	else
		sql="select top "&topNum&" ArticleID,CatalogID,CatalogName,Title,Hits,DateTime from Info_Article where CatalogID="&CatalogID&" order by DateTime desc"
	end if
end if
article_update_showcat = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1 
if Rs.eof and Rs.bof then 
	article_update_showcat = article_update_showcat & "  <tr>"& vbcrlf
	article_update_showcat = article_update_showcat & "    <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
	article_update_showcat = article_update_showcat & "  </tr>"& vbcrlf
else
	do while not Rs.eof 
	if showTime=0 then
		strDateTime=""
	else
		strDateTime=DateTimeFormat(Rs("DateTime"),showTime)
	end if
	article_update_showcat = article_update_showcat & "  <tr>"& vbcrlf
	article_update_showcat = article_update_showcat & "    <td>·[<a href=""../InfoList/Catalog_"&rs("CatalogID")&"_1.html"" target=""_blank"">"&rs("CatalogName")&"</a>] <a href=""../InfoView/Article_"&Rs("ArticleID")&".html"" target=""_blank"" Title="""&rs("Title")&""">"&cutStr(trim(rs("Title")),cutNum)&"</a> </td><td width=""30"">"&strDateTime&"</td>"& vbcrlf
	article_update_showcat = article_update_showcat & "  </tr>"& vbcrlf
	Rs.movenext
	loop 
end if
Rs.close
article_update_showcat = article_update_showcat & "</table>"& vbcrlf
end function

 '文章阅读排行TOP
function article_top(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits
if CatalogID=0 then
    sql="select top "&topNum&" ArticleID,Title,Hits from info_Article order by Hits desc,ArticleID desc"
else
	if isRoot=1 then
		sql="select top "&topNum&" ArticleID,Title,Hits from info_Article where RootID="&CatalogID&" order by Hits desc,ArticleID desc"
	else
    	sql="select top "&topNum&" ArticleID,Title,Hits from info_Article where CatalogID="&CatalogID&" order by Hits desc,ArticleID desc"
	end if
end if
article_top = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1 
if Rs.eof and Rs.bof then 
	article_top = article_top & "  <tr>"& vbcrlf
	article_top = article_top & "    <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
	article_top = article_top & "  </tr>"& vbcrlf
else
	do while not Rs.eof 
	if showHits=0 then
		strHits=""
	else
		strHits=Rs("Hits")
	end if
	article_top = article_top & "  <tr>"& vbcrlf
	article_top = article_top & "    <td>·<a href=""../InfoView/Article_"&Rs("ArticleID")&".html"" target=""_blank"" Title="""&rs("Title")&""">"&cutStr(trim(rs("Title")),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
	article_top = article_top & "  </tr>"& vbcrlf
	Rs.movenext
	loop 
end if
Rs.close
article_top = article_top & "</table>"& vbcrlf
end function

'推荐文章
function article_hot(CatalogID,topNum,cutNum,showHits,isRoot)
dim strHits
if CatalogID=0 then
    sql="select top "&topNum&" ArticleID,Title,Hits from info_Article where isHot=1 order by ArticleID desc"
else
	if isRoot=1 then
		sql="select top "&topNum&" ArticleID,Title,Hits from info_Article where RootID="&CatalogID&" and isHot=1 order by ArticleID desc"
	else
    	sql="select top "&topNum&" ArticleID,Title,Hits from info_Article where CatalogID="&CatalogID&" and isHot=1 order by ArticleID desc"
	end if
end if
article_hot = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1 
if Rs.eof and Rs.bof then 
	article_hot = article_hot & "  <tr>"& vbcrlf
	article_hot = article_hot & "    <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
	article_hot = article_hot & "  </tr>"& vbcrlf
else
	do while not Rs.eof 
	if showHits=0 then
		strHits=""
	else
		strHits=Rs("Hits")
	end if
	article_hot = article_hot & "  <tr>"& vbcrlf
	article_hot = article_hot & "    <td>·<a href=""../InfoView/Article_"&Rs("ArticleID")&".html"" target=""_blank"" Title="""&rs("Title")&""">"&cutStr(trim(rs("Title")),cutNum)&"</a> "&strHits&"</td>"& vbcrlf
	article_hot = article_hot & "  </tr>"& vbcrlf
	Rs.movenext
	loop 
end if
Rs.close
article_hot = article_hot & "</table>"& vbcrlf
end function

'******************************************************************************************
'图片最近更新调用过程
function article_update_images(CatalogID,topNum,cutNum,intWidth,intHeight,isWH,isRoot)
if CatalogID=0 then
	sql="select top "&topNum&" ArticleID,Title,Hits,DateTime,images from Info_Article where images<>'' order by DateTime desc"
else
	if isRoot=1 then
		sql="select top "&topNum&" ArticleID,Title,Hits,DateTime,images from Info_Article where RootID="&CatalogID&" and images<>'' order by DateTime desc"
	else
		sql="select top "&topNum&" ArticleID,Title,Hits,DateTime,images from Info_Article where CatalogID="&CatalogID&" and images<>'' order by DateTime desc"
	end if
end if
article_update_images = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""3"">"& vbcrlf
Rs.open sql,conn,1,1 
if Rs.eof and Rs.bof then 
	article_update_images = article_update_images & "  <tr>"& vbcrlf
	article_update_images = article_update_images & "    <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
	article_update_images = article_update_images & "  </tr>"& vbcrlf
else
	if isWH=1 then  article_update_images = article_update_images & "  </tr>"& vbcrlf 
	do while not Rs.eof

	if isWH=2 then  article_update_images = article_update_images & "  <tr>"& vbcrlf
	article_update_images = article_update_images & "    <td  align=""center""><a href=""../InfoView/Article_"&Rs("ArticleID")&".html"" target=""_blank"" Title="""&Rs("Title")&"""><img src="""&Rs("images")&""" border=0 width="""&intWidth&""" height="""&intHeight&"""><br>"&cutStr(rs("Title"),cutNum)&"</a></td>"& vbcrlf
	if isWH=2 then  article_update_images = article_update_images & "  </tr>"& vbcrlf 
	Rs.movenext
	loop 
end if
Rs.close
	if isWH=1 then  article_update_images = article_update_images & "  </tr>"& vbcrlf 
	article_update_images = article_update_images & "</table>"& vbcrlf
end function

'调用公告
function GetMessages(topNum,isType)
sql="select top "&topNum&" ID,Title,DateTime from Messages where isType="&isType&" order by DateTime desc"
GetMessages = "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""1"">"& vbcrlf
Rs.open sql,conn,1,1 
if Rs.eof and Rs.bof then 
	GetMessages = GetMessages & "  <tr>"& vbcrlf
	GetMessages = GetMessages & "    <td>Sorry!没有查询到任何记录。</td>"& vbcrlf
	GetMessages = GetMessages & "  </tr>"& vbcrlf
else
	do while not Rs.eof 
	GetMessages = GetMessages & "  <tr>"& vbcrlf
	GetMessages = GetMessages & "    <td>·<a href=""javascript:OpenWin('Messages.asp?ID="&rs("ID")&"',480,350)"">"&trim(rs("Title"))&"</a> "&FormatDateTime(rs("DateTime"),2)&"</td>"& vbcrlf
	GetMessages = GetMessages & "  </tr>"& vbcrlf
	Rs.movenext
	loop 
end if
Rs.close
GetMessages = GetMessages & "</table>"& vbcrlf
end function

function system1(info)
    if Instr(info,"NT 5.1")>0 then
        system1=system1+"Windows XP"
    elseif Instr(info,"Tel")>0 then
        system1=system1+"Telport"
	elseif Instr(info,"webzip")>0 then
        system1=system1+"webzip"
	elseif Instr(info,"flashget")>0 then
        system1=system1+"flashget"
	elseif Instr(info,"offline")>0 then
        system1=system1+"offline"
    elseif Instr(info,"NT 5")>0 then
        system1=system1+"Windows 2000"
    elseif Instr(info,"NT 4")>0 then
        system1=system1+"Windows NT4"
    elseif Instr(info,"98")>0 then
        system1=system1+"Windows 98"
    elseif Instr(info,"95")>0 then
        system1=system1+"Windows 95"
	elseif instr(info,"unix") or instr(info,"linux") or instr(info,"SunOS") or instr(info,"BSD") then
	    system1=system1+"类Unix"
    elseif instr(thesoft,"Mac") then
	    system1=system1+"Mac"
    else
        system1=system1+"其它"
    end if
end function

'************************************************

function browser(info)
    if Instr(info,"NetCaptor 6.5.0")>0 then
        browser="NetCaptor 6.5.0"
    elseif Instr(info,"MyIe 3.1")>0 then
        browser="MyIe 3.1"
    elseif Instr(info,"NetCaptor 6.5.0RC1")>0 then
        browser="NetCaptor 6.5.0RC1"
    elseif Instr(info,"NetCaptor 6.5.PB1")>0 then
        browser="NetCaptor 6.5.PB1"
    elseif Instr(info,"MSIE 5.5")>0 then
        browser="Internet Explorer 5.5"
    elseif Instr(info,"MSIE 6.0")>0 then
        browser="Internet Explorer 6.0"
    elseif Instr(info,"MSIE 6.0b")>0 then
        browser="Internet Explorer 6.0b"
    elseif Instr(info,"MSIE 5.01")>0 then
        browser="Internet Explorer 5.01"
    elseif Instr(info,"MSIE 5.0")>0 then
        browser="Internet Explorer 5.00"
    elseif Instr(info,"MSIE 4.0")>0 then
        browser="Internet Explorer 4.01"
    else
        browser="其它"
    end if
end function

function Site_Link(showType,showNum)
dim link_i,link_ii
link_i=0
Site_Link = Site_Link & "<table width=""764"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""1""><tr align=""center"" bgcolor=""#F6F6F6""> "& vbcrlf
if showType=1 then
	sql="select top "&showNum&" * from SoftDown_SiteLink where isLogo=1 order by DateTime"

	Rs.open sql,conn,1,1 
	if not(Rs.eof and Rs.bof) then
		do while not Rs.eof
		Site_Link = Site_Link & "<td><a href="""&rs("SiteURL")&""" target=_blank son=hint alt="""&Trim(rs("Readme"))&""" style=""behavior:url(0007.htc)""><img src="""&rs("logo")&""" width=""88"" height=""31"" border=""0""></a></td>"& vbcrlf
		link_i = link_i + 1
		if link_i mod 8 = 0 then  Site_Link = Site_Link & "</tr><tr align=""center"" bgcolor=""#F6F6F6"">"& vbcrlf
		Rs.movenext
		loop 
		if link_i mod 8 > 0 then 
			for link_ii = 1 to (8 - (link_i mod 8))
			Site_Link = Site_Link & "<td>.</td>"& vbcrlf
			next
		end if
	end if
	rs.close 
else
	sql="select top "&showNum&" * from SoftDown_SiteLink where isLogo=0 order by DateTime"


	Rs.open sql,conn,1,1 
	if not(Rs.eof and Rs.bof) then
		do while not Rs.eof
		Site_Link = Site_Link & "<td><a href="""&rs("SiteURL")&""" target=_blank son=hint alt="""&Trim(rs("Readme"))&""" style=""behavior:url(0007.htc)"">"&rs("SiteName")&"</a></td>"& vbcrlf
		link_i = link_i + 1
		if link_i mod 8 = 0 then  Site_Link = Site_Link & "</tr><tr align=""center"" bgcolor=""#F6F6F6"">"& vbcrlf
		Rs.movenext
		loop 
		if link_i mod 8 > 0 then 
			for link_ii = 1 to (8 - (link_i mod 8))
			Site_Link = Site_Link & "<td>.</td>"& vbcrlf
			next
		end if
	end if
	rs.close 
end if
Site_Link = Site_Link & "</tr></table>"
end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -