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

📄 func_soft.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
📖 第 1 页 / 共 4 页
字号:
			currentpage=1
		end if
		if (currentpage-1)*MaxPerPage>totalput then
			if (totalPut mod MaxPerPage)=0 then
				currentpage= totalPut \ MaxPerPage
			else
				currentpage= totalPut \ MaxPerPage + 1
			end if
		end if

		if currentPage=1 then
			call SoftContent(TitleLen,True,True,True,2,True,True)
		else
			if (currentPage-1)*MaxPerPage<totalPut then
         	   	rsSoft.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rsSoft.bookmark
            	call SoftContent(TitleLen,True,True,True,2,True,True)
        	else
	        	currentPage=1
           		call SoftContent(TitleLen,True,True,True,2,True,True)
	    	end if
		end if
	end if
	rsSoft.close
	set rsSoft=nothing
end sub

'=================================================
'过程名:SoftContent
'作  用:显示软件属性、标题、作者、更新日期、点击数等信息
'参  数:intTitleLen  ----标题最多字符数,一个汉字=两个英文字符
'        ShowProperty ----是否显示软件属性(固顶/推荐/普通),True为显示,False为不显示
'        ShowIncludePic ---是否显示“[图文]”字样,True为显示,False为不显示
'        ShowAuthor -------是否显示软件作者,True为显示,False为不显示
'        ShowDateType -----显示更新日期的样式,0为不显示,1为显示年月日,2为只显示月日。
'        ShowHits ---------是否显示软件点击数,True为显示,False为不显示
'        ShowHot ----------是否显示热门软件标志,True为显示,False为不显示
'=================================================
sub SoftContent(intTitleLen,ShowClassName,ShowProperty,ShowAuthor,ShowDateType,ShowHits,ShowHot)
   	dim i,strTemp,TitleStr
    i=0
	'strTemp="<table border='0' cellpadding='2' cellspacing='1' style=""border-collapse: collapse"" bordercolor='#111111' width='100%'>"
	strTemp=""
	do while not rsSoft.eof
		'strTemp=strTemp & "<tr>"
		if ShowProperty=True then
			'strTemp=strTemp & "<td width='20' align='center'>"
			if rsSoft("OnTop")=true then
				strTemp = strTemp & "<img src='images/article_ontop.gif' alt='固顶下载'>&nbsp;"
			elseif rsSoft("Elite")=true then
				strTemp = strTemp & "<img src='images/article_elite.gif' alt='推荐下载'>&nbsp;"
			else
				strTemp = strTemp & "<img src='images/article_common.gif' alt='普通下载'>&nbsp;"
			end if
			'strTemp=strTemp & "</td>"
		end if
		'strTemp=strTemp & "<td>"
		if ShowClassName=True and rsSoft("ClassID")<>ClassID then
			strTemp=strTemp & "[<a href='" & rsSoft("LayoutFileName") & "?ClassID=" & rsSoft("ClassID") & "'>" & rsSoft("ClassName") & "</a>]&nbsp;"
		end if
		strTemp=strTemp & "<a href='Soft_Show.asp?SoftID=" & rsSoft("Softid") & "' title='软件名称:" & rsSoft("SoftName") & vbcrlf & "软件版本:" & rsSoft("SoftVersion") & vbcrlf & "文件大小:" & rsSoft("SoftSize") & "K" & vbcrlf & "作    者:" & rsSoft("Author") & vbcrlf & "更新时间:" & rsSoft("UpdateTime") & vbcrlf & "下载次数:今日:" & rsSoft("DayHits") & " 本周:" & rsSoft("WeekHits") & " 本月:" & rsSoft("MonthHits") & " 总计:" & rsSoft("Hits") & "' target='_blank'>"
		strTemp=strTemp & gotTopic(rsSoft("SoftName") & " " & rsSoft("SoftVersion"),intTitleLen) & "</a>"
		if ShowAuthor=True or ShowDateType>0 or ShowHits=True then
			strTemp = strTemp & "&nbsp;("
			if ShowAuthor=True then
				if rsSoft("AuthorEmail")="" then
					strTemp=strTemp & rsSoft("Author")
				else
					strTemp=strTemp & "<a href='mailto:" & rsSoft("AuthorEmail") & "'>" & rsSoft("Author") & "</a>"
				end if
			end if
			if ShowDateType>0 then
				if ShowAuthor=True then
					strTemp=strTemp & ","
				end if
				if CDate(FormatDateTime(rsSoft("UpdateTime"),2))=date() then
					strTemp = strTemp & "<font color=red>"
				else
					strTemp= strTemp & "<font color=#999999>"
				end if
				if ShowDateType=1 then
					strTemp=strTemp & FormatDateTime(rsSoft("UpdateTime"),1) & "</font>"
				else
					strTemp= strTemp & month(rsSoft("UpdateTime")) & "月" & day(rsSoft("UpdateTime")) & "日</font>"
				end if
			end if
			if ShowHits=True then
				if ShowAuthor=True or ShowDateType>0 then
					strTemp=strTemp & ","
				end if
				strTemp=strTemp & rsSoft("Hits")
			end if
			strTemp=strTemp  & ")"
		end if
		if ShowHot=True and rsSoft("Hits")>=HitsOfHot then
			strTemp= strTemp & "<img src='images/hot.gif' alt='热门下载'>"
		end if
		strTemp= strTemp & "<br>"
		rsSoft.movenext
		i=i+1
		if i>=MaxPerPage then exit do	
	loop
	'strTemp=strTemp & "</table>"
	response.write strTemp
