📄 syscode_photo.asp
字号:
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
do while not rsTop.eof
response.Write "<li><a href='Photo_Show.asp?PhotoID=" & rsTop("Photoid") & "' title='产品名称:" & rsTop("PhotoName") & vbcrlf & "产品版本:" & rsTop("PhotoVersion") & vbcrlf & "产品大小:" & rsTop("PhotoSize") & "K" & vbcrlf & "作 者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("PhotoName"),TitleLen) & "</li><br>"
rsTop.movenext
loop
end if
rsTop.close
set rsTop=nothing
end sub
'=================================================
'过程名:ShowTopDay
'作 用:显示本日下载TOP N,N由参数PhotoNum指定
'参 数:PhotoNum ----最多显示多少个产品
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTopDay(PhotoNum,TitleLen)
dim sqlTop,rsTop
if PhotoNum>0 and PhotoNum<=100 then
sqlTop="select top " & PhotoNum
else
sqlTop="select top 10 "
end if
sqlTop=sqlTop & " S.PhotoID,S.PhotoName,S.PhotoVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.PhotoSize,S.PhotoLevel,S.PhotoPoint from Photo S where S.Deleted=0 and S.Passed=1 And datediff('D',LastHitTime,now())<=0 order by S.DayHits desc,S.PhotoID 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
do while not rsTop.eof
response.Write "<li><a href='Photo_Show.asp?PhotoID=" & rsTop("Photoid") & "' title='产品名称:" & rsTop("PhotoName") & vbcrlf & "产品版本:" & rsTop("PhotoVersion") & vbcrlf & "产品大小:" & rsTop("PhotoSize") & "K" & vbcrlf & "作 者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("PhotoName"),TitleLen) & "</li><br>"
rsTop.movenext
loop
end if
rsTop.close
set rsTop=nothing
end sub
'=================================================
'过程名:ShowTopWeek
'作 用:显示本周下载TOP N,N由参数PhotoNum指定
'参 数:PhotoNum ----最多显示多少个产品
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTopWeek(PhotoNum,TitleLen)
dim sqlTop,rsTop
if PhotoNum>0 and PhotoNum<=100 then
sqlTop="select top " & PhotoNum
else
sqlTop="select top 10 "
end if
sqlTop=sqlTop & " S.PhotoID,S.PhotoName,S.PhotoVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.PhotoSize,S.PhotoLevel,S.PhotoPoint from Photo S where S.Deleted=0 and S.Passed=1 And datediff('ww',LastHitTime,now())<=0 order by S.WeekHits desc,S.PhotoID 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
do while not rsTop.eof
response.Write "<li><a href='Photo_Show.asp?PhotoID=" & rsTop("Photoid") & "' title='产品名称:" & rsTop("PhotoName") & vbcrlf & "产品版本:" & rsTop("PhotoVersion") & vbcrlf & "产品大小:" & rsTop("PhotoSize") & "K" & vbcrlf & "作 者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("PhotoName"),TitleLen) & "</li><br>"
rsTop.movenext
loop
end if
rsTop.close
set rsTop=nothing
end sub
'=================================================
'过程名:ShowTopMonth
'作 用:显示本月下载TOP N,N由参数PhotoNum指定
'参 数:PhotoNum ----最多显示多少个产品
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowTopMonth(PhotoNum,TitleLen)
dim sqlTop,rsTop
if PhotoNum>0 and PhotoNum<=100 then
sqlTop="select top " & PhotoNum
else
sqlTop="select top 10 "
end if
sqlTop=sqlTop & " S.PhotoID,S.PhotoName,S.PhotoVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.DayHits,S.WeekHits,S.MonthHits,S.PhotoSize,S.PhotoLevel,S.PhotoPoint from Photo S where S.Deleted=0 and S.Passed=1 And datediff('m',LastHitTime,now())<=0 order by S.MonthHits desc,S.PhotoID 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
do while not rsTop.eof
response.Write "<li><a href='Photo_Show.asp?PhotoID=" & rsTop("Photoid") & "' title='产品名称:" & rsTop("PhotoName") & vbcrlf & "产品版本:" & rsTop("PhotoVersion") & vbcrlf & "产品大小:" & rsTop("PhotoSize") & "K" & vbcrlf & "作 者:" & rsTop("Author") & vbcrlf & "更新时间:" & rsTop("UpdateTime") & vbcrlf & "下载次数:今日:" & rsTop("DayHits") & " 本周:" & rsTop("WeekHits") & " 本月:" & rsTop("MonthHits") & " 总计:" & rsTop("Hits") & "' target='_blank'>" & gotTopic(rsTop("PhotoName") & " " & rsTop("PhotoVersion"),TitleLen) & "</li><br>"
rsTop.movenext
loop
end if
rsTop.close
set rsTop=nothing
end sub
'=================================================
'过程名:ShowHot
'作 用:显示热门下载
'参 数:PhotoNum ----最多显示多少个产品
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowHot(PhotoNum,TitleLen)
dim sqlHot,rsHot
if PhotoNum>0 and PhotoNum<=100 then
sqlHot="select top " & PhotoNum
else
sqlHot="select top 10 "
end if
sqlHot=sqlHot & " P.PhotoID,P.PhotoName,P.PhotoUrl_Thumb,P.Author,P.Keyword,P.UpdateTime,P.Editor,P.Hits,P.DayHits,P.WeekHits,P.MonthHits,P.PhotoSize,P.PhotoLevel,P.PhotoPoint from Photo P where P.Deleted=0 and P.Passed=1 And P.Hits>=" & HitsOfHot
sqlHot=sqlHot & " order by P.PhotoID 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='Photo_Show.asp?PhotoID=" & rsHot("Photoid") & "' title='产品名称:" & rsHot("PhotoName") & vbcrlf & "产品大小:" & rsHot("PhotoSize") & "K" & vbcrlf & "作 者:" & rsHot("Author") & vbcrlf & "更新时间:" & rsHot("UpdateTime") & vbcrlf & "下载次数:" & rsHot("Hits") & "' target='_blank'>" & gotTopic(rsHot("PhotoName"),TitleLen) & "[<font color=red>" & rsHot("hits") & "</font>]</li><br>"
rsHot.movenext
loop
end if
rsHot.close
set rsHot=nothing
end sub
'=================================================
'过程名:ShowElite
'作 用:显示推荐产品
'参 数:PhotoNum ----最多显示多少个产品
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowElite(PhotoNum,TitleLen)
dim sqlElite,rsElite
if PhotoNum>0 and PhotoNum<=100 then
sqlElite="select top " & PhotoNum
else
sqlElite="select top 10 "
end if
sqlElite=sqlElite & " P.PhotoID,P.PhotoName,P.PhotoUrl_Thumb,P.Author,P.Keyword,P.UpdateTime,P.Editor,P.Hits,P.DayHits,P.WeekHits,P.MonthHits,P.PhotoSize,P.PhotoLevel,P.PhotoPoint from Photo P where P.Deleted=0 and P.Passed=1 And P.Elite=1 "
sqlElite=sqlElite & " order by P.PhotoID 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='Photo_Show.asp?PhotoID=" & rsElite("Photoid") & "' title='产品名称:" & rsElite("PhotoName") & vbcrlf & "产品大小:" & rsElite("PhotoSize") & "K" & vbcrlf & "作 者:" & rsElite("Author") & vbcrlf & "更新时间:" & rsElite("UpdateTime") & vbcrlf & "下载次数:" & rsElite("Hits") & "' target='_blank'>" & gotTopic(rsElite("PhotoName"),TitleLen) & "[<font color=red>" & rsElite("hits") & "</font>]</li><br>"
rsElite.movenext
loop
end if
rsElite.close
set rsElite=nothing
end sub
'=================================================
'过程名:ShowCorrelative
'作 用:显示相关产品
'参 数:PhotoNum ----最多显示多少个产品
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowCorrelative(PhotoNum,TitleLen)
dim rsCorrelative,sqlCorrelative
dim strKey,arrKey,i
if PhotoNum>0 and PhotoNum<=100 then
sqlCorrelative="select top " & PhotoNum
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.PhotoID,S.PhotoName,S.PhotoVersion,S.Author,S.Keyword,S.UpdateTime,S.Editor,S.Hits,S.PhotoSize,S.PhotoLevel,S.PhotoPoint from Photo S Where S.Deleted=0 and S.Passed=1 and " & strKey & " and S.PhotoID<>" & PhotoID & " Order by S.PhotoID 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='Photo_Show.asp?PhotoID=" & rsCorrelative("Photoid") & "' title='产品名称:" & rsCorrelative("PhotoName") & vbcrlf & "产品大小:" & rsCorrelative("PhotoSize") & "K" & vbcrlf & "作 者:" & rsCorrelative("Author") & vbcrlf & "更新时间:" & rsCorrelative("UpdateTime") & vbcrlf & "下载次数:" & rsCorrelative("Hits") & "' target='_blank'>" & gotTopic(rsCorrelativ("PhotoName"),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 PhotoComment where PhotoID=" & PhotoID & " 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='Photo_CommentShow.asp?PhotoID=" & PhotoID & "'>查看关于此文章的所有评论</a>"
response.write "</td></tr></table>"
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -