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

📄 syscode_soft.asp

📁 功能齐全的oa网络办公源码asp+acce
💻 ASP
📖 第 1 页 / 共 4 页
字号:
	set rsCount=nothing
end sub


'=================================================
'过程名:ShowSoft
'作  用:分页显示软件标题等信息
'参  数:TitleLen  ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowSoft(TitleLen,strClassID)
	if TitleLen<0 or TitleLen>200 then
		TitleLen=50
	end if

	sqlSoft="select S.SoftID,S.ClassID,C.ClassName,L.LayoutFileName,S.SoftName,S.SoftVersion,S.Author,S.AuthorEmail,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.SoftSize,S.OnTop,S.Elite,S.Passed,S.Stars,S.SoftLevel,S.SoftPoint from Soft S"
	sqlSoft=sqlSoft & " inner join (SoftClass C inner join Layout L on C.LayoutID=L.LayoutID) on S.ClassID=C.ClassID where S.Deleted=0 and S.Passed=1 "

	'if SpecialID>0 then
	'	sqlSoft=sqlSoft & " and S.SpecialID=" & SpecialID
	'end if
	if instr(strClassID,",")>0 then
		sqlSoft=sqlSoft &  " and S.ClassID in (" & strClassID & ")"
	else
		sqlSoft=sqlSoft &  " and S.ClassID=" & Clng(strClassID)
	end if
	sqlSoft=sqlSoft & " order by S.OnTop,S.SoftID desc"

	Set rsSoft= Server.CreateObject("ADODB.Recordset")
	rsSoft.open sqlSoft,conn,1,1
	if rsSoft.bof and  rsSoft.eof then
		totalput=0
		response.Write("<br><li>没有任何下载</li>")
	else
		totalput=rsSoft.recordcount
		if currentpage<1 then
			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")=1 then
				strTemp = strTemp & "<img src='images/Soft_ontop.gif' alt='固顶下载'>&nbsp;"
			elseif rsSoft("Elite")=1 then
				strTemp = strTemp & "<img src='images/Soft_elite.gif' alt='推荐下载'>&nbsp;"
			else
				strTemp = strTemp & "<img src='images/Soft_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=0 and S.Passed=1 "
	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 "<li>没有下载</li>" 
	else 
		do while not rsNew.eof   
			response.Write "<li><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) & "</li><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=0 and S.Passed=1 "
	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 "<li>今日没有下载</li>" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='2' cellpadding='0'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='15' align='center'><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

'=================================================
'过程名: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=0 and S.Passed=1 And datediff(d,LastHitTime,getdate())<=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 "<li>今日没有下载</li>" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='2' cellpadding='0'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='15' align='center'><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=0 and S.Passed=1 And datediff(ww,LastHitTime,getdate())<=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 "<li>今日没有下载</li>" 
	else 
		i=1
		response.write "<table width='100%' border='0' cellspacing='2' cellpadding='0'>"
		do while not rsTop.eof   
			response.Write "<tr><td width='15' align='center'><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=0 and S.Passed=1 And datediff(m,LastHitTime,getdate())<=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 "<li>今日没有下载</li>" 

⌨️ 快捷键说明

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