?? admin_manage.asp
字號:
rs.update
rs.close
set rs=nothing
end sub
sub dellink
dim username
username=Wap.checkstr(Request("username"),12)
Wap.execute("delete from Link where username='"&username&"'")
Response.write "<script language=JavaScript>" & chr(13) & "alert('操作成功!');" &"window.location='admin_manage.asp?action=ListSite&PageNo="&Request("PageNo")&"&Find="&Request("Find")&"&webtype="&Request("webtype")&"&pl="&Request("pl")&"&IsVerify="&Request("IsVerify")&"&intt="&request("intt")&"&ob="&Request("ob")&"'" & "</script>"
end sub
sub init
dim username
username=Wap.checkstr(Request("username"),12)
if username="" then
If IsSqlDataBase = 1 Then
Wap.Execute("update Link set inc=0,inj=0,inp=0,outc=0,outj=0,outp=0,inru=0,outchu=0,wuxiao=0,fromdate=GetDate(),indate=GetDate(),outdate=GetDate()")
Else
Wap.Execute("update Link set inc=0,inj=0,inp=0,outc=0,outj=0,outp=0,inru=0,outchu=0,wuxiao=0,fromdate=date(),indate=date(),outdate=date()")
End If
Response.write "<p align=center>初始化完畢!所有數據已清零,從今天起開始重新統計!</p>"
else
If IsSqlDataBase = 1 Then
Wap.Execute("update Link set inc=0,inj=0,inp=0,outc=0,outj=0,outp=0,inru=0,outchu=0,wuxiao=0,fromdate=GetDate(),indate=GetDate(),outdate=GetDate() where username='"&username&"'")
Else
Wap.Execute("update Link set inc=0,inj=0,inp=0,outc=0,outj=0,outp=0,inru=0,outchu=0,wuxiao=0,fromdate=date(),indate=date(),outdate=date() where username='"&username&"'")
End If
Response.write "<script language=JavaScript>" & chr(13) & "alert('"&username&"的站點初始化完畢!所有數據已清零,從今天起開始重新統計!');" &"window.location='admin_manage.asp?action=ListSite&PageNo="&Request("PageNo")&"&Find="&Request("Find")&"&webtype="&Request("webtype")&"&pl="&Request("pl")&"&IsVerify="&Request("IsVerify")&"&intt="&request("intt")&"&ob="&Request("ob")&"'" & "</script>"
end if
Call GoBack
end sub
sub BatchDelWeb
dim rs,daynum,hitsnum,TotalCount
daynum=Request.form("daynum")
hitsnum=Request.form("hitsnum")
'容錯判斷
if daynum="" or not Isnumeric(daynum) then daynum=30
if hitsnum="" or not Isnumeric(hitsnum) then hitsnum=1
'開始刪除
set rs=Wap.execute("select count(*) from Link where fromdate<"&SqlNowString&"-"&daynum&" and inc<"&hitsnum)
TotalCount=rs(0)
set rs=nothing
if TotalCount>0 then
Wap.execute("delete from Link where fromdate<"&SqlNowString&"-"&daynum&" and inc<"&hitsnum)
Response.write "成功刪除了" & TotalCount &"個站點"
else
Response.write "暫時沒有符合刪除條件的站點"
end if
Call GoBack
end sub
sub BatchDelLog
dim rs,daynum,TotalCount
daynum=Request.form("daynum")
'容錯判斷
if daynum="" or not Isnumeric(daynum) then daynum=4
if daynum<=3 then daynum=4
'開始刪除
set rs=Wap.execute("select count(*) from Log where dateandtime<"&SqlNowString&"-"&daynum)
TotalCount=rs(0)
set rs=nothing
if TotalCount>0 then
Wap.execute("delete from Log where dateandtime<"&SqlNowString&"-"&daynum)
Response.write "成功刪除了" & TotalCount &"條記錄"
else
Response.write "暫時沒有符合刪除條件的記錄"
end if
Call GoBack
end sub
sub BatchDelOnline
'開始刪除 在線用戶信息
Wap.execute("update Online set content='0'")
Response.write "<p align=center>初始化完畢!網站訪問量統計數據已清零,從今天起開始重新統計!</p>"
Call GoBack
end sub
sub ShowLog
dim rs,sql
dim inout
dim username
dim strtitle
dim MaxPageSize:MaxPageSize=30 '每頁顯示的記錄數
username=Wap.checkstr(Request.QueryString("username"),12)
inout=Request.QueryString("inout")
if inout="0" then
strtitle="點入記錄(你站對我站的貢獻)"
elseif inout="1" then
strtitle="點出記錄(我站對你站的貢獻)"
else
strtitle="點入點出記錄"
end if
dim PageNo
PageNo=Request.QueryString("PageNo")
if PageNo="" or not Isnumeric(PageNo) then
PageNo=1
else
PageNo=int(PageNo)
end if
dim condition,linkstr
if username="" then
if inout="" then
condition=""
linkstr="action=ShowLog"
else
condition="where inout="&inout
linkstr="action=ShowLog&inout="&inout
end if
else
strtitle= "<a href=""admin_editlink.asp?username="&username&""" title='查看"&username&"的網站資料'>"&username&"</a>的網站的" & strtitle
if inout="" then
condition="where username='"&username&"'"
linkstr="action=ShowLog&username="&username
else
condition="where inout="&inout &" and username='"&username&"'"
linkstr="action=ShowLog&inout="&inout &"&username="&username
end if
end if
if inout<>"" then
end if
%>
<div align="center"><%=strtitle%></div>
<%
if username="" and inout="" then
If IsSqlDataBase = 1 Then
set rs = Wap.execute("select count(inout) from Log where Datediff(day,dateandtime,GetDate())=0 and inout=0")
Else
set rs = Wap.execute("select count(inout) from Log where Datediff('d',dateandtime,date())=0 and inout=0")
End If
Response.write "<div align=center>今天總點入:" & rs(0)
set rs = nothing
If IsSqlDataBase = 1 Then
set rs = Wap.execute("select count(inout) from Log where Datediff(day,dateandtime,GetDate())=0 and inout=1")
Else
set rs = Wap.execute("select count(inout) from Log where Datediff('d',dateandtime,date())=0 and inout=1")
End If
Response.write " 今天總點出:" & rs(0) & "</div>"
set rs = nothing
end if%>
<table width="534" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr align="center" class="main_title1">
<%if username="" then Response.write "<td width=""100"">用戶名</td>"
if inout="" then Response.write "<td width=""40"" align=center>狀態</td>"
%>
<td width="150">時間</td>
<td width="150">IP地址</td>
<td width="150">內網IP地址</td>
<td width="50"><font face=Wingdings>1</font></td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from Log "&condition&" order by id desc"
rs.open sql,Conn,1,1
if rs.eof then
Response.write "<tr><td colspan=""6"" align=""center"" class=""tr2"">暫時還沒有記錄!</td></tr>"
else
rs.PageSize = MaxPageSize
rs.AbsolutePage = PageNo
dim i
i=0
do while not rs.eof and i<MaxPageSize
%>
<tr class="tr2">
<%if username="" then Response.write "<td><a href=""?action=ShowLog&username="&rs("username")&""">"&rs("username")&"</a></td>"
if inout="" then
Response.write "<td align=""center"">"
Response.write "<a href=""?action=ShowLog&username="&username&"&inout="&rs("inout")&"""><font color=""#000000"">"
if rs("inout")=0 then
Response.write "點入"
else
Response.write "點出"
end if
Response.write "</font></a>"
Response.write "</td>"
end if
%>
<td><%=rs("dateandtime")%></td>
<td><%=rs("ip")%></td>
<%Come=Split(Rs("come"),"@@@")%>
<td><%=Come(0)%> </td>
<td align="center"> <%
If Trim(Come(1))<>"" Then
Response.write "<a href=# title='"&Come(1)&""&vbCRLF
Response.write "'><font face=Wingdings>1</font></a>"
End If
%>
</td>
</tr>
<%
i=i+1
rs.movenext
loop
end if
set rs=nothing%>
</table>
<div class="cutpage">
<%Wap.showPageInfo "Log","id",condition,PageNo,MaxPageSize,linkstr%>
</div>
<%
Call GoBack
end sub
Sub Summary
dim rs
dim TotalSite,TotalSite1,Totalinc,Totaloutc,Totalinj,Totaloutj
TotalSite = Wap.execute("select count(0) from Link")(0)
Totaisverify = Wap.execute("select count(0) from Link where IsVerify=0")(0)
Totawuxiao = Wap.execute("select count(0) from Link where IsVerify="&strTrue&" And wuxiao > 200")(0)
TotaGuLian = Wap.execute("select count(0) from Link where GuLian=1 ")(0)
TotalSite1 = Wap.execute("select count(0) from Link where inc > 0")(0)
set rs = Wap.execute("select sum(inc),sum(outc) from Link")
Totalinc = rs(0)
Totaloutc = rs(1)
set rs = nothing
set rs = Wap.execute("select sum(inj),sum(outj) from Link")
Totalinj = rs(0)
Totaloutj = rs(1)
set rs = nothing
Response.write "<p>總有網站:"&TotalSite
Response.write "<br>待審網站:"&Totaisverify
Response.write "<br>作弊網站:"&Totawuxiao
Response.write "<br>推薦網站:"&TotaGuLian
Response.write "<br>有效網站:"&TotalSite1 & "(有產生過點入次數的網站)"
Response.write "<br>總計點入:"&Totalinc
Response.write "<br>總計點出:"&Totaloutc
Response.write "<br>總的贏利:"&Totalinc-Totaloutc&""
Response.write "<br>今天點入:"&Totalinj
Response.write "<br>今天點出:"&Totaloutj
Response.write "<br>今日贏利:"&Totalinj-Totaloutj&""
set rs = Wap.execute("select sum(inru),sum(outchu) from Link")
Totalinru = rs(0)
Totaloutchu = rs(1)
Response.write "<br>昨日點入:"&Totalinru
Response.write "<br>昨日點出:"&Totaloutchu
Response.write "<br>昨日贏利:"&Totalinru-Totaloutchu&""
Call GoBack
End Sub
Sub GoBack
Response.write "<p align=""center""><< <a href=""javascript:history.go(-1)"">返回上一頁</a></p>"
End Sub
%>
<!--#include file="under.asp"-->
<%set Wap=nothing%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -