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

📄 create_soft_view_inc.asp

📁 动感系统XP Access版,服务器需要安装Jmail 组件 配置SendMessages.asp 最后部分的参数
💻 ASP
字号:
<%
function Create_SoftView(SoftID,HtmlTemplate)
dim isSpecial
isSpecial=1   '是否在软件信息页生成特别信息内容,包括注册码、破解文件、注册机等。0为不生成,1为生成。 
set rs=server.createobject("adodb.recordset")
	sql="select * from SoftDown_SoftInfo where SoftID="&SoftID   
	rs.open sql,conn,1,1
	keys=checkStr(rs("SoftName"))
	CatalogID=rs("CatalogID")
	strSoftName=rs("SoftName")&"  "&rs("SoftVer")
	strLanguage=rs("Language")
	if not isnull(rs("SoftViewImg")) and rs("SoftViewImg")<>"" then
		strSoftViewImg=" <a href=""../SoftImg.asp?SoftID="&SoftID&""" target=""_blank""><img src=""../images/screen.gif"" border=""0"" align=""absmiddle"" title=""查看预览图""> "
	else
		strSoftViewImg=""
	end if
	strSoftType=rs("SoftType") &" / " & rs("CatalogName")
	strSystem=rs("System") 
	strLicenceType=rs("LicenceType")
	if rs("SoftSize")>1024 then 
		strSoftSize=round(rs("SoftSize")/1024,2)&" MB"
	else
		strSoftSize=rs("SoftSize")&" KB"
	end if 
	strRank="<img src=""../images/"&rs("Rank")&"star.gif"">"
	strSoftTime=rs("SoftTime")
	if (not isnull(rs("SoftFrom"))) or rs("SoftFrom")<>"" then
		strSoftFrom="<a href="""&rs("SoftFrom")&""" target=""_blank"">"&cutStr(rs("SoftFrom"),35)&"</a>"
	else
		strSoftFrom=""
	end if 
	strHits="本日:"&rs("DayHits")&" 本 周:"&rs("WeekHits")&"  本月:"&rs("MonthHits")&"  总计:"& rs("AllHits")
	strContent=UBBCode(rs("Content"))
	if (not isnull(rs("images"))) or rs("images")<>"" then
		strImages="<img src='"&rs("Images")&"' border=0>"
	else
		strImages=""
	end if
	if isNull(rs("Email")) or rs("Email")="" then
		strEmail="<a href=""mailto:"&rs("Email")&""">"&rs("Email")&"</a>"
	else
		strEmail="无"
	end if
	if isNull(rs("RegURL")) or rs("RegURL")="" then
		strRegURL="无"
	else
		strRegURL="<a href="""&rs("RegURL")&""" target=""_blank"">"&cutStr(rs("RegURL"),35)&"</a>"
	end if
	
	if rs("EssayNum")=0 then
		strEssay="目前没有用户参与评价 "
	else
		strEssay="共有<b><font color=red>"&rs("EssayNum")&"</font></b>人参与评价,得分:<font color=red>"&round(rs("avgGrade")/rs("EssayNum"),2)&"</font>分 『<a href=""../ShowEssay.Asp?SoftID="&SoftID&""" target=""_blank"">查看评价</a>』  "
	end if
 	rs.close	
	strNavigate=soft_nav(CatalogID,strSoftName,"")
	
	strEssayContent=""
	sql="select top 5 * from SoftDown_SoftEssay where SoftID="&SoftID&" order by ID desc" 
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then 
    	strEssayContent="<p align=""center"">没有评论</p>" 
   	else 
		do while not rs.eof 
		if len(Trim(rs("Content")))>65 then
			strEssayContent=strEssayContent & "<li>"&left(Trim(rs("Content")),64)&".. ["&rs("UserName")&"  <font color=""red"">"&DateTimeFormat(rs("DateTime"),4)&"</font>]"
	   else
	   		strEssayContent=strEssayContent & "<li>"&Trim(rs("Content")) & " ["&rs("UserName")&"  <font color=""red"">"&DateTimeFormat(rs("DateTime"),4)&"</font>]"
	   end if
		rs.movenext 
		loop 
	end if 
	rs.close 
	strEssayContent=strEssayContent & "</li>"
 
set temRs=server.createobject("adodb.recordset")
strAddress=""

