<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file="../inc/function.asp"-->
<body topmargin="0">
<center>
<link href="inc_style.css" rel="stylesheet" type="text/css">
<%
dim sql,rs,biaoti,neirong,Allrecord,Pagesize,Allpage,ThisPage,k
if request("page")="" then
ThisPage=1		
else
ThisPage=request("page")
end if

set rs=server.createobject("adodb.recordset")
keyword=HtmlEncode(request.form("keyword"))
dtype=HtmlEncode(request("type"))
if keyword <>"" then
sql="select * from [jle_news] where ( biaoti like '%" & keyword & "%' or neirong like '%" & keyword & "%' ) order by data desc"
else
if dtype<>"" then
sql="select * from [jle_news] where gcla='"&dtype&"' order by data desc"
else
sql="select * from [jle_news] order by data  desc"
end if
end if
rs.open sql,conn,1,1
rs.Pagesize=20
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
k=0
%>
<table width="98%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
<td align="center" height="29"  class="tdbar">
        <p align="center"><b>新闻管理</b></td>
      </tr>
      <tr>
        <td width="99%" valign="top" height="24">
       
         <table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#c5cfe0" bordercolordark="#FFFFFF" bgcolor="#C5D5E4"  style="font-size:12px; letter-spacing:1px;">
        <tr align="center" bgcolor="#FFFFFF" height="20"> 
<td align="center" height="29"  class="tdbar" colspan="2"><table><FORM action="" method="post" name="search"><tr><td>关键字
      <INPUT  maxLength="20" name="keyword" onFocus="this.value=''" size="18"  value="<%=keyword%>"> 
    <INPUT  type="submit" value="搜索" style="font-size: 12px" name="search"> 
    </td></tr></FORM></table>
    </TD>
            <TD  class="tdbar" colspan=2 align="center">按类查看
<SELECT size="1" name="item" onChange="location=this.options[this.selectedIndex].value">
              <OPTION value="?">全部</OPTION>
              <%set rs_lei = server.createobject("adodb.recordset")                                            
			sql = "select * from jle_newsfl"                                            
			rs_lei.open sql,conn,1,1                                          
			do while not rs_lei.eof%>
              <OPTION value="?type=<%=rs_lei("newsname")%>" <%if rs_lei("newsname")=dtype then%>selected<%end if%>><%=rs_lei("newsname")%></OPTION>
              <%rs_lei.movenext                                        
		  loop                                                
		  rs_lei.close                                       
		  set rs_lei = nothing%>
            </SELECT> </TD>
        </tr>
        <tr>
            <td width="7%" height="24" >
            　编号</td>
            <td width="57%" height="24" >　
			新闻标题  <b>记录总数</b>:[共<%=Allrecord%>条新闻]</td>
            <td width="13%"  height="24">
            　修改</td>
            <td width="23%"  height="24">
            　删除</td>
          </tr>
     <%do while not rs.eof%>
            <tr>
            <td width="7%" height="24"   class="tdbar">
            <p align="center"><b><font color="#808080"><%=k+1%></font></b></td>
            <td width="57%" height="24"   class="tdbar">
            <A href="../shownews.asp?id=<%=rs("id")%>" target="_blank"><FONT color=#000000><%=rs("biaoti")%></FONT></A>[<%=rs("data")%>][<%=rs("gcla")%>]</td>
            <td width="13%"  height="24"  class="tdbar">
            <a href="admin_notice_edit.asp?id=<%=rs("id")%>"><font color="#FF0000">修改</font></a></td>
            <td width="23%"  height="24"  class="tdbar">
            <a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="admin_notice_edit.asp?id=<%=rs("id")%>&chk=del">
            <font color="#FF0000">删除</font></a></td>
          </tr>
     <%
    k=k+1
    rs.movenext
    if k>=Pagesize then exit do
	loop
	 %>
        </table>
        </td>
      </tr>
      <tr>
        <td width="99%" valign="top" height="24">
		<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="27">
<tr> 
<td height="27" width="151" align="center">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td width="181" align="center">
共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td width="237" align="center">
现在是第 
                <font color="#CC5200"><%=ThisPage%></font> 页</td>
<td width="200" align="center">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&type="&dtype&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&type="&dtype&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&type="&dtype&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&type="&dtype&">尾页</a>&nbsp;"     
end if
%></td></tr></table></td>
      </tr>
    </table>
</center>
<%
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>