当前位置: 网学 > 编程文档 > ASP > 正文

文章列表类别

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17
nk = strTemp
End Function
''================================================
''函数名:LoadStatistic
''作 用:装载频道统计
''参 数:moduleid ----所属模块
'' ChannelID ----频道ID
'' strClass ----所调用的分类ID或者软件类型
'' stype ----统计类型,0=全部统计,1=今日更新统计,2=点击数统计,3=软件容量统计
''================================================
Public Function LoadStatistic(ByVal moduleid, ByVal ChannelID, ByVal strClass, ByVal stype)

moduleid = Newasp.CheckNumeric(moduleid)
ChannelID = Newasp.CheckNumeric(ChannelID)
stype = Newasp.CheckNumeric(stype)

Dim Rs, SQL, StatCount
Dim foundsql, ClassID, ChildStr

ClassID = Newasp.CheckNumeric(strClass)
On Error Resume Next
LoadStatistic = 0
If ClassID > 0 Then
SQL = "SELECT ChildStr FROM [NC_Classify] WHERE ChannelID = " & ChannelID & " And ClassID=" & ClassID
Set Rs = Newasp.Execute(SQL)
If Rs.BOF And Rs.EOF Then
ChildStr = 0
Else
ChildStr = Rs("ChildStr")
End If
Rs.Close: Set Rs = Nothing
foundsql = "And ChannelID=" & ChannelID & " And ClassID in (" & ChildStr & ")"
Else
foundsql = "And ChannelID=" & ChannelID
End If
Select Case moduleid
Case 1
If stype = 1 Then
If isSqlDataBase = 1 Then
SQL = "SELECT COUNT(ArticleID) FROM NC_Article WHERE isAccept>0 " & foundsql & " And Datediff(d,WriteTime,GetDate())=0"
Else
SQL = "SELECT COUNT(ArticleID) FROM NC_Article WHERE isAccept>0 " & foundsql & " And WriteTime>=Date()"
End If
ElseIf stype = 2 Then
SQL = "SELECT SUM(AllHits) FROM NC_Article WHERE isAccept>0 " & foundsql
ElseIf stype = 4 Then
SQL = "SELECT SUM(DayHits) FROM NC_Article WHERE isAccept>0 " & foundsql
Else
SQL = "SELECT COUNT(ArticleID) FROM NC_Article WHERE isAccept>0 " & foundsql
End If
Case 2
If Not IsNumeric(strClass) Then
foundsql = foundsql & " And SoftType=''" & Newasp.CheckStr(strClass) & "''"
End If
If stype = 1 Then
If isSqlDataBase = 1 Then
SQL = "SELECT COUNT(softid) FROM NC_SoftList WHERE isAccept>0 " & foundsql & " And Datediff(d,SoftTime,GetDate())=0"
Else
SQL = "SELECT COUNT(softid) FROM NC_SoftList WHERE isAccept>0 " & foundsql & " And SoftTime>=Date()"
End If
ElseIf stype = 2 Then
SQL = "SELECT SUM(AllHits) FROM NC_SoftList WHERE isAccept>0 " & foundsql
ElseIf stype = 3 Then
SQL = "SELECT SUM(SoftSize) FROM NC_SoftList WHERE isAccept>0 " & foundsql
  • 上一篇资讯: newasp中main类
  • 下一篇资讯: [ASP]精华代码
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号