<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'****************************************************************
'**   版权所有：烈火工作室  演示网站http://www.strongfire.cn   **
'**   QQ:839225572   邮箱：strongfire2008@163.com              **
'**   非正版用户不得擅自非法修改用于商业用途！查出必究。       **
'****************************************************************
%>
<!--#include file="islogin.asp"-->
<!--#include file="Check_SqlIn.asp"-->
<!--#include file="admin_conn.asp"-->
<!--#include file = "config.asp"-->
<%
'newsperpage=30
ClassName=Request.QueryString("ClassName")

%>
<html>
<head>
<LINK href="admin_Css.css" type=text/css rel=stylesheet>
<script language = "JavaScript">
function go(URL,cfmText)
{
	var ret;
	ret = confirm(cfmText);
	if(ret!=false)window.location=URL;
}
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;
		}
	}
 </script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改信息列表</title>

<style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	color: #0000FF;
	font-weight: bold;
}
-->
</style>
</head>


<body>
<div align="center">
  <p><br>
      
  <table border=0 cellspacing=1 align="center" class="list">
  <form method="POST" action="artpldel.asp">
    <tr>
      <th colspan="6"><input name="classname" type="hidden" value="<%=classname%>">
          <input name="page" type="hidden" value="<%=request("page")%>"><%=ClassName%></th>
    </tr>
	
    <tr>
      <td width="20" >&nbsp;</td>
      <td width="55" ><div align="center">ID号</div></td>
      <td width="418"><div align="center">标题</div></td>
      <td width="58" ><div align="center">浏览数</div></td>
      <td width="88"><div align="center">日期</div></td>
      <td width="97"><div align="center">操作</div></td>
    </tr>
<%
Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="select id,Title,hits,addtime,ClassName from article where ClassName='"& ClassName &"' order by id desc"
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
  response.Write("<tr><td colspan='6'><div align='center'>暂时没有记录</div> </td></tr>")
else
	rs.PageSize=newsperpage
	page=clng(request("page"))
	if page=0 then page=1 
	pages=rs.pagecount
	if page > pages then page=pages
	rs.AbsolutePage=page 
	pp=1
	for j=1 to rs.PageSize 
	Title = rs("Title")
	turl="..\article\"&rs("id")&".htm"
%>
	
    
    <tr <%if (pp mod 2)=1 then%><%else%>class="table_td2"<%end if%>>
      <td width="20"><input type="checkbox" name="pldel"  value="<%=rs("id")%>"></td>
      <td width="55"><div align="center"><%=rs("id")%></div></td>
      <td ><a  href="<%=turl%>"  target=_blank><%=Title%></a></td>
      <td width="58" ><div align="center"><%=rs("hits")%></div></td>
      <td width="88" ><div align="center"><%=rs("addtime")%></div></td>
      <td width="97" ><div align="center"><a href='ArticleModify.asp?id=<%=rs("id")%>&page=<%=Page%>&ClassName=<%=ClassName%>'>修改</a> <a href="javascript:go('Articledel.asp?id=<%=rs("id")%>&page=<%=Page%>&ClassName=<%=ClassName%>','您确定要删除？')">删除</a>  </div></td>
    </tr>
<%
rs.movenext
pp=pp+1
if rs.eof then exit for
next

%>	
	
    
	
    <tr>
      <td colspan="6" > <br> <div align="left">
        
          <label>
            <input onclick=CheckAll(this.form) type="checkbox" name="chkall" value="checkbox">
            全选</label>
          <input type="submit" name="Submit" value="批量删除">
        
      </div>    </form>    <form method=Post action="ArticleModifylist.asp?ClassName=<%=ClassName%>">
          <div align="center">
            <%if Page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=ArticleModifylist.asp?ClassName="&ClassName&"&page=1>首页</a>&nbsp;"
    response.write "<a href=ArticleModifylist.asp?ClassName="&ClassName&"&page=" & Page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=ArticleModifylist.asp?ClassName="&ClassName&"&page=" & (page+1) & ">"
    response.write "下一页</a> <a href=ArticleModifylist.asp?ClassName="&ClassName&"&page="&rs.pagecount&">尾页</a>"
  end if
   response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=4 maxlength=10  value="&page&">"
   response.write " <input class=input type='submit'  value=' Goto '  name='cndok'></span>"     
%>
        </div>
        </form>
      </td>      
    </tr>
<%
end if
set rs=nothing%>
  </table>
  
 
  <p><br>
  </p>

</body>

</html>
