
<!--#include file="head.asp"-->
<%

dim keyword,dtype,k,tid,ttwoid,tthreeid
keyword=HtmlEncode(request("keyword"))
dtype=HtmlEncode(request("type"))
if keyword <>"" then
sql="select * from news_data where ( title like '%" & keyword & "%'  ) order by date desc"
else
if dtype<>"" then
sql="select * from news_data where type='"&dtype&"' order by date desc"
else
sql="select * from news_data order by date desc"
end if
end if
dbpath="../"
dblink%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>现有信息列表</TITLE>
<LINK rel="stylesheet" type="text/css" href="style.css">
</HEAD>

<BODY>
      <SCRIPT language=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;
    }
}
function Checked()
{
	var j = 0
	for(i=0;i < document.form.elements.length;i++){
		if(document.form.elements[i].name == "adid"){
			if(document.form.elements[i].checked){
				j++;
			}
		}
	}
	return j;
}

function DelAll()
{
	if(Checked()  <= 0){
		alert("您至少选择1条信息!");
	}	
	else{
		if(confirm("确定要删除选择的信息吗？\n此操作不可以恢复！")){
			form.action="del_news.asp?del=data";
			form.submit();
		}
	}
}

</SCRIPT>





<table style=" margin-bottom:5px;margin-top:8px;" width="960" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="33" style="border:1px #D3D3D3 solid; padding:1px; background:url(Images/img_9/new_1.gif); text-indent:8px;" class="top3"><table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1%">&nbsp;</td>
        <td width="78%" style="color:#ff6600; font-weight:700; padding-left:10px; font-size:13px"><img src="Images/img_9/new_2.gif" width="12" height="12">您现在的位置：<a href="/index.asp" style="color:#ff6600;">首页 </a>  >>  <%=dtype%></td>
        <td width="21%"><FORM action="" method="post" name="search">
     
      <input  maxlength="20" name="keyword" onFocus="this.value=''" size="18"  value="<%=keyword%>">
	   <INPUT  type="submit" value="搜索" style="font-size: 12px" name="search">
  </FORM></td>
      </tr>
    </table></td>
  </tr>
</table>






<TABLE width="960"  border="0" align="center" cellpadding="0" cellspacing="0"  style="margin-top:5px;">
  <TR>
    <TD height="38" background="Images/www9/top_70.gif" style="font-weight:normal; font-size: 10.5pt; font-weight: 700; padding-left:30px; color:#245477; ">通知公告</TD>
  </TR>
</TABLE>
<table width="960"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="BFE3FF">
  <TR>
    <TD bgcolor="#FFFFFF">
		<TABLE width="100%" border="0" cellspacing="8" cellpadding="0">
      <tr>
        <td valign='top' width="50%">
          <FORM name=form method=post>
      <TABLE width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#E3E3E3">
          <TR bgcolor="#FFFFFF">
            <TD width="49" align="center">编号</TD>
            <TD width="332" height="30" align="center">标  题</TD>
            <TD width="100" align="center">类  别</TD>
            <TD width="103" align="center">发布日期</TD>
            <TD width="89" align="center">浏览次数</TD>
          </TR>
          <%
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write"<tr bgcolor=#FFFFFF><td colspan='9'><p align='center'><font color='red'>暂无信息！</font></td></tr></table><br>"
response.end
else
const maxperpage=20
dim currentpage
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if isnumeric(currentpage)=false then
response.write "<script>alert('参数错误，关闭窗口！');window.close();</script>"
response.end
end if
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
	if currentpage > rs.pagecount then
	currentpage=rs.pagecount
	end if
end if

dim totalput,n
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof%>
          <TR bgcolor="#FFFFFF">
            <TD align="center"><%=i+currentpage*maxperpage-maxperpage+1%></TD>
            <TD height="30">&nbsp;<A href="<%=N_path("../",rs("adid"),"../")%>" ><%=rs("title")%></A></TD>
            <TD align="center" style="color:#1f376d"><%=rs("type")%></TD>
            <TD align="center" style="color:#1f376d"><%=rs("date")%></TD>
            <TD align="center" style="color:#0000cc"><%=rs("hits")%></TD>
          </TR>
          <%i=i+1                     
    rs.movenext                                                               
    loop    
    rs.close  
    set rs=nothing                                                                                       
    end if                                                                                     
    conn.close   
    set conn=nothing %>
  </TABLE>
</FORM>         </td>
      </tr>
    </TABLE>
</TABLE>
      <TABLE  border="0" cellpadding="0" cellspacing="0" align="center" id="table17">
        <TR>
          <TD height="8"></TD>
        </TR>
      </TABLE>













                                      
  <TABLE width="960" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#E0E0E0">  
   <TR>                                                     
    <TD height="20" bgcolor="#FFFFFF"><P align="center">页数：<%=currentpage%>/<%=n%>                                                            
   	<%k=currentpage                                                                                         
   	if k<>1 then%>                                                                     
   	<A href="?type=<%=dtype%>&pageid=1&id=<%=tid%>&twoid=<%=ttwoid%>&threeid=<%=tthreeid%>&keyword=<%=keyword%>">首页</A>                                                                                         
   	<A href="?type=<%=dtype%>&pageid=<%=k-1%>&id=<%=tid%>&twoid=<%=ttwoid%>&threeid=<%=tthreeid%>&keyword=<%=keyword%>">上一页</A><%else%>                                                                     
   	首页&nbsp;上一页                                                                                         
   	<%end if%>                                                                     
   	<%if k<>n then%>                                                                                         
   	<A href="?type=<%=dtype%>&pageid=<%=k+1%>&id=<%=tid%>&twoid=<%=ttwoid%>&threeid=<%=tthreeid%>&keyword=<%=keyword%>">下一页</A>                                                                                   
   	<A href="?type=<%=dtype%>&pageid=<%=n%>&id=<%=tid%>&twoid=<%=ttwoid%>&threeid=<%=tthreeid%>&keyword=<%=keyword%>">尾页</A>                                                                      
   	<%else%>                                                                     
   	下一页&nbsp;尾页                                                                                         
   	<%end if%>                                                                     
     共有 <%=totalput%> 条资讯</TD>                                                                                  
    </TR>                                                                
</TABLE>                                                       
</BODY>                                                                        
</HTML>     
