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

📄 count.asp

📁 没有什么
💻 ASP
字号:
<!--#include file="const.Asp"-->
<%CheckAdmin1%>
<%PageName="Class"%>
<!--#include file="makeconfigini.asp"-->

<%
count=trim(request.form("count"))
mecount=trim(request.form("mecount"))
counturl=trim(request.form("counturl"))
if trim(request.form("sbb"))="清空统计" then
	if IsSqlDataBase=0 then
		conn.Execute("DELETE FROM [install]")
	else
		conn.Execute("TRUNCATE TABLE [install]")	
	end if
end if

if count<>"" and mecount<>"" and counturl<>"" then
	set rs=server.createobject("adodb.recordset")
	sql = "SELECT * FROM config where id=1" 
	rs.Open sql,conn,1,3
	if not rs.eof then
		rs("count1")=count
		rs("mecount")=mecount		
		rs("counturl")=counturl		
		rs.update
	end if
	rs.close
	set rs=nothing
else
	set rs=server.createobject("adodb.recordset")
	sql = "SELECT * FROM config" 
	rs.Open sql,conn,1,1
	if not rs.eof then
		count=rs("count1")
		mecount=rs("mecount")		
		counturl=rs("counturl")		
		updatetimer=rs("updatetimer")	
	end if
	rs.close
	set rs=nothing
end if
set rs2=server.createobject("adodb.recordset")
sql = "SELECT count(id) as countid FROM [install]" 
rs2.Open sql,conn,1,1
if not rs2.eof then
	sumcount=rs2("countid")
	'mecount=rs2("mecount")		
	'counturl=rs2("counturl")		
end if
rs2.close
if IsSqlDataBase = 0 then
	sql = "SELECT count(id) as countid FROM [install] where DateDiff('d', time1,now())=1" 
else
	sql = "SELECT count(id) as countid FROM [install] where DateDiff(d, time1,getdate())=1" 
end if

rs2.Open sql,conn,1,1
if not rs2.eof then
	yescount=rs2("countid")		
end if
rs2.close
if IsSqlDataBase = 0 then
	sql = "SELECT count(id) as countid FROM [install] where DateDiff('d', time1,now())=0" 
else
	sql = "SELECT count(id) as countid FROM [install] where DateDiff(d, time1,getdate())=0" 
end if 
rs2.Open sql,conn,1,1
if not rs2.eof then
	todaycount=rs2("countid")		
end if
rs2.close
if IsSqlDataBase = 0 then
	sql = "SELECT count(id) as countid FROM [install] where DateDiff('d', time2,now())=0" 
else
	sql = "SELECT count(id) as countid FROM [install] where DateDiff(d, time2,getdate())=0" 
end if
rs2.Open sql,conn,1,1
if not rs2.eof then
	todayhcount=rs2("countid")		
end if
rs2.close
if IsSqlDataBase = 0 then
	sql = "SELECT count(id) as countid FROM [install] where DateDiff('n', time2,now())<="&updatetimer
else
	sql = "SELECT count(id) as countid FROM [install] where DateDiff(n, time2,getdate())<="&updatetimer
end if
rs2.Open sql,conn,1,1
if not rs2.eof then
	onlinecount=rs2("countid")		
end if
rs2.close


dim i
i=0 
MaxList=20

sql="select top 21 * from [install] order by time1 desc"
rs2.open sql,conn,1,1

%>
<link href="Images/Admin_Style.Css" rel="stylesheet" type="text/css">

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
	<form method="POST" action="">

  <tr class="title"> 
    <td height="22" colspan="3" align="center"><strong>安 装 数 量 统 计</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="14%" height="30"><b>今日回访量:</b></td>
    <td width="83%"> <%=todayhcount%></td>
    <td width="2%"> </td>
  </tr>
    <tr class="tdbg"> 
    <td width="14%" height="30"><b>在线活动量:</b></td>
    <td width="83%"> <%=onlinecount%>/[<font color="red"><%=updatetimer%></font>分钟内在线PC]</td>
    <td width="2%"> </td>
  </tr>
  <tr class="tdbg"> 
    <td width="14%" height="30"><b>今日回访率:</b></td>
    <td width="83%"> <%if sumcount<>0 then%><%=int(todayhcount*10000/sumcount)/100%> %<%end if%></td>
    <td width="2%"> </td>
  </tr>
  <tr class="tdbg"> 
    <td width="14%" height="30"><b>今日安装量:</b></td>
    <td width="83%"> <%=todaycount%></td>
    <td width="2%"> </td>
  </tr>
  <tr class="tdbg"> 
    <td width="14%" height="30"><b>昨日安装量:</b></td>
    <td width="83%"> <%=yescount%></td>
    <td width="2%"> </td>
  </tr>
  <tr class="tdbg"> 
    <td width="14%" height="30"><b>安装总数量:</b></td>
    <td width="83%"> <%=sumcount%></td>
    <td width="2%"> </td>
  </tr>
 
  <tr class="tdbg"> 
    <td width="14%" height="30"> </td>
    <td width="83%"><input type="submit" value="保 存" name="isok" class=input>&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="submit" value="清空统计" name="sbb"></td>
    <td width="2%"></td>
  </tr>
</table>
<br><br>
<table width="1230" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" colspan="6" align="center"><strong>最 后 20 位 安 装 者</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="19%" height="30">
	<p align="center">MAC地址</td>
    <td width="15%">
	<p align="center">IP地址</td>
    <td width="16%">
	<p align="center">首次安装时间</td>
    <td width="15%">
	<p align="center">最后访问时间</td>
    <td width="13%">
	<p align="center">版本号</td>	
    <td width="19%" >
	<p align="center">联盟ID</td>
  </tr>  
  <%
if iseof=false then
do while not rs2.eof
	i=i+1
%>  
  <tr class="tdbg">
    <td height="30" align="center"><%=rs2("mac")%></td>
    <td height="30" align="center"><%=rs2("ip")%></td>
    <td height="30" align="center"><%=rs2("time1")%></td>
    <td height="30" align="center"><%=rs2("time2")%></td>   
    <td height="30" align="center"><%=rs2("ver")%></td>  
    <td height="30" align="center" width="19%"><%=rs2("lianmeng")%>
	 </td>
  </tr>
  <%
	if (i mod (MaxList/2)=0) and i>=(MaxList/2) then
%>

<%
	end if
	if i>=MaxList then exit do
    rs2.movenext
	loop
	rs2.close
end if	


if request.form("isok")="保 存" then
    Response.Write "恭喜,保存成功" 
end if
    %>
</table>
</body>
</html>

⌨️ 快捷键说明

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