<!--#include file="Include/SiteConfig.asp" -->
<% 
	Dim System_Admin_Password,Admin_Password,System_In,SpiderName,SortRules,SortMode,Request_Server_Name,DoAction,Txcomcom_Id,Pageurl
	System_Admin_Password = "123123" '登录验证  密码在这里改 下次更新如果有时间 就更换成数据库操作的//Greatidc.com
	Admin_Password=  trim(request("Admin_Password"))
	SpiderName=  trim(request("SpiderName"))
	SortRules=  trim(request("SortRules"))
	SortMode= trim(request("SortMode"))
	DoAction = trim(request("DoAction"))
	Txcomcom_Id = trim(request("Txcomcom_Id"))
	Request_Server_Name=Request.ServerVariables("SERVER_NAME")
	If SortRules="" Then SortRules="desc"
	If SortMode="" Then SortMode="Txcomcom_Id"
	Pageurl="SpiderName="&SpiderName&"&SortMode="&SortMode&"&SortRules="&SortRules
	'清空数据库操作
	   If DoAction ="UserLogin" Then
			if System_Admin_Password =  Admin_Password then
		    session("Admin_Password")=Admin_Password
			session("System_In")="yes"
			response.write"<SCRIPT language=JavaScript>alert('登录成功！非管理员勿入！');"
			response.write"location.href='" & SysRootDir & "'</SCRIPT>"
			else
			response.write"<SCRIPT language=JavaScript>alert('登录失败！');"
			response.write"location.href='" & SysRootDir & "'</SCRIPT>"
			end if
	   End If


