<%@ page language="C#" autoeventwireup="true" inherits="admin_class_search, 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>内容页面</title>
<link href="/admin/common/client.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="contentlist.js" charset="utf-8"></script>
<!--#include file="keydensity.inc" -->
</head>
<body class="mg3" onload="LoadBody()">
<div>

<form method="get" id="frmsearch" name="frmsearch" runat="server"  action="" style="margin-bottom:5px;">
<input type="hidden" name="search" id="search" />
<select name="selall" id="selall" runat="server"  >
	<option value="  ">全部内容</option>
	<option value="and C_Status=0 ">草稿文章</option>
	<option value="and C_Status=1 ">发布文章</option>
	<option value="and C_Status=2 ">推荐文章</option>
	<option value="and C_title like '%@key@%' ">标题包含</option>
</select>
<input type="text" class="inputbox2" runat="server" name="keys" size="20" id="keys" style="display:none;" />
<input type='button' value='搜索'  onclick="CheckData()" class='button'>
&nbsp;<span><a href="allclass.aspx?ord=c_id desc">全部分类</a>&nbsp;</span>
</form>

</div>

<%
	string s_para="search.aspx?where="+Server.UrlPathEncode(Para("search"))+"&keys="+Server.UrlEncode(Para("keys"))+"&ord=";
	s_para=s_para.Replace("'","%27");
	PageContent.ImagePageBar=true;
	PageContent.Table ="User_Content";
	PageContent.Url = ""+s_para+"" + Para("ord") + "&pn=@pagenumber@";
	PageContent.SQL="select C_Density as _density_showhtml,len(C_Content) as clen,C_ID,C_Url,C_Title,C_Click,C_Update,C_status,C_CID,C_Type,C_Repeat,C_CID,C_RepMd5 from User_Content  where c_index<>2 " +Para("search");
	PageContent.PageBody("@@Const.PageTable()@@","@@Const.PageBar(\" ##Const.AddButton('contentitem.aspx?toclass=1&cid=0&Ord=" + Para("ord") + "')## ##Const.DeleteButton()## <input type='button' value='移动'  onclick='MoveItem()' class='button'> <img id='imgall' onclick='ShowAllDesity()' src='/admin/images/plusBox.gif' />关键词密度 \")@@","<tr>@content@</tr>","<tr id='tr_@c_id@'>@content@</tr>");
	PageContent.Action="";//本页处理
	PageContent.AddList("@@Const.RowToggleAll()@@","@@Const.RowToggleItem('@C_ID@')@@");
	PageContent.AddList("<td>编号</td>","<td>@ItemNumber@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_CID','"+Para("ord")+"','所在分类')@@","<td>@CName@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_ID','" + Para("ord") + "','ID')@@", "<td>@C_ID@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_Type','" + Para("ord") + "','页面类型')@@", "<td>@@Csharp.GetSelectValue('@C_Type@','##Const.ContentType()##')@@</td>");
  PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_Title','" + Para("ord") + "','标题')@@", "<td>@C_Title@</td>");
  PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_Url','" + Para("ord") + "','页面地址')@@","<td><a target='_blank' href='@C_Url@'>@C_Url@</a></td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_Update','"+Para("ord")+"','更新时间')@@","<td>@C_Update@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_Click','" + Para("ord") + "','查看次数')@@","<td>@C_Click@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_status','" + Para("ord") + "','文件状态')@@","<td>@@Csharp.GetSelectValue('@C_status@','<span class=\"red\">草稿文章</span>,<span class=\"green\">发布文章</span>,<span class=\"blue\">推荐文章</span>,锁定文章')@@</td>");
	PageContent.AddList("<td >关键词密度</td>","<td>@@Csharp.GetKeyDensity(\"@c_id@\",\"@_density_showhtml@\")@@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','len(C_Content)','" + Para("ord") + "','文件大小')@@","<td>@clen@</td>");
	PageContent.AddList("@@Const.PageOrderField('"+s_para+"','C_Repeat','" + Para("ord") + "','重复')@@", "<td>@@Csharp.GetSelectValue('@C_Repeat@',' ,<a href=\"javascript:GetRepeat(&#34;@C_RepMd5@&#34;)\">重复</a>')@@</td>");
	
	PageContent.AddList("<td >&nbsp;</td>","<td><a  href='contentitem.aspx?id=@c_id@&cid=@C_CID@' class='edit'>编辑</a></td>");
%>
<uc1:pageContent ID="PageContent" runat="server" />
<!--#include file="../../common/popwindow.inc" -->
<script type="text/javascript" >
 var s_cid="0";
function CheckData()
{
	var s_where=$('selall').value.replace('@key@',$('keys').value);
	$('search').value=s_where;
	
	$('frmsearch').submit();
}

$('selall').onchange=function (){
 ShowKeys();
}

function ShowKeys()
{
//禁用某些字段显示
 $('keys').style.display="none";
 
 if($('selall').selectedIndex ==4)
 {
 	$('keys').style.display="";
 }
}
ShowKeys();
</script>
</body>
</html>      

