<!--#include file="../0.asp"--><!--#include file="../../../conn/zkconn.asp"-->
<%if request("del")="yes" then
         set rs = conn.execute("select id from user_name where name='"&session("www.loogoo.com")&"'")
		userid=rs("id")
	    rs.close
		set rs = conn.execute("select userid from user_news where id="&Request("id")&"")
		userid2=rs("userid")
	    rs.close
		if userid=userid2 then
		conn.execute("Delete user_news where id="&Request("id")&"")
		Response.redirect "edit.asp"
		else
		Response.Write("对不起，您不能删除该条信息。如有疑问请与网站管理员联系。")
		end if
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From user_news where userid in(select id from user_name where name='"&session("www.loogoo.com")&"') Order By id DESC", conn, 3, 2
if rs.eof and rs.bof then
Response.Write("暂无新闻")
end if
rs.pagesize = 15
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if%><html>
<head> 
<title>数字新闻系统v1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../../css/css.css" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF" text="#000000"> 
  <p>&nbsp;</p>
  
<table width="650" align="center" bordercolordark="#FFFFFF" bordercolorlight="#000000">
  <tr valign="middle" bgcolor="#CCCCCC"> 
      <td height="25" colspan="5" align="center"><a href="add.asp">添加记录</a><font color="#1478eb">&nbsp; 
        </font>|<font color="#1478eb">&nbsp; </font><a href="edit.asp">管理记录</a></td>
    </tr>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="50" height="25" align="center">ID</td>
      <td height="25" align="center">新 闻 标 题</td>
      <td width="120" align="center">添加时间</td>
      <td width="50" height="25" align="center">阅读人次</td>
      <td width="50" height="25" align="center">删 除</td>
    </tr>
    <%
i=1
do while not rs.eof and i<=rs.pagesize
%>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td width="50" height="25" align="center"><%=i%></td>
      <td height="25"><a href="xiangxi.asp?id=<%=rs("id")%>" OnClick='return openAdminWindow(this.href);'><%=rs("bt")%></a>
        <script language=""javascript"">function openAdminWindow(url) {	popupWin = window.open(url,'new_page','scrollbars=yes,width=350,height=430');	return false;}</script></td>
      <td width="120" align="center"><%=rs("sj")%></td>
      <td width="50" height="25" align="center"><%=rs("js")%></td>
      
    <td width="50" height="25" align="center"> <a href="?id=<%=rs("id")%>&del=yes">删除</a></td>
    </tr>
    <%
i=i+1
 rs.MoveNext                                              
 loop 
%>
    <tr align="center" valign="middle" bgcolor="#f1f1f1"> 
      <form name=form method=post action=?><td height="25" colspan="5">
<%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
		p=(page-1) \ 10
	else
		p=(page-1) \ 10
	end if

	response.write "页次："& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					" 分页："
        if rs.pagecount>1 and page<>1 then response.write "<a href=?page=1 title='首页'>[|<]</a> "
	if p*10>0 then response.write "<a href='?page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
    uming_i=1
	for ii=p*10+1 to P*10+10
		   if ii=page then
	          response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
		   else
		      response.write "<a href='?page="&ii&"'>["+Cstr(ii)+"]</a>   "
		   end if
		if ii=rs.pagecount then exit for
		 uming_i=uming_i+1
	next
	if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
        if rs.pagecount>1 and page<>rs.pagecount then response.write "<a href=?page="& rs.pagecount &" title='尾页'>[>|]</a>"
response.write(" 　跳页：<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit value=Go class=go-wenbenkuang>")
end if
rs.close
set rs=nothing%>
</td></form>
    </tr>
  </table>
</body>
</html>