if session("System_In")="yes" then
          If DoAction ="UserLogout" Then
	      session("Admin_Password")=""
		  session("System_In")=""
		  response.write"<SCRIPT language=JavaScript>alert('退出成功！');"
		  response.write"location.href='" & SysRootDir & "'</SCRIPT>"
		  end if
		   If DoAction ="Delete" Then
		   set TxcomcomRs=TxcomcomConn.Execute("delete * from Bot_main where Txcomcom_Id in ("&Txcomcom_Id&")")
		   Response.Write("<script>alert(""删除成功！"");location.href="""&SysRootDir&""";</script>")
		   End If
		   If DoAction ="delup" Then
		   set TxcomcomRs=TxcomcomConn.Execute("delete * from Bot_main ")
		   Response.Write("<script>alert(""清空成功！"");location.href="""&SysRootDir&""";</script>")
		   End If
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>发布站蜘蛛爬行统计系统 V2.0 Powered By Txcomcom.com</title>
<META NAME="Author" CONTENT="Txcomcom.com,GreatIdc.com,桐乡发布站">
<meta name="keywords" content="Baidu蜘蛛,Yahoo蜘蛛,Google蜘蛛,MSN蜘蛛,Alexa蜘蛛,Sogou蜘蛛,AOL蜘蛛,Iask蜘蛛,Google蜘蛛 Adsense蜘蛛,其它蜘蛛" />
<meta name="description" content="Baidu蜘蛛,Yahoo蜘蛛,Google蜘蛛,MSN蜘蛛,Alexa蜘蛛,Sogou蜘蛛,AOL蜘蛛,Iask蜘蛛,Google蜘蛛 Adsense蜘蛛,其它蜘蛛爬行本站的统计数据" />
<link href="Style/Common.css" rel="stylesheet" type="text/css">
<script src="Js/Function.js" type="text/javascript"></script>
</head>
<body>
<% if session("System_In")=""  then %>
<div class="topnotlogin">
<form action="?DoAction=UserLogin" method="post" id="UserLogin">
密 码 : <input type="password" size="20" name="Admin_Password" >
&nbsp;&nbsp;<input name="submitlogin" type="submit" id="submitlogin" value="登录"></form>
</div>
<% else if session("System_In")="yes" then %>
<div class="toplogin">
管理员您好,您已经登录成功.  点这里退出-> <a  href="?DoAction=UserLogout">退出</a>

</div>

<form action="?" method=post name=form id=form >
<div class="toplogin">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="5">
  <tr><td width="83%" align="left">　搜索：<label>
  <input name="SpiderName" type="text" id="SpiderName" value="<%= SpiderName %>" size="40" maxlength="200">
  </label>
  <label>
  <input type="submit" name="Submit2" value="提交">	
  </label>&nbsp;<a href="?">查看所有</a>&nbsp;
  
<%
TxcomcomSql="Select Distinct  Txcomcom_Bot from Bot_main  "
TxcomcomRs.open TxcomcomSql,TxcomcomConn,1,3
do while not TxcomcomRs.eof
%>
  
&nbsp;<a href="?SpiderName=<%=TxcomcomRs("Txcomcom_Bot")%>"><%=TxcomcomRs("Txcomcom_Bot")%></a> &nbsp;
<%
TxcomcomRs.MoveNext
loop
TxcomcomRs.Close
Set TxcomcomRs = Nothing
%>
  </td>
      <td width="17%" align="center"><a href="?DoAction=delup" onClick="javascript:return   window.confirm('您确定要删除吗？！清空所有记录，谨慎操作');">清空所有记录，谨慎操作</a></td>
    </tr>
  </table>
  
</div>
  <br>
  <table width="95%" border="0" align="center" cellpadding="5" cellspacing="0" bgColor="#f7f7f7">
 <tr class="header">
   <td width="7%" height="30"><div align="center"><a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Id&SortRules=asc">▲</a> ID <a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Id&SortRules=desc">▼</a></div></td>
   <td width="10%"><div align="center"><a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Bot&SortRules=asc">▲</a> 蜘蛛 <a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Bot&SortRules=desc">▼</a></div></td>
   <td width="13%"><div align="center"><a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Ip&SortRules=asc">▲</a> 蜘蛛IP <a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Ip&SortRules=desc">▼</a></div></td>
   <td width="15%"><div align="center"><a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Visitime&SortRules=asc">▲</a> 来访时间 <a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Visitime&SortRules=desc">▼</a></div></td>
   <td><div align="center"><a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Url&SortRules=asc">▲</a> 页面URL <a href="?SpiderName=<%=SpiderName%>&SortMode=Txcomcom_Url&SortRules=desc">▼</a></div></td>
   <td width="10%" align="center">
   <input id=chkAll  onclick=CheckAll(this.form) type=checkbox   value=checkbox name=chkAll>
   <input title=删除 onclick=DelAll() type=button value=删除 name=Submit class="inputs" /></td>
 </tr> 
</table>

<table  bgcolor="#EAEAEA" width="95%" border="0" align="center" cellpadding="5" cellspacing="1">
 <%
Const MaxperPage=40
Dim TotalPut   
Dim CurrentPage
Dim TotalPages
Dim j
Dim TxcomcomSql
If Not isempty(request.QueryString("page")) Then
CurrentPage=Cint(request.QueryString("page"))
Else
CurrentPage=1
end If 	
Set TxcomcomRs = server.CreateObject("adodb.recordset")	
TxcomcomSql="select * from Bot_main "
If SpiderName<>"" Then TxcomcomSql=TxcomcomSql&"where  Txcomcom_Bot='"&SpiderName&"'  or Txcomcom_Url like '%"&SpiderName&"%' or Txcomcom_Ip='"&SpiderName&"'"
If SortMode<>"" Then TxcomcomSql=TxcomcomSql&"order by "&SortMode&" "&SortRules&""
TxcomcomRs.open TxcomcomSql,TxcomcomConn,1,1
If TxcomcomRs.eof and TxcomcomRs.bof Then
response.Write(" <div align=center><br><br><br><br><br><br><br>没有连接,第一次安装,请多等几天就会有访问记录了(你的站有蜘蛛访问的情况下)<br><br><br><br><br><br></div> ")
Else
	  				TotalPut=TxcomcomRs.recordcount

      				If CurrentPage<1 Then
          				CurrentPage=1
      				end If

      				If (CurrentPage-1)*MaxperPage>TotalPut Then
	   					If (TotalPut mod MaxperPage)=0 Then
	     					CurrentPage= TotalPut \ MaxperPage
	   					Else
	      					CurrentPage= TotalPut \ MaxperPage + 1
	   					end If
      				end If

       				If CurrentPage=1 Then
            			ShowContent
            			ShowPage TotalPut,MaxperPage,"?"&Pageurl
       				Else
If (CurrentPage-1)*MaxperPage<TotalPut Then
TxcomcomRs.Move  (CurrentPage-1)*MaxperPage
Dim BookMarkS
BookMarkS=TxcomcomRs.BookMarkS
ShowContent
ShowPage TotalPut,MaxperPage,"?"&Pageurl
Else
CurrentPage=1
ShowContent
ShowPage TotalPut,MaxperPage,"?"&Pageurl
end If
end If
end If
sub ShowContent
Dim i
i=0
%>  
<%do while not TxcomcomRs.eof%>
<%
Dim a
If TxcomcomRs("Txcomcom_Bot")="Google" Then
   a="#FF0000"
   Else 
       If TxcomcomRs("Txcomcom_Bot")="Baidu" Then
		  a="#0000FF"
		   Else 
		      If TxcomcomRs("Txcomcom_Bot")="Yahoo!" Then
			     a="#ff9966"
			   Else
			       a="#000000"
			end If
	   end If
end If				
   
%>

 <tr>
   <td width="7%" align="center" bgcolor="#FFFFFF"><%=TxcomcomRs("Txcomcom_Id")%></td>
   <td width="10%" align="center" bgcolor="#FFFFFF"><a href="?SpiderName=<%=TxcomcomRs("Txcomcom_Bot")%>"><font color="<%=a%>"><%=TxcomcomRs("Txcomcom_Bot")%></font></a></td>
   <td width="13%" align="center" bgcolor="#FFFFFF"><a href="?SpiderName=<%=TxcomcomRs("Txcomcom_Ip")%>"><%=TxcomcomRs("Txcomcom_Ip")%></a></td>
   <td width="15%" align="center" bgcolor="#FFFFFF"><%=TxcomcomRs("Txcomcom_Visitime")%></td>
   <td bgcolor="#FFFFFF"><a href="?SpiderName=<%=TxcomcomRs("Txcomcom_Url")%>"><%=TxcomcomRs("Txcomcom_Url")%></a> <a href="<%=TxcomcomRs("Txcomcom_Url")%>" target="_blank">访问</a></td>
   <td width="10%" align="center" bgcolor="#FFFFFF"><input type="checkbox" name="Txcomcom_Id" value="<%=TxcomcomRs("Txcomcom_Id")%>" onclick=Checked(form)></td>
 </tr>
 
<%
i=i+1
If i>=MaxperPage Then Exit Do
TxcomcomRs.MoveNext
loop
TxcomcomRs.Close
Set TxcomcomRs=NoThing
%>
         
</table>

</form>
<tr>
        <td height="30" colspan="3" bgcolor="#FAFCFE"><br><div class="scott" align="center">
          <%  
				End Sub   
  
				Function ShowPage(TotalNumber,MaxperPage,FileName)  
  				Dim n
  				
				If TotalNumber Mod MaxperPage=0 Then  
					n= TotalNumber \ MaxperPage  
				Else
					n= TotalNumber \ MaxperPage+1  
				End If
				
				Response.Write "<p align='center' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首 页 上一页</font> "  
				Else  
					Response.Write "<a href="&FileName&"&page=1 class='contents'>首 页</a> "  
					Response.Write "<a href="&FileName&"&page="&CurrentPage-1&" class='contents'>上一页</a> "  
				End If
				
				If n-CurrentPage<1 Then  
					Response.Write "<font class='contents'>下一页 末 页</font>"  
				Else  
					Response.Write "<a href="&FileName&"&page="&(CurrentPage+1)&" class='contents'>"  
					Response.Write "下一页</a> <a href="&FileName&"&page="&n&" class='contents'>末 页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次：</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&TotalNumber&"个信息 " 
				End Function  
			%>
        </div></td>
</tr>

<%
else 
response.write"<SCRIPT language=JavaScript>alert('非请莫入 谢谢！');"
response.write"location.href='" & SysRootDir & "'</SCRIPT>"
end if
end if
set TxcomcomRs=TxcomcomConn.Execute("Select * from  Bot_Introduce ")
Response.Write(TxcomcomRs("In_Content"))
TxcomcomRs.Close
Set TxcomcomRs = Nothing
%>

</body>
</html>
