<!--#include file="conn2.asp"-->
<!--#include file="inc/chkadmin.asp"-->
<!--#include file="inc/func.asp"--> 
<!--#include file="inc/function1.asp"-->
<%
 
 Action=trim(request("Action"))
ID=Trim(Request("ID"))
 if id<>"" then
    if Action="Del" then
		conn.execute "Delete From zy_news Where news_id=" & CLng(ID)
	end if
 end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" Content="Microsoft FrontPage 6.0">
<SCRIPT language=JavaScript>
<!--
function MM_jumpMenu(selObj){ //v3.0
  eval("location.replace('news.asp?NewsTypeId="+selObj.options[selObj.selectedIndex].value+"')");
}
//-->
</SCRIPT>
<script language="JavaScript">

function ConfirmDel()
{
   if(confirm("确定要删除此新闻吗？"))
     return true;
   else
     return false;
}
</script>
<link href="style.css" rel="stylesheet" type="text/css">
<title>信息列表</title>
</head>
<body>
<p align=center>&nbsp;</p>
  <table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="#ffffff" class="tableBorder" style="border-collapse: collapse">
		                <tr bgcolor="#0EBDF6">
                <td height="25" colspan="5" align="center"><b><font color="#FFFFFF">新闻信息管理</font></b></td>
               
              </tr>
            <form name="form2" method="post"  id="form2">
              <tr class="bj" onMouseOut="this.style.backgroundColor='#ECFAFF'" onMouseOver="this.style.backgroundColor='#f9f9f9'">
                <td width="49" height="25" class="bb"><strong>编号</strong></td>
                <td width="331" height="25" class="bb"><strong>信息标题</strong></td>
                <td width="93" height="25" class="bb"><strong>添加时间</strong></td>
                <td width="75" height="25" class="bb"><b>来源</b></td>
                <td width="114" height="25" class="bb"><strong>操作</strong></td>
              </tr>
              <%

 
sqlnews="select * from zy_news"
set rsnew=server.CreateObject("adodb.recordset")
rsnew.open sqlnews,conn,1,3
page=request("page")
if page="" then page=1
i=0
if not rsnew.eof then
rsnew.pagesize=30
rsnew.absolutepage=page
i=1
end if
for j=1 to rsnew.pagesize
if rsnew.eof then exit for
%>
              <tr class="bj" onMouseOut="this.style.backgroundColor='#ECFAFF'" onMouseOver="this.style.backgroundColor='#f9f9f9'">
                <td align="center" height="25" ><%=rsnew("news_id")%></td>
                <td align="left" height="25" width="331">
                 
                  <%=lessChar(rsnew("news_title"),30)%>
           
           </td>
                <td height="25" width="93"><%=split(rsnew("news_data")," ")(0)%></td>
                <td height="25" width="75"><%=rsnew("news_intro")%></td>
                <td height="25"><a href="NewsEdit.asp?NewsId=<%=rsnew("news_id")%>" alt="修改信息"  title="修改信息">修改</a>&nbsp;
                    <%response.write "<a href='news.asp?Action=Del&ID=" & rsnew("news_id") & "' onclick='return ConfirmDel();'>删除</a>" %>
                </td>
              </tr> <%
rsnew.movenext
next
%>
            </form><%if i=1 then%>
              <tr class="bj" onMouseOut="this.style.backgroundColor='#ECFAFF'" onMouseOver="this.style.backgroundColor='#f9f9f9'">
                <td colspan="5" height="25" colspan="6" align="center"><form action="news.asp" method="get" name=form3 >
                  <div align="center">共<%= rsnew.recordcount %>条信息&nbsp; 每页<%= rsnew.pagesize %>条 页次:<font color="red"><%= page %></font>/<%= rsnew.pagecount %>
                      <% If page>1 Then %>
                  [<a href="news.asp?page=<%= 1 %>">首页</a>]
                  <% Else %>
                  [<font color="#666666">首页</font>]
                  <% End If %>
                  <% If page>1 Then %>
                  [<a href="news.asp?page=<%= page-1 %>">上页</a>]
                  <% Else %>
                  [<font color="#666666">上页</font>]
                  <% end if %>
                  <% If cint(page)<rsnew.pagecount Then %>
                  [<a href="news.asp?page=<%= page+1 %>">下页</a>]
                  <% Else %>
                  [<font color="#666666">下页</font>]
                  <% End If %>
                  <% If cint(page)<rsnew.pagecount Then %>
                  [<a href="news.asp?page=<%= rsnew.pagecount %>">尾页</a>]
                  <% Else %>
                  [<font color="#666666">尾页</font>]
                  <% End If %>
                  <font class="a">
                  <input type=hidden value="<%=tid%>" name="newstypeid">
                  转到
                  <select name="page" size="1" class="t" id="page">
                    <% for i=1 to rsnew.pagecount %>
                    <option value="<%= i %>" <% If i=page Then %> selected<% End If %>><%= i %></option>
                    <% next %>
                  </select>
                  页
                  <input class="buttonface" type="submit" value=" Goto ">
                </font> </div>
              </form></td>
              </tr> <%end if%>
</table>
<p>
  
</p>
</body>
</html>
