%
'请勿改动下面这三行代码
const ChannelID=1
Const ShowRunTime="Yes"
MaxPerPage=20
SkinID=0
PageTitle="首页"
Set rsArticle= Server.CreateObject("ADODB.Recordset")
Set rsPic= Server.CreateObject("ADODB.Recordset")
%>
本网站正在改版中
<%call MenuJS()%>
<% call PopAnnouceWindow(400,300) %>
<% call ShowAD(0) %>
<% call ShowAD(4) %>
<% call ShowAD(5) %>
|
|
| |
|
| 本
|
 |
在在 |
|
|
<%
call CloseConn()
'=================================================
'过程名: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=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 "没有下载"
else
do while not rsNew.eof
response.Write "
" & gotTopic(rsNew("SoftName") & " " & rsNew("SoftVersion"),TitleLen) & "
"
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 ""
if rsNew.bof and rsNew.eof then
response.write "| 没有图片 | "
else
i=1
do while not rsNew.eof
if i mod 5=0 then
resposne.write "
"
end if
response.Write ""
response.write " | "
response.write " | "
response.write " | "
response.write "| | "
response.write ""
response.write " "
response.write " | | "
response.write " | "
response.write " | "
response.write " | "
if ShowTitle=True then
response.write "" & gotTopic(rsNew("PhotoName"),TitleLen) & ""
end if
response.write " | "
i=i+1
rsNew.movenext
loop
end if
response.write "
"
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="| 【" & rsNavigation(1) & "】 | "
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 & "" & rsNavigation(1) & " "
i=i+1
else
strNavigation=strNavigation & " |
| 【" & rsNavigation(1) & "】 | "
i=1
end if
PrevRootID=rsNavigation(4)
rsNavigation.movenext
loop
strNavigation=strNavigation & " |
"
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) & " 篇
"
rsCount.close
sqlCount="select count(SoftID) from Soft where Deleted=False"
rsCount.open sqlCount,conn,1,1
response.write "下载总数统计:" & rsCount(0) & " 个
"
rsCount.close
sqlCount="select count(PhotoID) from Photo where Deleted=False"
rsCount.open sqlCount,conn,1,1
response.write "图片总数统计:" & rsCount(0) & " 幅
"
rsCount.close
'sqlCount="select sum(Hits) from article"
'rsCount.open sqlCount,conn,1,1
'response.write "文章阅读:" & rsCount(0) & "人次
"
'rsCount.close
'sqlCount="select sum(Hits) from Soft"
'rsCount.open sqlCount,conn,1,1
'response.write "文件下载:" & rsCount(0) & "人次
"
'rsCount.close
'sqlCount="select sum(Hits) from Photo"
'rsCount.open sqlCount,conn,1,1
'response.write "图片查看:" & rsCount(0) & "人次
"
'rsCount.close
sqlCount="select count(UserID) from " & db_User_Table
rsCount.open sqlCount,Conn_User,1,1
response.write "注册用户统计:" & rsCount(0) & " 名
"
rsCount.close
set rsCount=nothing
response.write ""
end sub
%>