sql="select * from SoftDown_SoftLink where SoftID="&SoftID&" and Special=0 order by TypeID,ID"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
	strAddress=strAddress & "<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">"
	i=1
	do while not rs.eof
		if rs("TypeID")=0 then
			strAddress=strAddress & "<tr bgcolor=""#FFFFFF""><td><a href=""../SoftDown.asp?ID="&rs("ID")&"""><img src=""../images/d_download.gif"" align=""absmiddle"" border=""0"">"&trim(rs("LinkName"))&"</a>"
			if rs("UserClass")>0 then strAddress=strAddress & "限“"&UserClass(rs("UserClass"))&"”会员"
			strAddress=strAddress & "</td></tr>"
		else
			sql="select * from SoftDown_SoftLinkType where ID="&rs("TypeID")&""
			temRs.open sql,conn,1,1
			if temRs.eof and temRs.bof then
				strAddress=strAddress & "<tr bgcolor=""#FFFFFF""><td align=""center"">Sorry!系统出错!</td></tr>"
			else
				strAddress=strAddress & "<tr bgcolor=""#FFFFFF""><td>"
				if temRs("isLB")=0 then
					strAddress=strAddress & "<a href=""../SoftDown.asp?ID="&rs("ID")&"""><img src=""../images/d_download.gif"" align=""absmiddle"" border=""0"">"&trim(rs("LinkName"))&"</a> "
					if rs("UserClass")>0 then strAddress=strAddress & "限“"&UserClass(rs("UserClass"))&"”会员"					
				else
					strAddress=strAddress & "<img src=""../images/d_download.gif"" align=""absmiddle"" border=""0""><b>"&trim(rs("LinkName"))&"</b> "
					if rs("UserClass")>0 then strAddress=strAddress & "限“"&UserClass(rs("UserClass"))&"”会员"
					strAddress=strAddress & "<br>"
					splDownloadName=split(temRs("DownloadName"),",")
					for iidd=0 to ubound(splDownloadName)
						strAddress=strAddress & "·<a href=""../SoftDown.asp?ID="&rs("ID")&"&lbID="&iidd&""">"&splDownloadName(iidd)&"</a>  "
						if ((iidd+1) mod 4)=0 then strAddress=strAddress & "<br>"
					next
				end if
				strAddress=strAddress & "</td></tr>"
			end if
			temRs.close
		end if
	i=i+1
	rs.movenext
	loop
strAddress=strAddress & "</table>"
end if
rs.close
'''''''***************************************************************************************
if isSpecial=1 then

sql="select * from SoftDown_SoftLink where SoftID="&SoftID&" and Special=1 order by TypeID,ID"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
	strAddress=strAddress & "<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">"
	i=1
	do while not rs.eof
		if rs("TypeID")=0 then
			strAddress=strAddress & "<tr bgcolor=""#FFFFFF""><td><a href=""../SoftDown.asp?ID="&rs("ID")&"""><img src=""../images/d_download.gif"" align=""absmiddle"" border=""0"">"&trim(rs("LinkName"))&"</a>"
			if rs("UserClass")>0 then strAddress=strAddress & "限“"&UserClass(rs("UserClass"))&"”会员"
			strAddress=strAddress & "</td></tr>"
		else
			sql="select * from SoftDown_SoftLinkType where ID="&rs("TypeID")&""
			temRs.open sql,conn,1,1
			if temRs.eof and temRs.bof then
				strAddress=strAddress & "<tr bgcolor=""#FFFFFF""><td align=""center"">Sorry!系统出错!</td></tr>"
			else
				strAddress=strAddress & "<tr bgcolor=""#FFFFFF""><td>"
				if temRs("isLB")=0 then
					strAddress=strAddress & "<a href=""../SoftDown.asp?ID="&rs("ID")&"""><img src=""../images/d_download.gif"" align=""absmiddle"" border=""0"">"&trim(rs("LinkName"))&"</a> "
					if rs("UserClass")>0 then strAddress=strAddress & "限“"&UserClass(rs("UserClass"))&"”会员"					
				else
					strAddress=strAddress & "<img src=""../images/d_download.gif"" align=""absmiddle"" border=""0""><b>"&trim(rs("LinkName"))&"</b> "
					if rs("UserClass")>0 then strAddress=strAddress & "限“"&UserClass(rs("UserClass"))&"”会员"
					strAddress=strAddress & "<br>"
					splDownloadName=split(temRs("DownloadName"),",")
					for iidd=0 to ubound(splDownloadName)
						strAddress=strAddress & "·<a href=""../SoftDown.asp?ID="&rs("ID")&"&lbID="&iidd&""">"&splDownloadName(iidd)&"</a>  "
						if ((iidd+1) mod 4)=0 then strAddress=strAddress & "<br>"
					next
				end if
				strAddress=strAddress & "</td></tr>"
			end if
			temRs.close
		end if
	i=i+1
	rs.movenext
	loop
strAddress=strAddress & "</table>"
end if
rs.close
'''''''***************************************************************************************

sql="select LinkName from SoftDown_SoftLink where SoftID="&SoftID&" and Special=2 order by TypeID,ID"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
	strContent=strContent & "<br><br>" & UBBCode(rs("LinkName"))
end if
rs.close

end if

