<!-- #include file="../inc/conn.asp"-->
<!-- #include file="../config.asp"-->
<%
if request("action")="del" then
	sql="delete from help_news where id="&request("id")
    conn.execute(sql)
	Response.write "<script>alert('帮助信息删除成功！');location.href=""show.asp"";</script>"
end if
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
	color: #333333;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="70" background="../images/right_top.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="35"><!-- #include file="../right_top.asp"--></td>
        </tr>
        <tr>
          <td height="35">&nbsp;当前位置：后台管理 &gt; 帮助中心 &gt; 帮助类别管理</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="5"></td>
  </tr>
</table>  
<table width="100%"  border="0" cellspacing="0" cellpadding="0"><form name="form1" method="post" action="">
  <tr>
    <td>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#AAC1DE">
    <tr>
      <td bgcolor="#EFF5FB"><div align="center">编号</div></td>
      <td bgcolor="#EFF5FB"><div align="center">帮助标题</div></td>
      <td bgcolor="#EFF5FB"><div align="center">类别</div></td>
      <td bgcolor="#EFF5FB"><div align="center">发布日期</div></td>
      <td bgcolor="#EFF5FB"><div align="center">编辑</div></td>
    </tr>
	<%
set rs=server.CreateObject("adodb.recordset")
	sql="Select * from help_news order by id desc"
	rs.open sql,conn,1,1
    if rs.recordcount<>0 then
       rs.pagesize=50
	   page=clng(request.QueryString("page"))
	   if page<1 then page=1
	   if page>rs.pagecount then page=rs.pagecount
	   rs.absolutepage=page
	   for i = 1 to rs.pagesize 
		   if len(rs("title"))>20 then
		      title=left(rs("title"),20)&"..."
		   else
		      title=rs("title")
		   end if	  	 
%>
    <tr bgcolor="#FFFFFF">
      <td><div align="center"><%=rs("id")%></div></td>
      <td><%=title%></td>
      <td><div align="center"><%
				set rst=conn.execute("select * from help_class where id="&rs("class_id")&" order by id desc")
				if not (rst.bof and rst.eof) then
			%><%=rst("class_name")%>
			<%end if 
			rst.close%></div></td>
      <td><div align="center"><%=rs("date")%></div></td>
      <td><div align="center"><a href="?action=del&id=<%=rs("id")%>">删除</a>&nbsp;&nbsp;<a href="edit.asp?id=<%=rs("id")%>">修改</a></div></td>
    </tr>
<%  rs.movenext
    if rs.eof then exit for
	next
%>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"></td>
  </tr>
  <tr>
    <td height="70">当前显示50条记录，<%
  if page=1 then
     response.Write("[首页]")
  else
     response.Write("<a href=?page=1>[首页]</a>")	 
  end if
  if page=1 then
     response.Write("  [上一页]") 	 
  else
     response.Write("  <a href=?page=" & page-1 & ">[上一页]</a>")	  
  end if	
  if  page=rs.pagecount then
     response.Write("  [下一页]") 
  else
     response.Write("  <a href=?page=" & page+1 & ">[下一页]</a>")	  
  end if 
  if page=rs.pagecount then
     response.Write("  [末页]")
  else
     response.Write("  <a href=?page=" & rs.pagecount & ">[末页]</a>")	 
  end if
  %>
&nbsp;&nbsp;当前第<%=page%>页，共<%=rs.pagecount%>页&nbsp;&nbsp;共<%=rs.recordcount%>条信息！</td>
  </tr>
</table></td>
  </tr><%
end if
%></form>
</table>
</body>
</html>
