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

📄 admin_manage.asp

📁 WEB后台:/Admin_Login.asp WAP后台:/Admin_WapLogin.asp 用户名:admin 密码:admin 在conn.asp文件修改数据库
💻 ASP
📖 第 1 页 / 共 3 页
字号:
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 + -