?? count.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>
<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 + -