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

📄 admin_manage.asp

📁 图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
sub rg
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tt_link where id="&request.querystring("id"),conn,1,3
rs("gd")=0
response.write "<script language=JavaScript>" & chr(13) & "alert('操作成功!');" &"window.location='admin_manage.asp?action=ListSite'" & "</script>"  	
rs.update
rs.close
set rs=nothing
end sub

sub wg
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tt_link where id="&request.querystring("id"),conn,1,3
rs("gd")=1
rs.update
 response.write "<script language=JavaScript>" & chr(13) & "alert('操作成功!');" &"window.location='admin_manage.asp?action=ListSite'" & "</script>"
rs.close
set rs=nothing
end sub

sub edit
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tt_link where id="&request.querystring("id"),conn,1,3
rs("IsVerify")=1
response.write "<script language=JavaScript>" & chr(13) & "alert('操作成功!');" &"window.location='admin_manage.asp?action=ListSite'" & "</script>"
rs.update
rs.close
set rs=nothing
end sub

sub edit1
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tt_link where id="&request.querystring("id"),conn,1,3
rs("IsVerify")=0
rs("gd")=0
response.write "<script language=JavaScript>" & chr(13) & "alert('操作成功!');" &"window.location='admin_manage.asp?action=ListSite'" & "</script>"
rs.update
rs.close
set rs=nothing
end sub

sub dellink
	dim username
	username=hx.checkstr(request("username"),12)
	hx.execute("delete from tt_Link where username='"&username&"'")
	response.write "<p align=""center"">用户名为"& username & "的网站删除成功</p>"
	Call GoBack
end sub

sub init

 if request.cookies(hxCacheName&"_rank")("rank")>1 then
  	response.write "<script language='javascript'>"
	response.write "alert('您的级别不够!');"
	response.write "location.href='javascript:history.go(-1)';"			
	response.write "</script>"
   else
	dim username
	username=hx.checkstr(request("username"),12)
	if username="" then
		hx.execute("update tt_Link set inc=0,inj=0,inp=0,outc=0,outj=0,outp=0,fromdate=date(),indate=date(),outdate=date()")
		response.write "<p align=center>初始化完毕!所有数据已清零,从今天起开始重新统计!</p>"
	else
		hx.execute("update tt_Link set inc=0,inj=0,inp=0,outc=0,outj=0,outp=0,fromdate=date(),indate=date(),outdate=date() where username='"&username&"'")
		response.write "<p align=center>"&username&"的站点初始化完毕!所有数据已清零,从今天起开始重新统计!</p>"	
	end if
	Call GoBack
	 end if
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=hx.execute("select count(*) from tt_Link where fromdate<"&SqlNowString&"-"&daynum&" and inc<"&hitsnum)
	TotalCount=rs(0)
	set rs=nothing
	if TotalCount>0 then
		hx.execute("delete from tt_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=15
	if daynum<=3 then daynum=15	
	'开始删除	
	set rs=hx.execute("select count(*) from tt_Log where dateandtime<"&SqlNowString&"-"&daynum)
	TotalCount=rs(0)
	set rs=nothing
	if TotalCount>0 then
		hx.execute("delete from tt_Log where dateandtime<"&SqlNowString&"-"&daynum)	
		response.write "成功删除了" & TotalCount &"条记录"	
	else
		response.write "暂时没有符合删除条件的记录"
	end if
	Call GoBack
end sub

sub ShowLog
	dim rs,sql
	dim inout
	dim username
	dim strtitle
	username=hx.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
%>
<p align="center"><%=strtitle%></p>
<%
if username="" and inout="" then
set rs = hx.execute("select count(inout) from tt_Log where Datediff('d',dateandtime,date())=0 and inout=0")
response.write "<div align=center>今天总点入:" & rs(0)
set rs = nothing
set rs = hx.execute("select count(inout) from tt_Log where Datediff('d',dateandtime,date())=0 and inout=1")
response.write " 今天总点出:" & rs(0) & "</div>"
set rs = nothing
end if%>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
  <tr align="center" class="tr<%=skin%>"> 
  <%if username="" then response.write "<td width=""100"">用户名</td>"
if inout="" then response.write "<td width=""40"" align=center>状态</td>"
  %>
    <td width="100">时间</td>
    <td width="100">IP地址</td>
    <td>来源页面</td>
  </tr>
  <%
	set rs=server.createobject("adodb.recordset")
	sql="select * from tt_Log "&condition&" order by id desc"
	rs.open sql,conn,1,1
	if rs.eof then
		Response.write "<tr><td colspan=""3"" 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="tr<%=skin%>">
<%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><%="<a href='http://www.ip138.com/ips.asp?ip="&rs("ip")&"' title='查询此IP地址所在区域' target='_blank'>"&rs("ip")&"</a>"%></td>
    <td style="word-break:break-all;Width:fixed;"><%if trim(rs("come"))="" then
		  	response.write "无"
		  else
		  	response.write "<a href="""&rs("come")&""" target=""_blank"">"&rs("come")&"</a>"
		  end if%> </td>
  </tr>
  <%
		i=i+1
		rs.movenext
		loop
	end if
	set rs=nothing%>
</table>
<div class="cutpage">
<%hx.showPageInfo "tt_Log","id",condition,PageNo,MaxPageSize,linkstr%>
</div>
<%
Call GoBack
end sub

Sub ClearCache
	response.write "<p align=center>删除本系统缓存成功</p>"
	set hxcache=new cls_cache
	hxcache.DelCahe("js")
	set hxcache=nothing
	Call GoBack	
End Sub

Sub Summary
	dim rs
	dim TotalSite,TotalSite1,Totalinc,Totaloutc,Totalinj,Totaloutj
	TotalSite = hx.execute("select count(0) from tt_Link")(0)
	TotalSite1 = hx.execute("select count(0) from tt_Link where inc > 0")(0)
	set rs = hx.execute("select sum(inc),sum(outc) from tt_Link")
	Totalinc = rs(0)
	Totaloutc = rs(1)
	set rs =  nothing
	set rs = hx.execute("select sum(inj),sum(outj) from tt_Link")
	Totalinj = rs(0)
	Totaloutj = rs(1)
	set rs =  nothing
	response.write "<p>总有网站:"&TotalSite
	response.write "<br>有效网站:"&TotalSite1 & "(有产生过点入次数的网站)"
	response.write "<br>总计点入:"&Totalinc
	response.write "<br>总计点出:"&Totaloutc
	response.write "<br>今天点入:"&Totalinj
	response.write "<br>今天点出:"&Totaloutj			
	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 hx=nothing%>

⌨️ 快捷键说明

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