<% class c_Counter private rs private cgroup, cname private sub class_initialize Set rs = Server.CreateObject("ADODB.RecordSet") end sub private sub class_terminate rs.close:set rs=nothing end sub public property let CounterGroup(v) cgroup = v end property public property let CounterName(v) cname = v end property public property get Total Total = conn.execute("select sum(counter) from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname)(0) end property public property get Year Year = conn.execute("select sum(counter) from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname&" and dateadd('yyyy',1,counterdate)>date()")(0) end property public property get Quarter Quarter = conn.execute("select sum(counter) from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname&" and dateadd('q',1,counterdate)>date()")(0) end property public property get Month Month = conn.execute("select sum(counter) from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname&" and dateadd('m',1,counterdate)>date()")(0) end property public property get Week Week = conn.execute("select sum(counter) from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname&" and dateadd('ww',1,counterdate)>date()")(0) end property public property get Day Day = conn.execute("select sum(counter) from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname&" and dateadd('d',1,counterdate)>date()")(0) end property public sub count rs.open "select * from counters where countergroup='"&replace(cgroup,"'","''")&"' and countername="&cname&" and counterdate=date()", conn,1,3 if rs.eof then rs.addnew rs("countergroup") = cgroup rs("countername") = cname rs("counter") = 1 rs("counterdate") = date else rs("counter") = rs("counter") + 1 end if rs.update end sub end class dim conn Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=;Data Source=" & Server.MapPath("/hezepc/pubcms.asa") on error resume next dim counter set counter = new c_Counter with counter .countergroup = "category" .countername = 36 .count end with set counter = nothing %> 菏泽易达科技 - 首页

菏泽易达科技

最后更新
您的位置: 首页

操作系统 更多内容
网络安全 更多内容
应用程序 更多内容
网络工程 更多内容
DIY装机 更多内容
数码导购 更多内容
电脑维修 更多内容
电脑常识 更多内容
IT新闻 更多内容

 

版权声明