<!--#include file="session.asp"-->
<!--#include file="conn.asp"-->
<%
if request.QueryString("del")="del" then
id=request.QueryString("id")
set rs=conn.execute("delete * from wtb_about where a_id="&id&"")
response.redirect(""&Request.ServerVariables("HTTP_REFERER")&"")
response.end

end if
%>
<link href="images/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
.STYLE8 {font-size: 12px; font-weight: bold; }
.STYLE9 {font-size: 12px}
-->
</style>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">公司管理</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
   <!--内容开始--> 
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
	  <td width="112"  height="40" align="center" style="font-size:12px;"><strong>序号</strong></td>
       <td width="405" height="40" align="center" style="font-size:12px;"><strong>名称</strong></td>
      
       <td height="40" colspan="2" align="center" ><span class="STYLE8">操作</span><span class="STYLE8"></span></td>
       
     </tr>
<% Set rs = server.CreateObject("adodb.recordset")
sql="select * from wtb_about  order by a_id asc "
rs.Open sql, conn, 1, 1

if rs.eof then

else	
    rs.PageSize = 25           
    allpage = rs.RecordCount
    iPageSize = rs.PageSize
    maxpage = rs.PageCount
    page = request("page")
    If Not IsNumeric(page) Or page = "" Then
        page = 1
    Else
        page = CInt(page)
    End If
    If page<1 Then
        page = 1
    ElseIf page>maxpage Then
        page = maxpage
    End If
    rs.AbsolutePage = Page
    If page = maxpage Then
        x = allpage - (maxpage -1) * iPageSize
    Else
        x = iPageSize
    End If
   


 For i = 1 To x

%>    
     <tr>
	 <td height="30" align="left" valign="middle" style="border-bottom:1px dashed #CCCCCC; padding-left:10px;"><div align="center"><span class="STYLE9"><%=rs("a_id")%></span></div></td>
       <td height="30" align="left" valign="middle" style="border-bottom:1px dashed #CCCCCC; padding-left:10px;"><span class="STYLE9"><a href="about.asp?id=<%=rs("a_id")%>"><%=rs("a_title")%></a></span></td>
      
       <td width="111" align="center" valign="middle" style="border-bottom:1px dashed #CCCCCC;padding-right:5px; "><div align="right"><a href="about.asp?id=<%=rs("a_id")%>" class="STYLE9" style="color:#000000">修改</a></div></td>
       <td width="122" align="center" valign="middle" style="border-bottom:1px dashed #CCCCCC;padding-left:5px; "><div align="left"><a href="?del=del&id=<%=rs("a_id")%>" class="STYLE9" style="color:#000000" onClick="return confirm('确定删除吗？')">删除</a></div></td>
      
     </tr>

  <%
rs.movenext           
next
end if 
rs.close
set rs=nothing
  %>     

     <tr>
       <td height="25" align="right">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        <td>&nbsp;</td>
       
     </tr>
     <tr>
       <td height="25" colspan="4" align="center"><%
    action = "http://" & request.servervariables("http_host") & request.servervariables("script_name")
    query = Split(request.servervariables("query_string"), "&")
    For Each x in query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next
    response.Write("<table class='table'><form method=get onsubmit=""document.location = '" & action & "?" & temp & "page='+ this.page.value;return false;""><tr ><td align=center>")
    If page<= 1 Then
        response.Write ("<font size=2>首页 上一页 ")
    Else
        response.Write("<a href=" & action & "?" & temp & "page=1>首页</a> <a href=" & action & "?" & temp & "page=" & (page -1) & ">上一页</a> ")
    End If
    If page>= maxpage Then
        response.Write ("下一页 尾页 ")
    Else
        response.Write("<a href=" & action & "?" & temp & "page=" & (page+1) & ">下一页</a> <a href=" & action & "?" & temp & "page=" & maxpage & ">尾页</a> ")
    End If
    response.Write("页次：" & page & "/" & maxpage & "页 共计" & allpage & "条记录 " & "<input class=wenbenkuang tyep=text name=page size=3 maxlength=3 value=" & page & ">" & " 页 "  & "<input type=submit value=转到 /> </td></tr></form></table>")

%></td>
       
     </tr>
   </table>
    
   <!--内容结束-->    </td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