end sub 

'=================================================
'过程名:ShowNewSoft
'作  用:显示最新更新
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowNewSoft(SoftNum,TitleLen)
	dim sqlNew,rsNew
	if SoftNum>0 and SoftNum<=100 then
		sqlNew="select top " & SoftNum
	else
		sqlNew="select top 10 "
	end if
	sqlNew=sqlNew & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True "
	sqlNew=sqlNew & " order by S.SoftID desc"
	Set rsNew= Server.CreateObject("ADODB.Recordset")
	rsNew.open sqlNew,conn,1,1
	if TitleLen<0 or TitleLen>255 then TitleLen=100
	if rsNew.bof and rsNew.eof then 
		response.write "没有下载" 
	else 
		do while not rsNew.eof   
			response.Write "<img src='skin/1/xiao.gif'><a href='Soft_Show.asp?SoftID=" & rsNew("Softid") & "' title='软件名称:" & rsNew("SoftName") & vbcrlf & "软件版本:" & rsNew("SoftVersion") & vbcrlf & vbcrlf & "文件大小:" & rsNew("SoftSize") & "K" & vbcrlf & "作    者:" & rsNew("Author") & vbcrlf & "更新时间:" & rsNew("UpdateTime") & vbcrlf & "下载次数:今日:" & rsNew("DayHits") & " 本周:" & rsNew("WeekHits") & " 本月:" & rsNew("MonthHits") & " 总计:" & rsNew("Hits") & "' target='_blank'>" & gotTopic(rsNew("SoftName") & " " & rsNew("SoftVersion"),TitleLen) & "<br>"
        	rsNew.movenext     
		loop
	end if  
	rsNew.close
	set rsNew=nothing
end sub

'=================================================
'过程名:ShowTop
'作  用:显示累计下载TOP N,N由参数SoftNum指定
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTop(SoftNum,TitleLen,strClassID)
	dim sqlTop,rsTop,i
	if SoftNum>0 and SoftNum<=100 then
		sqlTop="select top " & SoftNum
	else
		sqlTop="select top 10 "
	end if
	sqlTop=sqlTop & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True "
	if instr(strClassID,",")>0 then
		sqlTop=sqlTop & " and S.ClassID in (" & strClassID & ")"
	else
		if CLng(strClassID)>0 then
			sqlTop=sqlTop & " and S.ClassID=" & strClassID
		end if
	end if
	sqlTop=sqlTop & " order by S.Hits desc,S.SoftID desc"
	Set rsTop= Server.CreateObject("ADODB.Recordset")
	rsTop.open sqlTop,conn,1,1
	if TitleLen<0 or TitleLen>255 then TitleLen=100
	if rsTop.bof and rsTop.eof then 
		response.write "<img src='skin/1/xiao.gif'>无累计下载" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='12' height='20' valign='top'><b>" & i & "</b></td><td><a href='Soft_Show.asp?SoftID=" & rsTop("Softid") & "' title='软件名称:" & rsTop("SoftName") & vbcrlf & "软件版本:" & rsTop("SoftVersion") & vbcrlf & "文件大小:" & rsTop("SoftSize") & "K" & vbcrlf & "作    者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "'>" & gotTopic(rsTop("SoftName") & " " & rsTop("SoftVersion"),TitleLen) & "</a></td></tr>"
        	rsTop.movenext 
			i=i+1    
		loop
		response.write "</table>"
	end if  
	rsTop.close
	set rsTop=nothing
end sub

'=================================================
'过程名:ShowTopDay
'作  用:显示本日下载TOP N,N由参数SoftNum指定
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTopDay(SoftNum,TitleLen)
	dim sqlTop,rsTop,i
	if SoftNum>0 and SoftNum<=100 then
		sqlTop="select top " & SoftNum
	else
		sqlTop="select top 10 "
	end if
	sqlTop=sqlTop & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True And datediff('D',LastHitTime,now())<=0 order by S.DayHits desc,S.SoftID desc"
	Set rsTop= Server.CreateObject("ADODB.Recordset")
	rsTop.open sqlTop,conn,1,1
	if TitleLen<0 or TitleLen>255 then TitleLen=100
	if rsTop.bof and rsTop.eof then 
		response.write "<img src='skin/1/xiao.gif'>今日没有下载" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='0' cellpadding='0' style='padding-top:4px'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='12'><b>" & i & "</b></td><td><a href='Soft_Show.asp?SoftID=" & rsTop("Softid") & "' title='软件名称:" & rsTop("SoftName") & vbcrlf & "软件版本:" & rsTop("SoftVersion") & vbcrlf & "文件大小:" & rsTop("SoftSize") & "K" & vbcrlf & "作    者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("SoftName") & " " & rsTop("SoftVersion"),TitleLen) & "</a></td></tr>"
        	rsTop.movenext   
			i=i+1  
		loop
		response.write "</table>"
	end if  
	rsTop.close
	set rsTop=nothing
