<!-- #include file="setup.asp" -->
<%
if adminpassword<>session("pass") then
response.redirect "admin.asp?menu=login"
end if

log(""&Request.ServerVariables("script_name")&"<br>"&Request.ServerVariables("Query_String")&"<br>"&Request.form&"")


%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/skins/<%=Request.Cookies("skins")%>/bbs.css" rel="stylesheet">
<body bgcolor="#666666">

  <div align="center">
  <%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database/#@%bbsbz.asa")
Set rsbz = Server.CreateObject("ADODB.Recordset")
sql ="select * from  bzsq Order By ID DESC"
rsbz.open sql,Conn,1,1

'如果数据库中没有数据的情况
if rsbz.eof and rsbz.bof then str="斑竹申请自动审批功能中还没有一个申请人!"
'分页设置-------------------------------------------------------------------------------------------------------------------------
if str="" then
	rsbz.PageSize=15
	pages=rsbz.pagecount
	records=rsbz.recordcount
	currentpage=request("currentpage")
	if currentpage="" or currentpage<1 then currentpage=1
	currentpage=cint(currentpage)
	if currentpage>pages then currentpage=pages
	rsbz.absolutepage=currentpage
else
	currentpage=1
	records=0
	pages=1
end if
'分页设置-------------------------------------------------------------------------------------------------------------------------
%>
  <br>
  &nbsp;&nbsp;&nbsp;<b> 
                                所有申请的斑竹共 <%=Records%> 人&nbsp;共 <%=Pages%> 页&nbsp;只是第 <%=currentpage%> 页 
                                <%if pages>1 then%>
                                <%if currentpage-5>0 then m=currentpage-5 else m=1%>
                                <%if currentpage+5<pages then n=currentpage+5 else n=pages%>
                                转到 [ 
                                <%for p=m to n%>
                                <%if currentpage=p then%>
                                <b><%=p%></b> 
                                <%else%>
                                <a <%if currentpage=p then%> style="color:red"<%end if%> href="bzsq-admingn.asp?id=<%=id%>&currentpage=<%=p%>"><%=p%></a> 
                                <%end if%>
                                <%next%>
                                ] 
                                <%end if%>
  </div>
  <table class="a4" border="1" cellspacing="3" cellpadding="0" width="<%=dkuan%>" align="center" bordercolor="#CCCCCC">
  <tr> 
    <td height="30" align="center"><b>ID</b></td>
    <td height="30" align="center"><b>申请人</b></td>
    <td height="30" align="center"><b>论坛的ID</b></td>
    <td height="30" align="center"><b>申请版面的名称</b></td>
    <td height="30" align="center"><b>保证时间</b></td>
    <td height="30" align="center"><b>EMAIL地址</b></td>
    <td height="30" align="center"><b>QQ号码</b></td>
    <td height="30" align="center"><b>申请时间</b></td>
    <td height="30" align="center"><b>删 除</b></td>
  </tr>

<%
linenumber=rsbz.pagesize
do while (not rsbz.eof) and (Line<linenumber)
%>

  <tr> 
    <td>&nbsp;<%=rsbz("ID")%></td>
    <td>&nbsp;&nbsp;<%=rsbz("name")%></td>
    <td>&nbsp;<%=rsbz("nameid")%></td>
    <td>&nbsp;<%=rsbz("index")%></td>
    <td>&nbsp;<%=rsbz("sqtime")%></td>
    <td>&nbsp;<%=rsbz("email")%></td>
    <td align="center"><%=rsbz("qq")%> </td>
    <td align="center"><%=rsbz("sqsjtime")%> </td>
    <td rowspan="2" align="center"><a href="bzsq-savesc.asp?id=<%=rsbz("id")%>">删 
      除</a></td>
  </tr>
  <tr> 
    <td colspan="2" align="center"><b>对该版面<br>发展的计划</b></td>
    <td colspan="6"><%=rsbz("bzjh")%></td>
  </tr>
<%
rsbz.movenext
Line=Line+1
loop
rsbz.close
%>

  <br>
</table>
  <div align="center">
      
    
      <%if currentpage>1 then%>
        <a href="bzsq-admingn.asp?id=<%=id%>&currentpage=<%=currentpage-1%>">[上一页]</a> 
        <%end if%>
        <%if currentpage<pages then%>
        <a href="bzsq-admingn.asp?id=<%=id%>&currentpage=<%=currentpage+1%>">[下一页]</a> 
        <%end if%>
        <%if currentpage>1 then%>
        <a href="bzsq-admingn.asp?id=<%=id%>&currentpage=1">[最首页]</a> 
        <%end if%>
        <%if currentpage<pages then%>
        <a href="bzsq-admingn.asp?id=<%=id%>&currentpage=<%=pages%>">[最末页]</a> 
        <%end if%>
        
    <br>
  
</div>
