<!-- #include file="setup.asp" -->
<%
if CookieUserName=empty then error("<li>您还未<a href=Login.asp>登录</a>论坛")
if UserRoleID <> 1 then error("<li>您没有权限进入后台")

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

AdminTop

%>

<table  border="0" align="center" cellpadding="0" cellspacing="1" class=a2 width="100%">
  <tr class=a1>
    <td height="25" colspan="8"align="center">
	<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database/bzsq.asp")
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
'分页设置-------------------------------------------------------------------------------------------------------------------------
%>
      所有申请的斑竹共 <%=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%>
    </td>
  </tr>
    <tr class=a3>
    <td width="3%" height="25" align="center"><b>ID</b></td>
    <td width="8%" height="25" align="center"><b>申请人</b></td>
    <td width="10%" height="25" align="center"><b>申请版面的名称</b></td>
    <td width="6%" height="25" align="center"><b>保证时间</b></td>
    <td width="10%" height="25" align="center"><b>EMAIL地址</b></td>
    <td width="8%" height="25" align="center"><b>QQ号码</b></td>
    <td width="10%" height="25" align="center"><b>申请时间</b></td>
    <td width="5%" height="25" 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("UserName")%></td>
    <td>&nbsp;<%=rsbz("ForumName")%></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="3" align="center"><a href="bzsq-savesc.asp?id=<%=rsbz("id")%>">删除</a></td>
  </tr>
  <tr>
    <td colspan="2" align="center" height="32"><b>自我介绍</b></td>
    <td colspan="6"><%=rsbz("zwjs")%></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
%>
  <tr class=a1 >
    <td height="25" colspan="8"  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%>
    </td>
  </tr>
</table>
