<!--#include file="conn.asp"-->
<!--#include file="denlu.asp"-->
<%
if request("Submit2")="ok" and request("delbox")<>"" then
	conn.execute "delete from xinwen where id in ("&request("delbox")&")"
end if
%>

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet type="text/css" href="js/media.css">
<link rel=stylesheet type="text/css" href="js/form_media.css">
<script language="JavaScript" src="js/whir.js"></script>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style3 {color: #4e6a82}
-->
</style>
</head>
<script language=javascript>
function CheckAll(form)
  {
  for (var i=0;i<form1.elements.length;i++)
    {
    var e = form1.elements[i];
    if (e.name != 'chkall')
       e.checked = form1.chkall.checked;
    }
  }
</script>	
<script language="javascript">
function fy(){
if (isNaN(document.fanye.topage.value)){
alert("请输入数字！")
document.fanye.topage.focus()
return false
}
}
</script>

<body text="#000000" leftmargin="0" topmargin="5">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" height="25">
  <tr> 
    <td width="701" height="20" valign="middle"><font color="#FF0000">当前位置：信息发布系统 -&gt; <%=request("nbmc")%></font><br>
</td>
  </tr>
</table>

<form action="xinwen.asp" method="post" name="form2">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr align="center">
  
      <td width="65%" height="20" align="center"> <div align="right">标题：
          <input name="title" type="text" class="text" id="title" value="<%=request("title")%>" size="25">
        发布日期：
        <input name="fbtime" type="text" class="text" id="fbtime" value="<%=request("fbtime")%>" size="10" onfocus="setday(this)">
        <input type="hidden" value="eee" name="Submit">
        <input type="hidden" value="<%=request("nbmc")%>" name="nbmc">
		<input type="hidden" value="<%=request("nb")%>" name="nb">
      </div></td>
      <td width="35%" align="center"><div align="left">
        &nbsp;
        <input name="image" type="image" src="images/shousuo.gif" width="72" height="21">
      </div></td>

  </tr>
</table> 
</form>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
      <td height="1" bgcolor="#4E6A82"></td>
  </tr>
 <form action="xinwen.asp" method="post" name="form1">
    <tr> 
      <td height="35" valign="bottom"> 
        <input type="hidden" name="Submit2">
		<input type="hidden" name="nb" value="<%=request("nb")%>">
        <input type="hidden" name="nbmc" value="<%=request("nbmc")%>">
		<input type="hidden" name="topage" <%if request("topage")<>"" then%>value="<%=request("topage")%>"<%else%>value="1"<%end if%>>
		<input type="image" src="images/del.gif" width="72" height="21" onclick="javascript:if(window.confirm('您确实要删除吗？')) window.form1.Submit2.value='ok'">
        &nbsp;<a href="addxinwen.asp?nbmc=<%=request("nbmc")%>&nb=<%=request("nb")%>"><img src="images/add.gif" width="72" height="21" border="0"></a>
      </td>
    </tr>
    <tr> 
      <td width="100%" align="center" valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="1" bordercolordark="#ffffff">
          <tr bgcolor="177B2F">
            <td width="6%" align="center">&nbsp;</td> 
            <td width="7%" height="23" align="center"><font color="#FFFFFF">序号</font></td>
            <td width="53%" height="23" align="center"><font color="#FFFFFF">标题</font></td>
            <td width="13%" height="23" align="center"><FONT COLOR="#FFFFFF">发布日期</FONT></td>
            <td width="11%" align="center"><span class="style1">点击率</span></td>
            <td height="23" colspan="2" align="center"><font color="#FFFFFF">相关操作</font></td>
          </tr>
          <%
set rs=server.createobject("adodb.recordset")
if request("Submit")<>"" then
	title=request("title")
	fbtime=request("fbtime")
	
	if title<>"" then
	  aa=aa+" and title like '%"&title&"%'"
	end if
	if fbtime<>"" then
	  aa=aa+" and cdate(fbtime) = '"&cdate(fbtime)&"'"
	end if
  rs.open "select * from xinwen where nbmc='"&request("nbmc")&"'"+aa+" order by cdate(fbtime) desc,id desc",conn,3
else
  rs.open "select * from xinwen where nbmc='"&request("nbmc")&"' order by cdate(fbtime) desc,id desc",conn,3
end if
%>
          <% if rs.bof and rs.eof then %>
          <tr bgcolor="#F6F6F6"> 
            <td height="22" colspan="12" align=center>数据库里还没有数据!</td>
          </tr>
          <% else %>
          <%
if request("topage")="" then
topage=1
end if
rs.pagesize=15
if not isempty(request("topage")) then
topage=clng(request("topage"))
if topage>rs.pagecount then
rs.absolutepage=rs.pagecount
elseif topage<=0 then
rs.absolutepage=1
else
rs.absolutepage=topage
end if
end if
intcurpage=rs.absolutepage
%>

      <%
				for i=1 to rs.pagesize
                if rs.eof then
				exit for
				end if
				%>
          <tr bgcolor="#F6F6F6" onmouseover="this.bgColor='#e6e6e6';" onmouseout="this.bgColor='#F6F6F6';">
            <td align="center"><input type="checkbox" name="delbox" value="<%=rs("id")%>"></td> 
            <td height="22" align="center"><%=i+(topage-1)*(rs.pagesize)%></td>
            <td>&nbsp;<%=rs("title")%></td>
            <td height="22" align="center"><%=rs("fbtime")%></td>
            <td height="22" align="center"><%=rs("dian")%></td>
            <td width="10%" height="22" align="center"><a href="xinwen_modi.asp?id=<%=rs("id")%>&topage=<%=intcurpage%>&nbmc=<%=request("nbmc")%>&nb=<%=request("nb")%>">修改</a></td>
         

          </tr>
          <%
				  rs.movenext
				  next
				  end if

		  %>

        </table></td>
    </tr>
    <tr> 
      <td width="100%" height="30">　　 
        <input type="checkbox" name="chkall" value="on" onclick="CheckAll(this.form)"> 
        <span class="style3">全部选中</span> </td>
    </tr>
  </form>
</table>
<%if intcurpage<>0 then%>
<table width="98%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
  <form action="xinwen.asp" method="post" name="fanye" onsubmit="return(fy())">
    <tr> 
      <td height="26" align="right">目前在第<%=intcurpage %>页，共有<%=rs.pagecount%>页,共有<%=rs.recordcount%>条记录　
      <%if intcurpage<>1 then%>
          <a href="xinwen.asp?topage=<%=1%>&nbmc=<%=request("nbmc")%>&nb=<%=request("nb")%>&title=<%=request("title")%>&fbtime=<%=request("fbtime")%>&Submit=eee">第一页</a> <a href="xinwen.asp?topage=<%=intcurpage-1%>&nbmc=<%=request("nbmc")%>&nb=<%=request("nb")%>&title=<%=request("title")%>&fbtime=<%=request("fbtime")%>&Submit=eee">上一页</a> 
        <%
		end if
		if intcurpage<>rs.pagecount then
		%>
          <a href="xinwen.asp?topage=<%=intcurpage+1%>&nbmc=<%=request("nbmc")%>&nb=<%=request("nb")%>&title=<%=request("title")%>&fbtime=<%=request("fbtime")%>&Submit=eee">下一页</a> <a href="xinwen.asp?topage=<%=rs.pagecount%>&nbmc=<%=request("nbmc")%>&nb=<%=request("nb")%>&title=<%=request("title")%>&fbtime=<%=request("fbtime")%>&Submit=eee">最后一页</a>
		<%end if%>
		请输入页次:<input type=text size=3 name=topage value="<%=intcurpage%>" class="text">&nbsp;&nbsp;
<input type="submit" name="Submit" value="Go" class="text">
		<input type="hidden" value="<%=request("title")%>" name="zt">
		<input type="hidden" value="<%=request("fbtime")%>" name="fbtime">
		<input type="hidden" value="<%=request("nbmc")%>" name="nbmc">
		<input type="hidden" value="<%=request("nb")%>" name="nb">
		<input type="hidden" value="eee" name="Submit">
      </td>
    </tr>
  </form>
</table>
<%end if%>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
%>