<!--#include file="../Ku_inc/Ku_sql.asp"-->
<!--#include file="../Ku_inc/Ku_config.asp"-->
<!--#include file="Ku_conn.asp"-->
<!--#include file="../Ku_inc/Ku_md5.asp"-->
<!--#include file="../Ku_inc/inc.asp"-->
<!-- #include file="Session.asp"-->
<html>
<head>
<title>评论内容列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="include/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
input{
	height:22px;
	border:1px solid #BEBEBE;
	background-color:#FFF;
	padding-top: 2px;
	padding-right: 8px;
	padding-bottom: 0pt;
	padding-left: 3px;
}
-->
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
function checkall(form)
{
for (var i=0;i<form.elements.length;i++)    {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked; 
}
}
</script>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  <td height="30" style="border: 1px solid #D0D4D9" bgcolor="#EEEEEE"><b>　当前栏目：&gt; </b>新闻评论管理</td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td width="42%">
        <input class="input_back" type="button" name="Submit0" value="新闻列表"onclick="location.href='news_list.asp'"/>  
      <input class="input_back" type="button" name="Submit" value="新闻分类/添加新闻"onclick="location.href='news_kind.asp'"/>      
	<input class="input_back" type="button" name="Submit0" value="管理首页"onclick="location.href='main.asp'"/></td>
<form method="post" action="?" name="myKeyword">
    <td width="57%">
    <div align="right">搜索：
        <input name="myKeyword" type="text" id="myKeyword" value="" style="WIDTH:30%" maxlength="50">
        <input type="submit" name="Submit" value="搜索(S)" class="input_back">
    </div>
    </td>
    </form>
  </tr>

<form action="deal_news.asp?action=scpinglun" method=post name="thisform">
<tr>
<td colspan="2"><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="cecfce">
<tr>
<td width="30" bgcolor="e7ebef" style="font-weight: bold"><div align="center">操作</div></td>  
<td height="25" bgcolor="e7ebef" style="font-weight: bold">标题</td>
<td width="125" bgcolor="e7ebef" style="font-weight: bold"><div align="center">
	所属新闻</div></td>
<td width="125" bgcolor="e7ebef" style="font-weight: bold"><div align="center">日期</div></td>

<%
	set rs=server.createobject("adodb.recordset")
	sql="select * from ku_pnews where 1=1 "
	
	if not (Trim(Request("pageID"))="" or isempty(Trim(Request("pageID"))) ) then
		sql=sql&" and pageID="&clng(Request("pageID"))&""
	end if

	if not (Trim(Request("myKeyword"))="" or isempty(Trim(Request("myKeyword"))) ) then
		sql=sql&" and content like  '%" & Trim(Request("myKeyword")) & "%'"
	end if
	
	sql=sql&" order by addtime desc"
	'response.write sql
	'response.End
	rs.open sql,conn,1,1
	
	dim a
	Set a=New PageList
	listLimit=15
	'模拟分页一页显示分页数
	pageLists=5
	'设置分页参数

If rs.BOF or rs.EOF Then 
%>
</tr>
<tr bgcolor="#C6E3F4">
  <td height="28" colspan="6" align="center" bgcolor="#FFFFFF">暂无评论！</td>
  </tr>
<%
else

'分页循环开始
totalList=rs.recordcount
a.InitPara=array(totalList,listLimit,pageLists)
a.PageList()
rs.pagesize=listLimit
page = request("page")
If page="" Then
	page=1
End If
rs.absolutepage = page
for i=1 to rs.pagesize
%>
<tr bgcolor="#ffffff" onMouseOver='this.style.backgroundColor="#F6f6f6"' 
onMouseOut='this.style.backgroundColor="#FAFAFA"'>
<td height="28" align="center"><input type="checkbox" name="ID" value="<%=Trim(rs("ID"))%>"></td>
<td><%=Trim(rs("content"))%>  </td>
<%
cid=rs("newsid")
set kurs=server.createobject("adodb.recordset")
    csql="select * from ku_news where id="&cid
    kurs.open csql,conn,1,3
%>
<% do while not kurs.eof%>
<td align="center"><a href="../Ku_shownews.asp?id=<%=kurs("id")%>" target=_blank><%=kurs("title")%></a></td>

<td align="center"><%=Trim(rs("addtime"))%></td>


<%
   kurs.movenext
   loop
   kurs.close
   
%>	
</tr>
<%
rs.movenext
if rs.eof then exit for
next

end if
%>
</table></td>
  </tr>
  <tr>
    <td colspan="2"><div align="right">
          <input type=checkbox name=chkall value=on onClick="checkall(this.form)">全部选中<input type=submit name=action onClick="{if(confirm('确定删除选定的纪录吗?')){this.document.thisform.submit();return true;}return false;}" value="批量删除(D)" class="input_back">
    </div></td>
  </tr>
  <tr>
    <td colspan="2"><%=a.PageInfo%></td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr>
 </form>
</table>
<%
rs.close
set rs=nohing
%>
<hr/>
<br>

<p align="center"><!-- #include file="Ku_bottom.asp"--></p>
</body>
</html>