<%@ LANGUAGE="VBSCRIPT" %> <%=ForumName%>--管理页面 <% if not master then Errmsg=Errmsg+"
"+"
  • 本页面为管理员专用,请登陆后进入。" call Error() else 'response.write MaxAnnouncePerPage 'response.end %> align=center>
    >
    欢迎 <%=session("mastername")%>进入管理页面
    <%call leftmenu()%> <% dim totalPut dim CurrentPage dim TotalPages dim i,j dim idlist dim title dim sql dim rs title=request("txtitle") if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if if not isempty(request("selAnnounce")) then idlist=request("selAnnounce") if instr(idlist,",")>0 then dim idarr idArr=split(idlist) dim id for i = 0 to ubound(idarr) id=clng(idarr(i)) call deleteannounce(id) next else call deleteannounce(clng(idlist)) end if end if %>
    点击用户名进行相应操作, 查找用户:
    <% if title<>"" then sql="select userid,username from [user] where username like '%"&trim(title)&"%' order by userid desc" else sql="select userid,username from [user] order by userid desc" end if Set rs= Server.CreateObject("ADODB.Recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "

    还 没 有 任 何 用 户

    " else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if MaxAnnouncePerpage=Clng(MaxAnnouncePerpage) if (currentpage-1)*MaxAnnouncePerPage>totalput then if (totalPut mod MaxAnnouncePerPage)=0 then currentpage= totalPut \ MaxAnnouncePerPage else currentpage= totalPut \ MaxAnnouncePerPage + 1 end if end if if currentPage=1 then showContent showpage totalput,MaxAnnouncePerPage,"admin_user.asp" else if (currentPage-1)*MaxAnnouncePerPage
    <%do while not rs.eof%> <% i=i+1 if i>=MaxAnnouncePerPage then exit do rs.movenext loop %>
    ID号 用户名

    <%=rs("userid")%>

    "><%=htmlencode(rs("username"))%>

    <% end sub function showpage(totalnumber,MaxAnnouncePerPage,filename) dim n if totalnumber mod MaxAnnouncePerPage=0 then n= totalnumber \ MaxAnnouncePerPage else n= totalnumber \ MaxAnnouncePerPage+1 end if response.write "

     " if CurrentPage<2 then response.write "首页 上一页 " else response.write "首页 " response.write "上一页 " end if if n-currentpage<1 then response.write "下一页 尾页" else response.write "" response.write "下一页 尾页" end if response.write " 页次:"&CurrentPage&"/"&n&"页 " response.write " 共"&totalnumber&"个用户 "&MaxAnnouncePerPage&"个用户/页 " end function sub deleteannounce(id) dim rs,sql set rs=server.createobject("adodb.recordset") sql="delete from [user] where userid="&cstr(id) conn.execute sql if err.Number<>0 then err.clear response.write "删 除 失 败 !
    " else response.write "用户"&cstr(id)&"被删除了!
    " end if End sub %>

    <%end if%>