📄 syscode_soft.asp
字号:
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
'=================================================
'过程名: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=0 and S.Passed=1 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 "<li>无热门下载</li>"
else
do while not rsHot.eof
response.Write "<li><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") & "' target='_blank'>[<font color=red>" & rsHot("hits") & "</font>]</li><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
else
sqlElite="select top 10 "
end if
sqlElite=sqlElite & " 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=0 and S.Passed=1 And S.Elite=1 order by S.SoftID desc"
Set rsElite= Server.CreateObject("ADODB.Recordset")
rsElite.open sqlElite,conn,1,1
if TitleLen<0 or TitleLen>255 then TitleLen=50
if rsElite.bof and rsElite.eof then
response.write "<li>无推荐下载</li>"
else
do while not rsElite.eof
response.Write "<li><a href='Soft_Show.asp?SoftID=" & rsElite("Softid") & "' title='软件名称:" & rsTop("SoftName") & vbcrlf & "软件版本:" & rsTop("SoftVersion") & vbcrlf & "文件大小:" & rsElite("SoftSize") & "K" & vbcrlf & "作 者:" & rsElite("Author") & vbcrlf & "更新时间:" & rsElite("UpdateTime") & vbcrlf & "下载次数:" & rsElite("Hits") & "' target='_blank'>" & gotTopic(rsElite("SoftName")& " " & rsElite("SoftVersion"),TitleLen) & "[<font color=red>" & rsElite("hits") & "</font>]</li><br>"
rsElite.movenext
loop
end if
rsElite.close
set rsElite=nothing
end sub
'=================================================
'过程名:ShowCorrelative
'作 用:显示相关软件
'参 数:SoftNum ----最多显示多少个软件
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowCorrelative(SoftNum,TitleLen)
dim rsCorrelative,sqlCorrelative
dim strKey,arrKey,i
if SoftNum>0 and SoftNum<=100 then
sqlCorrelative="select top " & SoftNum
else
sqlCorrelative="Select Top 5 "
end if
strKey=mid(rs("Keyword"),2,len(rs("Keyword"))-2)
if instr(strkey,"|")>1 then
arrKey=split(strKey,"|")
strKey="((S.Keyword like '%|" & arrKey(0) & "|%')"
for i=1 to ubound(arrKey)
strKey=strKey & " or (S.Keyword like '%|" & arrKey(i) & "|%')"
next
strKey=strKey & ")"
else
strKey="(S.Keyword like '%|" & strKey & "|%')"
end if
sqlCorrelative=sqlCorrelative & " 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=0 and S.Passed=1 and " & strKey & " and S.SoftID<>" & SoftID & " Order by S.SoftID desc"
Set rsCorrelative= Server.CreateObject("ADODB.Recordset")
rsCorrelative.open sqlCorrelative,conn,1,1
if TitleLen<0 or TitleLen>255 then TitleLen=50
if rsCorrelative.bof and rsCorrelative.Eof then
response.write "没有相关下载"
else
do while not rsCorrelative.eof
response.Write "<li><a href='Soft_Show.asp?SoftID=" & rsCorrelative("Softid") & "' title='软件名称:" & rsCorrelative("SoftName") & vbcrlf & "软件版本:" & rsCorrelative("SoftVersion") & vbcrlf & "文件大小:" & rsCorrelative("SoftSize") & "K" & vbcrlf & "作 者:" & rsCorrelative("Author") & vbcrlf & "更新时间:" & rsCorrelative("UpdateTime") & vbcrlf & "下载次数:" & rsCorrelative("Hits") & "' target='_blank'>" & gotTopic(rsCorrelative("SoftName") & " " & rsCorrelative("SoftVersion"),TitleLen) & "[<font color=red>" & rsCorrelative("hits") & "</font>]</li><br>"
rsCorrelative.movenext
loop
end if
rsCorrelative.close
set rsCorrelative=nothing
end sub
'=================================================
'过程名:ShowComment
'作 用:显示相关评论
'参 数:CommentNum ----最多显示多少个评论
'=================================================
sub ShowComment(CommentNum)
dim rsComment,sqlComment,rsCommentUser
if CommentNum>0 and CommentNum<=100 then
sqlComment="select top " & CommentNum
else
sqlComment="select top 10 "
end if
sqlComment=sqlComment & " * from SoftComment where SoftID=" & SoftID & " order by CommentID desc"
Set rsComment= Server.CreateObject("ADODB.Recordset")
rsComment.open sqlComment,conn,1,1
if rsComment.bof and rsComment.eof then
response.write " 没有任何评论"
else
response.write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
do while not rsComment.eof
response.write "<tr><td width='70%'>"
if rsComment("UserType")=1 then
response.write "<li>会员"
set rsCommentUser=Conn_User.execute("select " & db_User_ID & "," & db_User_Name & "," & db_User_Email & "," & db_User_QQ & "," & db_User_Homepage & " from " & db_User_Table & " where " & db_User_Name & "='" & rsComment("UserName") & "'")
if rsCommentUser.bof and rsCommentUser.eof then
response.write rsComment("UserName")
else
response.write "『<a href='UserInfo.asp?UserID=" & rsCommentUser(0) & "' title='姓名:" & rsCommentUser(1) & vbcrlf & "信箱:" & rsCommentUser(2) & vbcrlf & "Oicq:" & rsCommentUser(3) & vbcrlf & "主页:" & rsCommentUser(4)&"'><font color='blue'>" & rsComment("UserName") & "</font></a>』"
end if
else
response.write "<li>游客『<span title='姓名:" & rsComment("UserName") & vbcrlf & "信箱:" & rsComment("Email") & vbcrlf & "Oicq:" & rsComment("Oicq") & vbcrlf & "主页:" & rsComment("Homepage")&"' style='cursor:hand'><font color='blue'>" & rsComment("UserName") & "</font></span>』"
end if
response.write "于" & rsComment("WriteTime") & "发表评论:</li>"
response.write "</td><td align=right>评分:"&rsComment("Score")&"分</td></tr>"
response.write "<tr><td colspan='2'>"
response.write " " & rsComment("Content") & "<br>"
if rsComment("ReplyContent")<>"" then
response.write " <font color='009900'>★</font> 管理员『<font color='blue'>" & rsComment("ReplyName") & "</font>』于 " & rsComment("ReplyTime") & " 回复道: " & rsComment("ReplyContent") & "<br>"
end if
response.write "<br></td></tr>"
rsComment.movenext
loop
response.write "<tr><td colspan='2' align='right'>"
response.write "<a href='Soft_CommentShow.asp?SoftID=" & SoftID & "'>查看关于此文章的所有评论</a>"
response.write "</td></tr></table>"
end if
end sub
'=================================================
'过程名:ShowPicSoft
'作 用:显示图片软件
'参 数:intClassID ----栏目ID,0为所有栏目,若大于0,则显示指定栏目及其子栏目的图片软件
' SoftNum ----最多显示多少个软件
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
' ShowType ----显示方式。1为只有图片+标题,2为图片+标题+内容简介
' Cols ----列数。超过此列数就换行。
' ImgWidth ----图片宽度
' ImgHeight ----图片高度
' ContentLen ----内容最多字符数
' Hot ----是否是热门软件
' Elite ----是否是推荐软件
'=================================================
sub ShowPicSoft(intClassID,SoftNum,TitleLen,ShowType,Cols,ImgWidth,ImgHeight,ContentLen,Hot,Elite)
dim sqlPic,i,tClass,trs,arrClassID
if SoftNum<0 or SoftNum>=50 then
SoftNum=5
end if
if ShowType<>1 and ShowType<>2 then
ShowType=1
end if
if Cols<=0 or Cols>=10 then
Cols=5
end if
if ImgWidth<0 or ImgWidth>500 then
ImgWidth=150
end if
if ImgHeight<0 or ImgHeight>500 then
ImgHeight=150
end if
if Hot<>True and Hot<>False then
Hot=False
end if
if Elite<>True and Elite<>False then
Elite=False
end if
sqlPic="select top " & SoftNum
sqlPic=sqlPic & " S.SoftID,S.SoftName,S.SoftVersion,S.SoftSize,S.Keyword,S.Author,S.UpdateTime,S.Editor,"
if ShowType=2 then
sqlPic=sqlPic & "S.SoftIntro,"
end if
sqlPic=sqlPic & " S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.OnTop,S.Elite,S.SoftPicUrl,S.Stars,S.SoftLevel,S.SoftPoint from Soft S where S.Deleted=0 and S.Passed=1 and SoftPicUrl<>''"
if intClassID>0 then
set tClass=conn.execute("select ClassID,Child,ParentPath from SoftClass where ClassID=" & intClassID)
if not(tClass.bof and tClass.eof) then
if tClass(1)>0 then
arrClassID=ClassID
set trs=conn.execute("select ClassID from SoftClass where ParentID=" & tClass(0) & " or ParentPath like '%" & tClass(2) & "," & tClass(0) & ",%' and Child=0 and LinkUrl=''")
do while not trs.eof
arrClassID=arrClassID & "," & trs(0)
trs.movenext
loop
set trs=nothing
sqlPic=sqlPic & " and S.ClassID in (" & arrClassID & ")"
else
sqlPic=sqlPic & " and S.ClassID=" & tClass(0)
end if
set trs=nothing
else
sqlPic=sqlPic & " and S.ClassID=" & tClass(0)
end if
set tClass=nothing
end if
if Hot=True then
sqlPic=sqlPic & " and S.Hits>=" & HitsOfHot
end if
if Elite=True then
sqlPic=sqlPic & " and S.Elite=1 "
end if
sqlPic=sqlPic & " order by S.OnTop,S.SoftID desc"
set rsPic=Server.CreateObject("ADODB.Recordset")
rsPic.open sqlPic,conn,1,1
strPic= "<table width='100%' cellpadding='0' cellspacing='5' border='0' align='center'><tr valign='top'>"
if rsPic.bof and rsPic.eof then
for i=1 to cols
strPic= strPic & "<td align='center'><img src='images/NoPic.jpg' width='" & ImgWidth & "' height='" & ImgHeight & "' border='0'><br>没有任何推荐下载</td>"
next
else
i=0
if ShowType=1 then
do while not rsPic.eof
strPic=strPic & "<td align='center'>"
call GetPicSoftTitle(TitleLen,ImgWidth,ImgHeight)
strPic=strPic & "</td>"
rsPic.movenext
i=i+1
if ((i mod Cols=0) and (not rsPic.eof)) then strPic=strPic & "</tr><tr valign='top'>"
loop
elseif ShowType=2 then
do while not rsPic.eof
strPic=strPic & "<td align='center'>"
call GetPicSoftTitle(TitleLen,ImgWidth,ImgHeight)
strPic=strPic & "</td><td valign='top' algin='center' class='left'><a href='" & rsPic("LayoutFileName") & "?SoftID=" & rsPic("SoftID") & "'>" & left(nohtml(rsPic("SoftIntro")),ContentLen) & "……</a></td>"
rsPic.movenext
i=i+1
if ((i mod Cols=0) and (not rsPic.eof)) then strPic=strPic & "</tr><tr valign='top'>"
loop
end if
end if
strPic=strPic & "</tr></table>"
response.write strPic
rsPic.close
end sub
'=================================================
'过程名:GetPicSoftTitle
'作 用:显示图片软件的标题
'参 数:intTitleLen ----标题最多字符数,一个汉字=两个英文字符
' intImgWidth ----图片宽度
' intImgHeight ----图片高度
'=================================================
sub GetPicSoftTitle(intTitleLen,intImgWidth,intImgHeight)
dim FileType,TitleStr
FileType=right(lcase(rsPic("SoftPicUrl")),3)
TitleStr=gotTopic(rsPic("SoftName") & " " & rsPic("SoftVersion"),intTitleLen)
strPic=strPic & "<a href='Soft_Show.asp?SoftID=" & rsPic("SoftID") & "' title='软件名称:" & rsPic("SoftName") & vbcrlf & "软件版本:" & rsPic("SoftVersion") & vbcrlf & "文件大小:" & rsPic("SoftSize") & "K" & vbcrlf & "作 者:" & rsPic("Author") & vbcrlf & "更新时间:" & rsPic("UpdateTime") & vbcrlf & "点击次数:本日:" & rsPic("DayHits") & "本周:" & rsPic("WeekHits") & "本月:" & rsPic("MonthHits") & "总计:" & rsPic("Hits") & "' target='_blank'>"
if FileType="swf" then
strPic=strPic & "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='" & intImgWidth & "' height='" & intImgHeight & "'><param name='movie' value='" & rsPic("SoftPicUrl") & "'><param name='quality' value='high'><embed src='" & rsPic("SoftPicUrl") & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='" & intImgWidth & "' height='" & intImgHeight & "'></embed></object>"
elseif fileType="jpg" or fileType="bmp" or fileType="png" or fileType="gif" then
strPic=strPic & "<img src='" & rsPic("SoftPicUrl") & "' width='" & intImgWidth & "' height='" & intImgHeight & "' border='0'>"
else
strPic=strPic & "<img src='images/NoPic2.jpg' width='" & intImgWidth & "' height='" & intImgHeight & "' border='0'>"
end if
strPic=strPic & "<br>" & TitleStr & "</a>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -