⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stats.asp

📁 一个不错的论坛原代码
💻 ASP
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->

<%cpbtitle="论坛统计"
call toptitle(l_title,cpbtitle)
call head(4,"论坛信息",Request.ServerVariables("HTTP_REFERER"),cpbtitle)
if h_viewcpb=1 and isuser=false then response.redirect("login.asp")
'以下计算当天发帖和注册会员
sqluser="select top 1 username from user order by time desc"
set rsuser=conn.execute(sqluser)
if not(rsuser.bof and rsuser.eof) then
username1=rsuser("username")
end if
sqltt="select n_num,t_num,r_num,o_num,o_time,h_tjnowday,h_tjpreday,h_tjnowmonth,h_tjpremonth,h_tjtoday,h_tjmonth,h_tjstart,tongji,tongji1,tongjiip,h_posttoday,h_replytoday,h_regtoday from total"
set rstt=conn.execute(sqltt)
n_num=rstt("n_num")
t_num=rstt("t_num")
r_num=rstt("r_num")
o_num=rstt("o_num")
o_time=rstt("o_time")
h_tjnowday=rstt("h_tjnowday")
h_tjpreday=rstt("h_tjpreday")
h_tjnowmonth=rstt("h_tjnowmonth")
h_tjpremonth=rstt("h_tjpremonth")
h_tjtoday=rstt("h_tjtoday")
h_tjmonth=rstt("h_tjmonth")
h_tjstart=rstt("h_tjstart")
tongji=rstt("tongji")
tongji1=rstt("tongji1")
tongjiip=rstt("tongjiip")
h_regtoday=rstt("h_regtoday")
h_replytoday=rstt("h_replytoday")
h_posttoday=rstt("h_posttoday")
set rstt=nothing
'-------计算版块统计------
'大类
sql="select count(*) as type1 from fenlei"
set rs=conn.execute(sql)
type1=rs("type1")
set rs=nothing
'小类
sql="select count(*) as type1 from lanmu"
set rs=conn.execute(sql)
lanmu1=rs("type1")
set rs=nothing
'管理员
sql="select count(*) as type1 from user where grade='0'"
set rs=conn.execute(sql)
cpb1=rs("type1")
set rs=nothing
'总斑竹
sql="select count(*) as type1 from user where grade='1'"
set rs=conn.execute(sql)
cpb2=rs("type1")
set rs=nothing
'斑竹
sql="select count(*) as type1 from user where grade='2'"
set rs=conn.execute(sql)
cpb3=rs("type1")
set rs=nothing
'计算平均
datecount=round((now()-h_tjstart),2)'统计天数
if datecount=0 then datecount=1
vercount=round((tongji/datecount),2)'平均访问量(记ip的)
vercount1=round((tongji1/datecount),2)'平均访问量(不记ip的)
%>


          <center> 
             <table  border=1 borderColor=<%=tdc2%> cellPadding=2 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse">
  <tr>
                  <td  <%=tColor%> class=tdc1  height="23" align="center" width="100%"> 
                  论坛注册用户统计</td>
          </tr>
          
<tr>
                  <td    bgcolor=<%=tcolor2%> class=tdc  width="100%"> 
<table border=0 width=98% align=center>


       
               <tr  align="center"> 
            <td height=35 bgcolor=<%=tcolor2%> class=tdc ><p align="left">论坛当前共有 <b><%=n_num%></b> 名会员 今日注册用户 <b><%=h_regtoday%></b> 名 最近注册: <a href="viewuser.asp?username=<%=username1%>" target=_blank><b><%=username1%></b></a>
             </td></tr> 


        </table>
             </td></tr> 


        </table>
        <font size="1">&nbsp;</font><br>  
        
   
             <table  border=1 borderColor=<%=tdc2%> cellPadding=2 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse">
  <tr>
                  <td  <%=tColor%> class=tdc1  height="23" align="center" width="100%"> 
                  论坛版块统计</td>
          </tr>
          

<tr>
                  <td    bgcolor=<%=tcolor2%> class=tdc  width="100%"> 
<table border=0 width=98% align=center>


       
               <tr  align="center"> 
            <td height=35 bgcolor=<%=tcolor2%> class=tdc ><p align="left">论坛共有大分类 <b><%=type1%></b> 个 讨论区 <b><%=lanmu1%></b> 个 管理员 <b><%=cpb1%></b> 名 总版主 <b><%=cpb2%></b> 名 版主 <b><%=cpb3%></b> 名
             </td></tr> 


        </table>
             </td></tr> 


        </table>
           <font size="1">&nbsp;</font><br>  
        
   
             <table  border=1 borderColor=<%=tdc2%> cellPadding=2 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse">
  <tr>
                  <td  <%=tColor%> class=tdc1  height="23" align="center" width="100%"> 
                  论坛帖子统计</td>
          </tr>
          
 <tr>
                  <td    bgcolor=<%=tcolor2%> class=tdc  width="100%"> 
<table border=0 width=98% align=center>

       
               <tr  align="center"> 
            <td height=35 bgcolor=<%=tcolor2%> class=tdc ><p align="left">论坛共有帖子总数:<b><%=t_num+r_num%></b> 主题总数:<b><%=t_num%></b> 回复总数:<b><%=r_num%></b> 今日主题帖数:<b><%=h_posttoday%></b> 今日回复帖数:<b><%=h_replytoday%></b>
             </td></tr> 


        </table>      </td></tr> 


        </table>
                   <font size="1">&nbsp;</font><br>  
        
   
             <table  border=1 borderColor=<%=tdc2%> cellPadding=2 cellSpacing=1 width=<%=tdc3%> style="border-collapse: collapse">
  <tr>
                  <td  <%=tColor%> class=tdc1  height="23" align="center" width="100%"> 
                  论坛访问统计</td>
          </tr>
          
 <tr>
                  <td    bgcolor=<%=tcolor2%> class=tdc  width="100%"> 
<table border=0 width=98% align=center>

       
               <tr  align="center"> 
            <td height=60 bgcolor=<%=tcolor2%> class=tdc ><p align="left"> 论坛共被点击:<b><%=tongji1%></b> 被访问:<b><%=tongji%></b> 最高记录在 <B><%=o_time%></b> 共有 <B><%=o_num%></B> 人同时在线 本日浏览人数:<b><%=h_tjnowday%></b> 昨日浏览人数:<b><%=h_tjpreday%></b>  <p align=left>本月浏览人数:<b><%=h_tjnowmonth%></b> 上月浏览人数::<b><%=h_tjpremonth%></b> 开站统计时间:<b><%=h_tjstart%></b> 平均日访问量:<b><%=vercount%></b> 平均日点击量:<b><%=vercount1%></b>


             </td></tr> 
             </table>
</td></tr> 

        </table>

             </center> 
      
<!--#include file="bq.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -