<% '请勿改动下面这三行代码 const ChannelID=1 Const ShowRunTime="Yes" MaxPerPage=20 SkinID=0 PageTitle="首页" Set rsArticle= Server.CreateObject("ADODB.Recordset") Set rsPic= Server.CreateObject("ADODB.Recordset") %>
 
 
<% 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 response.Write "" do while not rsNew.eof response.Write "" 'response.Write "" rsNew.movenext loop response.Write"
    ·" & gotTopic(rsNew("SoftName") & " " & rsNew("SoftVersion"),TitleLen) &"下载:" & rsNew("Hits") & "次
    " end if 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") response.write "" sqlCount="select count(ArticleID) from Article where Deleted=False" rsCount.open sqlCount,conn,1,1 response.write "" rsCount.close sqlCount="select count(SoftID) from Soft where Deleted=False" rsCount.open sqlCount,conn,1,1 response.write "" rsCount.close 'sqlCount="select count(PhotoID) from Photo where Deleted=False" 'rsCount.open sqlCount,conn,1,1 'response.write "" '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.close set rsCount=nothing response.write "" response.write "
    ·文章总数: " & rsCount(0) & "篇
    ·下载总数: " & rsCount(0) & "个
    ·图片总数: " & rsCount(0) & "个
    ·注册用户: " & rsCount(0) & "名
    " end sub %>