📄 index.asp
字号:
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 "<img src='skin/1/xiao1.gif'>暂时没有下载"
else
do while not rsNew.eof
response.Write "<img src='skin/1/xiao1.gif'><a href='Soft_Show.asp?SoftID=" & rsNew("Softid") & "' title='软件名称:" & rsNew("SoftName") & vbcrlf & "软件版本:" & rsNew("SoftVersion") & 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) & "</a><br>"
rsNew.movenext
loop
end if
rsNew.close
set rsNew=nothing
end sub
'=================================================
'过程名:ShowNewPhoto
'作 用:显示最近更新的图片
'参 数:PhotoNum ----最多显示多少个图片
' ShowTitle ----是否显示图片名称,True为显示,False为不显示
' TitleLen ----标题最多字符数,一个汉字=两个英文字符
'=================================================
sub ShowNewPhoto(PhotoNum,ShowTitle,TitleLen)
dim sqlNew,rsNew,i
if PhotoNum>0 and PhotoNum<=100 then
sqlNew="select top " & PhotoNum
else
sqlNew="select top 10 "
end if
sqlNew=sqlNew & " 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=False and P.Passed=True "
sqlNew=sqlNew & " order by P.PhotoID desc"
Set rsNew= Server.CreateObject("ADODB.Recordset")
rsNew.open sqlNew,conn,1,1
if TitleLen<0 or TitleLen>255 then TitleLen=100
response.write "<table border='0' cellpadding='0' cellspacing='5'><tr>"
if rsNew.bof and rsNew.eof then
response.write "<td width='135' align='center'>没有图片</td>"
else
i=1
do while not rsNew.eof
if i mod 9=0 then
resposne.write "</tr><tr>"
end if
response.Write "<td align='center' width='150' valign='top'>"
response.write "<table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='10'><img src='Images/bg_0ltop1.gif' width='10' height='10'></td>"
response.write "<td height='10' background='Images/bg_05.gif'></td>"
response.write "<td height='10'><img src='Images/bg_01top1.gif' width='10' height='10'></td></tr><tr>"
response.write "<td width=10 background=Images/bg_07.gif> </td>"
response.write "<td align='center' valign='middle' bgcolor='#FFFFFF'>"
response.write "<a href='Photo_Show.asp?PhotoID=" & rsNew("Photoid") & "' title='图片名称:" & rsNew("PhotoName") & vbcrlf & "图片大小:" & rsNew("PhotoSize") & vbcrlf & "作 者:" & rsNew("Author") & vbcrlf & "更新时间:" & rsNew("UpdateTime") & vbcrlf & "下载次数:今日:" & rsNew("DayHits") & " 本周:" & rsNew("WeekHits") & " 本月:" & rsNew("MonthHits") & " 总计:" & rsNew("Hits") & "' target='_blank'><img height='100' border='0' src='" & rsNew("PhotoUrl_Thumb") & "'></a>"
response.write "</td><td width='10' background='Images/bg_08.gif'> </td></tr>"
response.write "<tr><td height='10'><img src='Images/bg_0lbottom1.gif' width='10' height='10'></td>"
response.write "<td height='10' background='Images/bg_06.gif'></td>"
response.write "<td height='10'><img src='Images/bg_01bottom1.gif' width='10' height='10'></td></tr></table>"
if ShowTitle=True then
response.write "<a href='Photo_Show.asp?PhotoID=" & rsNew("Photoid") & "' title='图片名称:" & rsNew("PhotoName") & vbcrlf & "图片大小:" & rsNew("PhotoSize") & vbcrlf & "作 者:" & rsNew("Author") & vbcrlf & "更新时间:" & rsNew("UpdateTime") & vbcrlf & "下载次数:今日:" & rsNew("DayHits") & " 本周:" & rsNew("WeekHits") & " 本月:" & rsNew("MonthHits") & " 总计:" & rsNew("Hits") & "' target='_blank'>" & gotTopic(rsNew("PhotoName"),TitleLen) & "</a>"
end if
response.write "</td>"
i=i+1
rsNew.movenext
loop
end if
response.write "</tr></table>"
rsNew.close
set rsNew=nothing
end sub
'=================================================
'过程名:ShowClassNavigation
'作 用:显示栏目导航
'参 数:无
'=================================================
sub ShowSiteNavigation(TableName)
dim rsNavigation,sqlNavigation,strNavigation,PrevRootID,i
sqlNavigation="select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.RootID,C.LinkUrl,C.Child From " & TableName & " C"
sqlNavigation= sqlNavigation & " inner join Layout L on C.LayoutID=L.LayoutID where C.Depth<=1 order by C.RootID,C.OrderID"
Set rsNavigation= Server.CreateObject("ADODB.Recordset")
rsNavigation.open sqlNavigation,conn,1,1
if rsNavigation.bof and rsNavigation.eof then
response.write "没有任何栏目"
else
strNavigation="<table border='0' cellpadding='0' cellspacing='2' width='100%'><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "'>" & rsNavigation(1) & "</a>】</td><td>"
PrevRootID=rsNavigation(4)
rsNavigation.movenext
i=1
do while not rsNavigation.eof
if PrevRootID=rsNavigation(4) then
if i mod 6=0 then
strNavigation=strNavigation & ""
end if
strNavigation=strNavigation & "<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "'>" & rsNavigation(1) & "</a> "
i=i+1
else
strNavigation=strNavigation & "</td></tr><tr><td valign='top' nowrap>【<a href='" & rsNavigation(3) & "?ClassID=" & rsNavigation(0) & "'>" & rsNavigation(1) & "</a>】</td><td>"
i=1
end if
PrevRootID=rsNavigation(4)
rsNavigation.movenext
loop
strNavigation=strNavigation & "</td></tr></table>"
response.write strNavigation
end if
rsNavigation.close
set rsNavigation=nothing
end sub
'=================================================
'过程名:ShowSiteCountAll
'作 用:显示站点统计信息
'参 数:无
'=================================================
sub ShowSiteCountAll()
dim sqlCount,rsCount
Set rsCount= Server.CreateObject("ADODB.Recordset")
sqlCount="select count(ArticleID) from Article where Deleted=False"
rsCount.open sqlCount,conn,1,1
response.write "文章总数:" & rsCount(0) & "篇<br>"
rsCount.close
sqlCount="select count(SoftID) from Soft where Deleted=False"
rsCount.open sqlCount,conn,1,1
response.write "下载总数:" & rsCount(0) & "个<br>"
rsCount.close
sqlCount="select count(PhotoID) from Photo where Deleted=False"
rsCount.open sqlCount,conn,1,1
response.write "图片总数:" & rsCount(0) & "个<br>"
rsCount.close
'sqlCount="select count(ID) from product"
'rsCount.open sqlCount,conn,1,1
'response.write "产品总数:" & rsCount(0) & "个<br>"
'rsCount.close
sqlCount="select count(ID) from movie"
rsCount.open sqlCount,conn,1,1
response.write "电影总数:" & rsCount(0) & "个<br>"
rsCount.close
'sqlCount="select sum(Hits) from article"
'rsCount.open sqlCount,conn,1,1
'response.write "文章阅读:" & rsCount(0) & "人次<br>"
'rsCount.close
'sqlCount="select sum(Hits) from Soft"
'rsCount.open sqlCount,conn,1,1
'response.write "文件下载:" & rsCount(0) & "人次<br>"
'rsCount.close
'sqlCount="select sum(Hits) from Photo"
'rsCount.open sqlCount,conn,1,1
'response.write "图片查看:" & rsCount(0) & "人次<br>"
'rsCount.close
sqlCount="select count(UserID) from " & db_User_Table
rsCount.open sqlCount,Conn_User,1,1
response.write "注册用户:" & rsCount(0) & "名<br>"
rsCount.close
set rsCount=nothing
response.write "<script src='count/mystat.asp?style=all'></script>"
end sub
'--最新电影 2 部 ..
sub show_newmovie
dim rs,sql,temp1,name,nid
temp1="<table border=0 width='100%'><tr align=center valign=top>"
sql="select top 2 id,name,tim,sizes,username,types,genre,os,emoney,remark,counter,pic from movie where hidden"
sql=sql&" order by id desc"
set rs=conn.execute(sql)
if rs.bof and rs.eof then temp1=temp1 & "<li>没有影片</li>"
do while not rs.eof
name=rs("name")
nid=rs("id")
temp1=temp1&vbcrlf&"<table width='100%' border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&"<tr valign=top align=center><td width='33%'>" & _
vbcrlf&" <table border=0>" & _
vbcrlf&"<tr valign=top><td align=center><a href='movie_view.asp?id="&nid&"' target='_blank'><img src=uploadShopPic/"&rs("pic")&" border=0 width=160 height=120></a></td></tr>" & _
vbcrlf&"<tr valign=top><td align=center class=bw></td></tr>" & _
vbcrlf&"</table>"& _
vbcrlf&"</td><td width='100%'>" & _
vbcrlf&"<table border=0 width='100%' height='100%' cellpadding=3>" & _
vbcrlf&"<tr align=center><td width='18%'>" & _
vbcrlf&"<tr><td nowrap>影片名称:</td><td colspan='3'><a href='movie_view.asp?id="&nid&"' target='_blank'><b>"&code_html(name)&"</b></a>" & _
vbcrlf&"<tr><td nowrap>添加日期:</td><td style='color:gray' colspan='3'>"&rs("tim")&"</td>" & _
vbcrlf&"<tr><td nowrap>片源提供:</td><td style='color:gray' width='130'>"&rs("username")&"</td><td>影片产地:<td style='color:gray' width='80'>"&rs("genre")&"</td>" & _
vbcrlf&"<tr><td nowrap>影片格式:</td><td style='color:gray'>"&rs("os")&"</td><td>推荐等级:</td><td><img src='images/down/star"&rs("types")&".gif' border=0></td>" & _
vbcrlf&"<tr><td nowrap>影片大小:</td><td style='color:gray'>"&rs("sizes")&"</td><td>人 气:</td><td style='color:gray'>"&rs("counter")&"</td>" & _
vbcrlf&"</table>"& _
vbcrlf&"<tr><td colspan=5 height=1 background='images/bg_dian.gif'></td></tr>"& _
vbcrlf&"</td></tr></table>"
rs.movenext
loop
rs.close:set rs=nothing
temp1=temp1 & "</td></tr></table>"
response.write temp1
' response.write kong&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",temp1,sk_bar,0,0,"||","")
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -