<%@ page language="C#" autoeventwireup="true" inherits="admin_seo_seolist, 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>
<title>SEO页面</title>
<link href="/admin/common/client.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" >

</script>
</head>
<body class="mg3">
<%
	string s_name="";
	PageContent.ImagePageBar=true;
  PageContent.Table="sys_seo";
	PageContent.Url = "seolist.aspx?type="+Para("Type")+"&ord=" + Para("ord") + "&pn=@pagenumber@";
	
	
	
	if(Para("type")=="1")
	{
		s_name="关键词";
	}
	else
	{
		s_name="域名";
		
	}
	
	
	if(Para("sid")=="")
	{
		//全部关键词 和
		PageContent.SQL=" select S_ID,S_Name,D_Date,D_Baidu as _baidu_showhtml,D_Google  as _google_showhtml,D_Yahoo as _yahoo_showhtml,D_Memo as _memo_50 from sys_seo left join (select D_Date,D_Baidu,D_Google,D_Yahoo,D_Memo ,d_sid from Sys_SEOData where D_Date='"+DateTime.Now.ToString("yyyy-MM-dd")+"') as seodata on sys_seo.s_id=SEOData.d_sid  where sys_seo.S_Type="+Para("Type");
		PageContent.SQLCount="select count(*) as cnt from  sys_seo where S_Type="+Para("Type");
		PageContent.PageBody("@@Const.PageTable()@@","@@Const.PageBar(\"##Const.AddButton('seoitem.aspx?type="+Para("Type")+"&ord=" + Para("ord") + "')## ##Const.DeleteButton()##  　提示：不要增加过多的数据，将导致ＩＰ被封。	\")@@","<tr id='trhead'>@content@</tr>","<tr id='tr_@s_id@'>@content@</tr>");
		PageContent.Action="";//本页处理
		
		PageContent.AddList("@@Const.RowToggleAll()@@","@@Const.RowToggleItem('@S_ID@')@@");
		PageContent.AddList("<td>编号</td>","<td>@ItemNumber@</td>");
		PageContent.AddList("@@Const.PageOrderField('seolist.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&ord=','S_Name','" + Para("ord") + "','"+s_name+"')@@", "<td><a target='main' href='seolist.aspx?sid=@s_id@&Type="+Para("Type")+"&ord=D_Date desc'>@S_Name@</a></td>");
		
	}
	else
	{
		//自动增加 每天的数据
		PageContent.PageBody("@@Const.PageTable()@@","@@Const.PageBar(\" <input type='button' onclick='BackUrl()' value='返回' class='button' /> \")@@","<tr id='trhead'>@content@</tr>","<tr id='tr_@s_id@'>@content@</tr>");
	 
		PageContent.SQL=" select S_ID,S_Name,D_ID,D_Date,D_Baidu as _baidu_showhtml,D_Google as _google_showhtml,D_Yahoo as _yahoo_showhtml,D_Memo as _memo_50 from sys_seo left join (select D_ID,D_Date,D_Baidu,D_Google,D_Yahoo,D_Memo ,d_sid from Sys_SEOData) as seodata on sys_seo.s_id=SEOData.d_sid  where sys_seo.s_id="+Para("sid")+" and sys_seo.S_Type="+Para("Type");
		PageContent.SQLCount="select count(*) as cnt from  sys_seo where	s_id="+Para("sid")+" and S_Type="+Para("Type");
		PageContent.AddList("<td>编号</td>","<td>@ItemNumber@</td>");
		PageContent.AddList("<td>"+s_name+"</td>", "<td>@S_Name@</td>");
		
	}
	
	
	PageContent.AddList("@@Const.PageOrderField('seolist.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&ord=','D_Date','"+Para("ord")+"','日期')@@","<td>@D_Date@</td>");
  PageContent.AddList("@@Const.PageOrderField('seolist.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&ord=','D_Baidu','"+Para("ord")+"','百度')@@","<td>@_baidu_showhtml@</td>");
	PageContent.AddList("@@Const.PageOrderField('seolist.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&ord=','D_Google','"+Para("ord")+"','Google')@@","<td>@_google_showhtml@</td>");
	PageContent.AddList("@@Const.PageOrderField('seolist.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&ord=','D_Yahoo','"+Para("ord")+"','雅虎')@@","<td>@_yahoo_showhtml@</td>");
	
	PageContent.AddList("<td width='200'>备注</td>","<td>@_memo_50@</td>");
	if(Para("sid")=="")
	{
		PageContent.AddList("<td></td>","<td><a target='main' href='seoitem.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&id=@s_id@' class='edit'>编辑</a></td>");
	}
	else
	{
		PageContent.AddList("<td></td>","<td><a target='main' href='seodataitem.aspx?sid="+Para("sid")+"&type="+Para("Type")+"&id=@d_id@' class='edit'>编辑</a></td>");
	}	
	
%>

<uc1:pageContent ID="PageContent" runat="server" />
<script type='text/javascript'>
var s_tip="当前分类：SEO管理 > ";

<%if(Para("sid")!=""){%>
	<%if(Para("type")=="0"){%>
	  s_tip+="<a href='/admin/seo/seolist.aspx?type=0' target='main'>网站收录管理</a>";
	<%}else{%>
		s_tip+="<a href='/admin/seo/seolist.aspx?type=1' target='main'>关键词排名管理</a>";
	<%}%>	
	s_tip+=" > <%=GetName()%>";
	
<%}else{%>
	<%if(Para("type")=="0"){%>
		 s_tip+=" 网站收录管理";
	<%}else{%>
		s_tip+=" 关键词排名管理";
	<%}%>		
<%}%>	
parent.frames["navtip"].document.getElementById("divnav").innerHTML=s_tip;
function BackUrl()
{
	location.href="/admin/seo/seolist.aspx?type=<%=Para("type")%>";
}
</script>
</body>
</html>   
