<%lm1=int(Request("lm1"))
userPageRights="{"&lm1&"}"
%>
<!--#include file="check.asp"-->
<!--#include file="../Include/const.asp" -->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<link href="Images/Style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {color: #0000FF}
-->
</style>
<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
 var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
 if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<div align="center">
    <table class=tableBorder width="100%" border=0 align="center" cellpadding=5 cellspacing=1>
      <tbody>
        <tr align="left">
          <th height=21 sytle="line-height:150%">【信息列表】</th>
        </tr>
        <tr>
          <td  class=forumRow><div align="center">
            <table border="1" width="100%" id="table1" cellspacing="0" cellpadding="3" style="border-collapse: collapse" bordercolor="#6688E3">
              <tr>
                <td width="435" height="23" align="center" background="images/1s/topBar_bg.gif" bgcolor="#6688E3"><b>(编号)标题(阅读)</b></td>
                <td width="127" align="center" bgcolor="#6688E3" background="images/1s/topBar_bg.gif"><b>栏目</b></td>
                <td width="162" align="center" bgcolor="#6688E3" background="images/1s/topBar_bg.gif"><b>加入时间</b></td>
                <td width="223" align="center" background="images/1s/topBar_bg.gif" bgcolor="#6688E3"><b>操作</b></td>
              </tr>
              <%
lm2=request("lm2")
lm1=request("lm1")
  sql = "select * from tb_news where id is not null"
  if lm1<>"" then 
	 sql = sql & " and lm='"&lm1&"' "
  end if
  if lm2<>"" then 
	 sql = sql & " and lm2='"&lm2&"' "
  end if 
  sql= sql& " order by id desc"


  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,1
  if rs.recordcount<>0 then

	page=int(request.QueryString ("page"))
	rs.PageSize=20
	pagecount=rs.pagesize
	if page<=0 then page=1
	if request.QueryString("page")="" then page=1
	rs.AbsolutePage=page
	gg=rs.recordcount/pagecount
	gh=int(gg)
	if gh<=1 then gh=1
	if gg>gh then gh=gh+1
	gg=gh
	
	for i=1 to pagecount
	lms=trim(rs("lm"))
	klms=trim(rs("lm2"))
if klms<>"" then
  set rs1=conn.execute("select * from tb_news_menu where id="&klms&" order by n_num")
  if not rs1.eof then
   n_name=rs1("n_name")
  else
   n_name="未知栏目"
  end if
end if 
%>
              <tr>
                <td width="435" height="26">(<%=rs("id")%>)<a href="/<%if lm1="13" then Response.write "pic" else response.write "news"%>/Show.asp?ArticleID=<%=rs("id")%>" title='<%=rs("title")%>'><font color="<%=rs("titlecolor")%>"><%=left(rs("title"),20)%></font></a><font color=999999>(<%=rs("hit")%>)</font><%if rs("titlePic")<>"" then%><font color="#FF0000">图</font><%end if%><%if rs("tj")="推荐" then%><font color="#FF0000">荐</font><%end if%><%if rs("ontop")=5 then%><font color="#FF0000">固</font><%end if%></td>
                <td width="127" align=center><%=n_name%></td>
                <td width="162" align="center"><%=rs("time")%></td>
                <td><p align="center"><a href="News_Show.asp?ID=<%=rs("id")%>" title='<%=rs("title")%>'>查看</a> <a href="news_add.asp?id=<%=rs("ID")%>&lm2=<%=rs("lm2")%>&lm1=<%=rs("lm")%>">修改</a> <a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href=news_del2.asp?id=<%=rs("id")%>&page=<%=page%>&lm2=<%=rs("lm2")%>&lm1=<%=rs("lm")%>>删除</a> </td>
              </tr>
              <%

rs.movenext
if rs.eof then exit for
next
else
  Response.Write "<tr><td colspan=4>暂无信息</td></tr>"
   end if
%>
            </table>
            <br>
            </div>
            </td>
        </tr>
        <tr>
          <td class=forumRow><%
if rs.recordcount<>0 then
  if page>1 then%>
            <a href='<%=request.servervariables("URL")%>?page=1&lm1=<%=lm1%>&lm2=<%=lm2%>'>首页</a> <a href='<%=request.servervariables("URL")%>?page=<%=page-1%>&lm1=<%=lm1%>&lm2=<%=lm2%>'>上一</a>
            <%end if%>
            <%if page<gg then%>
            <a href='<%=request.servervariables("URL")%>?page=<%=page+1%>&lm1=<%=lm1%>&lm2=<%=lm2%>'>下一</a> <a href='<%=request.servervariables("URL")%>?page=<%=rs.pagecount%>&lm1=<%=lm1%>&lm2=<%=lm2%>'>尾页</a>
            <%end if%>
共<%=rs.recordcount%>条　每页显示<%=pagecount%>条　　第<%=page%>页　共<%=rs.pagecount%>页
<script language="JavaScript">
      <!--
       function FP_jumpMenu(el,frm,sel) {//v1.0
       var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
       if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
        }
       // -->
     </script>
<select size="1" onChange="FP_jumpMenu(this,'window',false)" id="id1" name="D1" style="font-size: 9pt; border-style: solid; border-width: 1px">
  <%for i=1 to rs.pagecount%>
  <option value="<%=request.servervariables("URL")%>?page=<%=i%>&title=<%=title%>&lm1=<%=lm1%>&lm2=<%=lm2%>" <%if page=i then response.write "selected"%>>第<%=i%>页</option>
  <%next%>
</select>
</p>
<%end if%></td>
        </tr>
      </tbody>
    </table>
  　
</div>
</body>

</html>
