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

📄 main.asp

📁 这是一款很好的SQL多用户版程序
💻 ASP
字号:
<%@ CODEPAGE = "936" %>
<!--#include file="inc_config.asp"-->
<%
'权限分配
if  whatcan<1 then Response.Redirect "help.asp?id=004&error=本统计系统管理员不允许访客查看任何信息。"
Response.Expires =0
set conn=server.createobject("adodb.connection")
conn.Open constr
'所有总访问数、开始访问日期(从主数据库读取)
    tmprs=conn.execute("Select vtop,starttime from vjian where mem_id ="&uid)
    vtotal=tmprs("vtop")
    vfirst=tmprs("starttime")
	set tmprs=nothing
	if isnull(vtotal) then vtotal=0

if vtotal=0 then
	conn.Close
	set conn=nothing
	Response.Redirect "help.asp?id=007&error=统计系统还没有启用,尚不能查看统计报告。"
end if

ttt0 = Hour(time)
ttt1=Minute(time)
if ttt1 > 15 Then
	ttt3 = date&" " & ttt0 &":"& ttt1-15 &":00 "
else
	ttt3 = date &" "& ttt0 -1  &" "&  ttt1 +45 &":00 "
end if
ttt3 = cdate(ttt3)
'在线人数   其实是15分钟内的访问量
	Set rs = Server.CreateObject("ADODB.Recordset")
	sql="select vip from views where mem_id ="&uid &" and vtime >= '"& ttt3 &"' group by vip"
	rs.Open sql,conn,1,1
	vonline=rs.RecordCount
	rs.Close
	set rs=nothing
'今日访问量、昨日访问量(从简数据朝读取)
    tmprs=conn.execute("Select today,yesterday from vjian WHERE mem_id = " & uid  )
    vtoday=tmprs("today")
    vyesterday=tmprs("yesterday")
	if isnull(vtoday) then vtoday=0
	if isnull(vyesterday) then vyesterday=0
'今年访问量
    tmprs=conn.execute("Select count(id) as vthisyear from views where mem_id ="&uid &" and vyear=" & year(now))
    vthisyear=tmprs("vthisyear")
	if isnull(vthisyear) then vthisyear=0
'本月访问量
	tmprssql = "Select count(id) as vthismonth from views where mem_id ="&uid &" and vmonth=" & month(now) & " and vyear=" & year(now)
    tmprs=conn.execute (tmprssql)
    vthismonth=tmprs("vthismonth")
	if isnull(vthismonth) then vthismonth=0
'访问天数、平均每天访问量
	vdays=now()-vfirst
	vdayavg=vtotal/vdays
	vdays=int((vdays*10^mPrecision)+0.5)/(10^mPrecision)
	if vdays<1 then vdays="0" & vdays
	vdayavg=int((vdayavg*10^mPrecision)+0.5)/(10^mPrecision)
'预计今日访问量
	vdaylong=now()-date()
	vguess=int(((vtoday/vdaylong)+vyesterday)/2+0.5)
	if vguess< vtoday then vguess=int((vtoday/vdaylong)+0.5)
'当前用户访问量
	vuser=clng(Request.Cookies(mNameEn)("AjiangCountSys"))

conn.Close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="refresh" content="60">
<title><%=countname%></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body topmargin=5 rightmargin=0 leftmargin=0 vlink=#000000>
<!--#include file="inc_top.asp"-->
<br>
<table width="500" cellspacing="0" align="center" cellpadding="0" border="0">
  <tr><td colspan="4"><img src="images/photoup.gif"></td></tr>
  <tr height="30">
    <td width="1" class="backs"></td>
    <td colspan="2" width="489"class="backq">
		&nbsp; <img src="images/tb_title.gif" align=absmiddle> &nbsp;∷∷∷ 总 体 数 据 ∷∷∷</td>
    <td width="1" class="backs"></td>
  </tr>
  <tr height="50">
    <td width="1" class="backs"></td>
    <td width="220"class="backq" valign=top>
		<p style="line-height: 140%; margin-left: 25; margin-right: 0; margin-top: 10; margin-bottom: 5" align=left>
		总访问量: &nbsp; <%=vtotal+old_count%><br>
		用本系统前: <%=old_count%><br>
		用本系统后: <%=vtotal%><br>
		在线人数: &nbsp; <%=vonline%><br>
		您的访问量: <%=vuser%><br>
		开始统计于: <%=vfirst%><br>
		今日访问量: <%=vtoday%><br>
		昨日访问量: <%=vyesterday%><br>
		今年访问量: <%=vthisyear%><br>
		本月访问量: <%=vthismonth%><br>
		统计天数: &nbsp; <%=vdays%><br>
		平均日访量: <%=vdayavg%><br>
		预计今日: &nbsp; <%=vguess%><br>
	</td>
    <td width="278"class="backq" valign=top>
		<p style="line-height: 140%; margin-left: 10; margin-right: 0; margin-top: 10; margin-bottom: 0" align=left>
		网站: <%=mName%><br>
		连接: <a href="<%=mURL%>" class="a1" target="_blank"><%=mURL%></a><br>
		站长: <%=masterName%><br>
		信箱: <a href="mailto:<%=masterEmail%>" class="a1"><%=masterEmail%></a><br>
		<p style="text-indent: -35; line-height: 140%; margin-left: 45; margin-right: 25; margin-top: 0; margin-bottom: 5" align=left>简介: <%=SiteBrief%><br>

	</td>
    <td width="1" class="backs"></td>
  </tr>
  <tr><td colspan="4"><img src="images/photodown.gif"></td></tr>
</table>
<br>

<table width="500" cellspacing="0" align="center" cellpadding="0" border="0">
  <tr><td colspan="3"><img src="images/photoup.gif"></td></tr>
<form action="login.asp"  method=post target="_top" id=form1 name=form1>
  <tr height="50">
    <td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
    <td width=498 class="backq">
&nbsp;&nbsp; <img src="images/tb_login.gif" align=absmiddle> 管理员登录
&nbsp; &nbsp; 管理员已登录!&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<a href='logout.asp' target="_top">退出 <img src="images/arbutton.gif" align="absmiddle" border="0"></a>	</td>
    <td width="1" class="backs"><img src="images/touming.gif" width="1" height="1"></td>
  </tr>
</form>
  <tr><td colspan="3"><img src="images/photodown.gif"></td></tr>
</table>
<%if yestop=0 and yesleft=0 then%>
<br>
<!--#include file="inc_index.asp"-->
<%end if%>
<!--#include file="inc_bottom.asp"-->
</body>
</html>

⌨️ 快捷键说明

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