<%@ page language="C#" autoeventwireup="true" inherits="admin_seo_spiderlist, localhost_deploy" %>

<%@ Register Src="../../common/pageContent.ascx" TagName="pageContent" TagPrefix="uc1" %>
<!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  runat="server">
<title>蜘蛛页面</title>
<link href="/admin/common/client.css" rel="stylesheet" type="text/css" />

</head>
<body class="mg3">
<%
	//详细列表
	PageContent.ImagePageBar=true;
  PageContent.Table="Sys_SpiderData";
	PageContent.Url = "spiderlist.aspx?"+GetParameter()+"&ord=" + Para("ord") + "&pn=@pagenumber@";
	PageContent.PageBody("@@Const.PageTable()@@","@@Const.PageBar(\"\")@@","<tr id='trhead'>@content@</tr>","<tr id='tr_@D_ID@'>@content@</tr>");
	PageContent.AddList("<td>编号</td>","<td>@ItemNumber@</td>");
	
	switch(Para("type"))
	{
		case "0": //详细记录
		{
			//0 详细记录
			PageContent.SQL=" select D_IP,D_Url,D_Time,D_Mechod,S_Description from Sys_SpiderData,Sys_Spider where D_SID=S_ID and " +GetWhere().Replace("'","#") ;
		  PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','S_Description','" + Para("ord") + "','蜘蛛')@@", "<td>@S_Description@</td>");
			PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','D_IP','"+Para("ord")+"','蜘蛛地址')@@","<td>@D_IP@</td>");
			PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','D_Url','"+Para("ord")+"','路径')@@","<td><a target='_blank' href='@d_url@'>@d_url@</a></td>");
			PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','D_Time','"+Para("ord")+"','时间')@@","<td>@D_Time@</td>");
			PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','D_Mechod','"+Para("ord")+"','方式')@@","<td>@D_Mechod@</td>");
	
			break;
		}
		case "1": //文件组记录 
		{
		PageContent.SQL=" select S_Description,d_url,count(*) as cnt from Sys_SpiderData,Sys_Spider where D_SID=S_ID and " +GetWhere().Replace("'","#")+" group by d_url,S_Description ";
	  PageContent.SQLCount="select count(*) as cnt from (select S_Description,d_url from Sys_SpiderData,Sys_Spider where D_SID=S_ID and " +GetWhere().Replace("'","#")+" group by d_url,S_Description) a  ";
		PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','S_Description','" + Para("ord") + "','蜘蛛')@@", "<td>@S_Description@</td>");
		PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','d_url','" + Para("ord") + "','路径')@@", "<td><a target='_blank' href='@d_url@'>@d_url@</a></td>");
		PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','count(*)','" + Para("ord") + "','搜索量')@@", "<td>@cnt@</td>");

			break;
		}
		case "2": //蜘蛛组记录
		{
		PageContent.SQL=" select S_Description,count(*) as cnt from Sys_SpiderData,Sys_Spider where D_SID=S_ID and " +GetWhere().Replace("'","#")+" group by S_Description ";
	  PageContent.SQLCount="select count(*) as cnt from (select S_Description from Sys_SpiderData,Sys_Spider where D_SID=S_ID and " +GetWhere().Replace("'","#")+" group by S_Description) a  ";
		PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','S_Description','" + Para("ord") + "','蜘蛛')@@", "<td>@S_Description@</td>");
		PageContent.AddList("@@Const.PageOrderField('spiderlist.aspx?"+GetParameter() + "&ord=','count(*)','" + Para("ord") + "','搜索量')@@", "<td>@cnt@</td>");

			break;
		}
	}

%>
<uc1:pageContent ID="PageContent" runat="server" />
<script type="text/javascript" >

</script>
</body>
</html>   