end sub

'=================================================
'过程名:ShowTopWeek
'作  用:显示本周下载TOP N,N由参数SoftNum指定
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTopWeek(SoftNum,TitleLen)
	dim sqlTop,rsTop,i
	if SoftNum>0 and SoftNum<=100 then
		sqlTop="select top " & SoftNum
	else
		sqlTop="select top 10 "
	end if
	sqlTop=sqlTop & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True And datediff('ww',LastHitTime,now())<=0 order by S.WeekHits desc,S.SoftID desc"
	Set rsTop= Server.CreateObject("ADODB.Recordset")
	rsTop.open sqlTop,conn,1,1
	if TitleLen<0 or TitleLen>255 then TitleLen=100
	if rsTop.bof and rsTop.eof then 
		response.write "<img src='skin/1/xiao.gif'>本周没有下载" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='0' cellpadding='0' style='padding-top:4px'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='12'><b>" & i & "</b></td><td><a href='Soft_Show.asp?SoftID=" & rsTop("Softid") & "' title='软件名称:" & rsTop("SoftName") & vbcrlf & "软件版本:" & rsTop("SoftVersion") & vbcrlf & "文件大小:" & rsTop("SoftSize") & "K" & vbcrlf & "作    者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("SoftName") & " " & rsTop("SoftVersion"),TitleLen) & "</a></td></tr>"
        	rsTop.movenext 
			i=i+1   
		loop
		response.write "</table>"
	end if  
	rsTop.close
	set rsTop=nothing
end sub

'=================================================
'过程名:ShowTopMonth
'作  用:显示本月下载TOP N,N由参数SoftNum指定
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTopMonth(SoftNum,TitleLen)
	dim sqlTop,rsTop,i
	if SoftNum>0 and SoftNum<=100 then
		sqlTop="select top " & SoftNum
	else
		sqlTop="select top 10 "
	end if
	sqlTop=sqlTop & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True And datediff('m',LastHitTime,now())<=0 order by S.MonthHits desc,S.SoftID desc"
	Set rsTop= Server.CreateObject("ADODB.Recordset")
	rsTop.open sqlTop,conn,1,1
	if TitleLen<0 or TitleLen>255 then TitleLen=100
	if rsTop.bof and rsTop.eof then 
		response.write "<img src='skin/1/xiao.gif'>本月没有下载" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='0' cellpadding='0' style='padding-top:4px'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='12'><b>" & i & "</b></td><td><a href='Soft_Show.asp?SoftID=" & rsTop("Softid") & "' title='软件名称:" & rsTop("SoftName") & vbcrlf & "软件版本:" & rsTop("SoftVersion") & vbcrlf & "文件大小:" & rsTop("SoftSize") & "K" & vbcrlf & "作    者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("SoftName") & " " & rsTop("SoftVersion"),TitleLen) & "</a></td></tr>"
        	rsTop.movenext
			i=i+1
		loop
		response.write "</table>"
	end if  
	rsTop.close
	set rsTop=nothing
end sub

'=================================================
'过程名:ShowHot
'作  用:显示热门下载
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowHot(SoftNum,TitleLen)
	dim sqlHot,rsHot
	if SoftNum>0 and SoftNum<=100 then
		sqlHot="select top " & SoftNum
	else
		sqlHot="select top 10 "
	end if
	sqlHot=sqlHot & " S.SoftID,S.SoftName,S.SoftVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.SoftSize,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=False and S.Passed=True And S.Hits>=" & HitsOfHot & " order by S.SoftID desc"
	Set rsHot= Server.CreateObject("ADODB.Recordset")
	rsHot.open sqlHot,conn,1,1
	if TitleLen<0 or TitleLen>255 then TitleLen=50
	if rsHot.bof and rsHot.eof then 
		response.write "<img src='skin/1/xiao.gif'>无热门下载" 
	else 
		do while not rsHot.eof   
			response.Write "<img src='skin/1/xiao.gif'><a href='Soft_Show.asp?SoftID=" & rsHot("Softid") & "' title='软件名称:" & rsHot("SoftName") & vbcrlf & "软件版本:" & rsHot("SoftVersion") & vbcrlf & "文件大小:" & rsHot("SoftSize") & "K" & vbcrlf & "作    者:" & rsHot("Author") & vbcrlf & "更新时间:" & rsHot("UpdateTime") & vbcrlf & "下载次数:" & rsHot("Hits") & "'>[<font color=red>" & rsHot("hits") & "</font>]<br>"
        	rsHot.movenext     
		loop
	end if  
	rsHot.close
	set rsHot=nothing
end sub

'=================================================
'过程名:ShowElite
'作  用:显示推荐软件
'参  数:SoftNum  ----最多显示多少个软件
'        TitleLen   ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowElite(SoftNum,TitleLen)
	dim sqlElite,rsElite
	if SoftNum>0 and SoftNum<=100 then
		sqlElite="select top " & SoftNum

⌨️ 快捷键说明

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