set temRs=nothing


	strOtherSoft=""
	sql="select top 10 SoftID,SoftName,SoftVer from SoftDown_SoftInfo where SoftName  like '%"& left((keys),8) &"%' and  SoftID<>"& SoftID
	rs.open sql,conn,1,1
  	if rs.eof and rs.bof then
		strOtherSoft =""
	else
		strOtherSoft = strOtherSoft & "        <tr bgcolor=""#FFFFFF"">" & vbcrlf	
    	strOtherSoft = strOtherSoft & "          <td width=""8%"" align=""center"" nowrap><font color=""#339900""><b>相关软件:</b></font></td>" & vbcrlf
    	strOtherSoft = strOtherSoft & "          <td colspan=""2"">" & vbcrlf
		do while not rs.eof
		strOtherSoft = strOtherSoft & "<li><a href=""SoftView_"&rs("SoftID")&".html"">"&rs("SoftName")&" "&rs("SoftVer")&"</a></li>"
		rs.movenext
		loop 
		strOtherSoft = strOtherSoft & "</td></tr>"
	end if
	rs.close
	
	strOtherArticle=""
	sql="select top 10 ArticleID,Title from info_Article where Title like '%"& left((keys),8) &"%'"
	rs.open sql,conn,1,1
  	if rs.eof and rs.bof then
		strOtherArticle =""
	else
		strOtherArticle = strOtherArticle & "        <tr bgcolor=""#FFFFFF"">" & vbcrlf	
    	strOtherArticle = strOtherArticle & "          <td width=""8%"" align=""center"" nowrap><font color=""#339900""><b>相关文章:</b></font></td>" & vbcrlf
    	strOtherArticle = strOtherArticle & "          <td colspan=""2"">" & vbcrlf
		do while not rs.eof
		strOtherArticle = strOtherArticle & "<li><a href=""../InfoView/Article_"&rs(0)&".html"">"&rs(1)&"</a></li>"
		rs.movenext
		loop 
		strOtherArticle = strOtherArticle & "</td></tr>"
	end if
	rs.close
	strDayDownTop="<script src=""../js/Catalog_DayTop_"&CatalogID&".js""></script>"
	strWeekDownTop="<script src=""../js/Catalog_WeekTop_"&CatalogID&".js""></script>"
		
	HtmlContent=HtmlTemplate
	HtmlContent=replace(HtmlContent,"$Title$",""&strSoftName&"")
	HtmlContent=replace(HtmlContent,"$Navigate$",""&strNavigate&"")
	HtmlContent=replace(HtmlContent,"$DayDownTop$",""&strDayDownTop&"")
	HtmlContent=replace(HtmlContent,"$WeekDownTop$",""&strWeekDownTop&"")
	HtmlContent=replace(HtmlContent,"$SoftName$",""&strSoftName&"")
	HtmlContent=replace(HtmlContent,"$Language$",""&strLanguage&"")
	HtmlContent=replace(HtmlContent,"$SoftViewImg$",""&strSoftViewImg&"")
	HtmlContent=replace(HtmlContent,"$SoftType$",""&strSoftType&"")
	HtmlContent=replace(HtmlContent,"$system$",""&strSystem&"")
	HtmlContent=replace(HtmlContent,"$LicenceType$",""&strLicenceType&"")
	HtmlContent=replace(HtmlContent,"$SoftSize$",""&strSoftSize&"")
	HtmlContent=replace(HtmlContent,"$Rank$",""&strRank&"")
	HtmlContent=replace(HtmlContent,"$SoftTime$",""&strSoftTime&"")	
	HtmlContent=replace(HtmlContent,"$SoftFrom$",""&strSoftFrom&"")
	HtmlContent=replace(HtmlContent,"$Email$",""&strEmail&"")
	HtmlContent=replace(HtmlContent,"$RegURL$",""&strRegURL&"")
	HtmlContent=replace(HtmlContent,"$images$",""&strImages&"")
	HtmlContent=replace(HtmlContent,"$Hits$",""&strHits&"")
	HtmlContent=replace(HtmlContent,"$Content$",""&strContent&"")
	HtmlContent=replace(HtmlContent,"$Address$",""&strAddress&"")
	HtmlContent=replace(HtmlContent,"$otherSoft$",""&strOtherSoft&"")
	HtmlContent=replace(HtmlContent,"$otherArticle$",""&strOtherArticle&"")
	HtmlContent=replace(HtmlContent,"$Essay$",""&strEssay&"")
	HtmlContent=replace(HtmlContent,"$EssayContent$",""&strEssayContent&"")
	HtmlContent=replace(HtmlContent,"$SoftID$",""&SoftID&"")
	HtmlContent=replace(HtmlContent,"</HEAD>","</HEAD>"&Copyright&"")
 
	Set fso = Server.CreateObject("Scripting.FileSystemObject")
	HtmlFileName=Server.MapPath("SoftView/SoftView_"&SoftID&".html")
    Set fout = fso.CreateTextFile(HtmlFileName)
    fout.WriteLine HtmlContent
    fout.close:set fout = nothing
	'Set fso=nothing
    
	Create_SoftView="成功更新软件:<a href=""SoftView/SoftView_"&SoftID&".html"">"&strSoftName&"</a> 的静态网页!"

end function
%>

⌨️ 快捷键说明

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