⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_index.asp

📁 仿雅虎论坛静态生成html版 后台管理:admin/admin.asp 用户名:admin 密码:admin TOP/top.htm 顶部模板 left.htm 左边树形菜单模板
💻 ASP
📖 第 1 页 / 共 4 页
字号:
   if deltopic_boardname<>"" then
      Set rs = Server.CreateObject("ADODB.Recordset")
      sql="select * from BT_Topic where boardname='"&deltopic_boardname&"' "
      rs.open sql,conn,1,3
      if not(rs.bof and rs.eof) then
       rs.movefirst
       while not rs.eof
        myFile="../Board/bbs"+cstr(rs("BoardID"))+"/"+rs("FileName")        myFile = Server.MapPath(myFile)        SET fileStreamObj = CreateObject("Scripting.FileSystemObject")
        if fileStreamObj.FileExists(myFile) then fileStreamObj.DeleteFile (myFile) end if
        set fileStreamObj=nothing
        rs.delete
        'if not(rs.bof and rs.eof) then
         rs.movenext 
        'end if
       wend
       'rs.update
       Response.Write "<br><br>&nbsp;&nbsp;删除成功"
      else
       Response.Write "<br><br>&nbsp;&nbsp;没有任何数据记录"
      end if
      rs.close
   else
     Response.Write "<br><br>&nbsp;&nbsp;论坛名称不能为空"
   end if
  else
   deltime=Request.Form("deltime")
   if deltopic_boardname<>"" and deltime<>"" then
      Set rs = Server.CreateObject("ADODB.Recordset")
      sql="select * from BT_Topic where boardname='"&deltopic_boardname&"' and datediff('n',PostTime,'"&deltime&"')>=0 "
      rs.open sql,conn,1,3
      if not(rs.bof and rs.eof) then
       rs.movefirst
       while not rs.eof
        myFile="../Board/bbs"+cstr(rs("BoardID"))+"/"+rs("FileName")        myFile = Server.MapPath(myFile)        SET fileStreamObj = CreateObject("Scripting.FileSystemObject")        if fileStreamObj.FileExists(myFile) then fileStreamObj.DeleteFile (myFile) end if
        set fileStreamObj=nothing
        rs.delete
        'if not(rs.bof and rs.eof) then
         rs.movenext
        'end if
       wend
       'rs.update
       Response.Write "<br><br>&nbsp;&nbsp;删除成功"
      else
       Response.Write "<br><br>&nbsp;&nbsp;没有任何数据记录"
      end if
      rs.close
   else
     Response.Write "<br><br>&nbsp;&nbsp;论坛名称或指定的时间不能为空"
   end if 
  end if
  Application.Lock
  Application(BBSname&deltopic_boardname+"bs")=Application(BBSname&deltopic_boardname+"bs")+1
  Application(BBSname&"index")=""
  Application(BBSname&deltopic_boardname)=""
  Application.UnLock
  
case 21
    BoardName=Request.QueryString("bbsname")
    Set rs = Server.CreateObject("ADODB.Recordset")
    sql="select * from 版面分类 where 版面名称='"&BoardName&"' "
    rs.open sql,conn,1,3
    if not(rs.bof and rs.eof) then
     Set rs2=conn.execute("select top 1 BoardName from BT_Topic where BoardName='"&BoardName&"' ")
     if rs2.bof and rs2.eof then
       myFolder="../board/bbs"+cstr(rs("id"))       myFolder = Server.MapPath(myFolder)       SET fileStreamObj = CreateObject("Scripting.FileSystemObject")
       fileStreamObj.DeleteFolder(myFolder)
       set fileStreamObj=nothing
       rs.Delete 
       rs.Update 
       Response.write"<br><br>&nbsp;&nbsp;删除成功"
       Application("index")
     else
       Response.Write "<br><br>&nbsp;&nbsp;这个论坛(版面)下还有帖子存在,不能删除,请先删除此论坛下的所有帖子"
     end if
    else
     Response.Write "<br><br>&nbsp;&nbsp;没有找到这个版面"
    end if
    rs.Close 
    Application.Lock
    Application(BBSname&"index")=""
    Application.UnLock
    Call BT_Board_GX

case 22
    userid=Request.QueryString("userid")
    if userid<>"" then
        Set rs = Server.CreateObject("ADODB.Recordset")
        sql="select id,用户名,帐号状态 from 用户资料 where id="&userid&" "
        rs.open sql,conn,1,3
        if not(rs.bof and rs.eof) then
            rs("帐号状态")="lock"
            rs.update
            Response.Write "&nbsp;&nbsp;帐号"&rs("用户名")&"已经被锁定(加入黑名单)!"
        else
            Response.Write "&nbsp;&nbsp;没有找到这个帐号"
        end if
        rs.close
        set rs=nothing
    else
        Response.Write "&nbsp;&nbsp;参数错误!!!"
    end if

case 23
    userid=Request.QueryString("userid")
    if userid<>"" then
        Set rs = Server.CreateObject("ADODB.Recordset")
        sql="select id,用户名,帐号状态 from 用户资料 where id="&userid&" "
        rs.open sql,conn,1,3
        if not(rs.bof and rs.eof) then
            rs("帐号状态")="unlock"
            rs.update
            Response.Write "&nbsp;&nbsp;已经从黑名单内解除"
        else
            Response.Write "&nbsp;&nbsp;没有找到这个帐号"
        end if
        rs.close
        set rs=nothing
    else
        Response.Write "&nbsp;&nbsp;参数错误!!!"
    end if

case 24
    userid=Request.QueryString("userid")
    if userid<>"" then
        Set rs = Server.CreateObject("ADODB.Recordset")
        sql="select * from 用户资料 where id="&userid&" "
        rs.open sql,conn,1,3
        if not(rs.bof and rs.eof) then
            rs.delete
            Response.Write "&nbsp;&nbsp;帐号删除成功"
        else
            Response.Write "&nbsp;&nbsp;没有找到这个帐号"
        end if
        rs.close
        set rs=nothing
    else
        Response.Write "&nbsp;&nbsp;参数错误!!!"
    end if

case 25
    IpDress=Request.QueryString("IpDress")
    Set rs = Server.CreateObject("ADODB.Recordset")
    sql="select * from LockIP "
    rs.open sql,conn,1,1
    Response.Write "<br><table align=center><form name=LockIp action=admin_index.asp?admin=26 method=post>"
    Response.Write "<tr><td>锁定的IP地址</td><td><input type=text size=15 name=LockIpName value="&IpDress&"></td></tr>"
    Response.Write "<tr><td>操作理由说明</td><td><TEXTAREA rows=3 cols=40 name=LockExplain></textarea></td></tr>"
    Response.Write "<tr><td colspan=2 align=center><input type=Submit value=确定 name=lockipsub></td></tr></table>"
    
    Response.Write "<table width=580 cellspacing=0 cellpadding=0 class=table1>"
    Response.Write "<tr height=25><td align=center class=TBHead width=30><font class=HeadFont><b>ID</b></font></td><td align=center class=TBHead width=100><font class=HeadFont><b>IP地址</b></font></td><td align=center class=TBHead><font class=HeadFont><b>操作理由</b></font></td><td align=center class=TBHead width=160><font class=HeadFont><b>加入时间</b></font></td><td align=center class=TBHead width=40><font class=HeadFont><b>操作</b></font></td></tr>"
    while not rs.eof
        Response.Write "<tr height=25><td align=center class=light width=30>"&rs("ID")&"</td><td align=center class=light width=100>"&rs("IpDress")&"</td><td align=center class=light>"&rs("LockExplain")&"</td><td align=center class=light>"&cstr(rs("LockTime"))&"</td><td align=center class=light><a href=admin_index.asp?admin=27&IP_ID="&rs("ID")&">解除</a></td></tr>"
        rs.movenext
    wend
    Response.Write "</table>"
    
case 26
    LockIpName=Request.Form("LockIpName")
    LockExplain=Request.Form("LockExplain")
    if LockIpName<>"" and LockExplain<>"" then
        Set rs = Server.CreateObject("ADODB.Recordset")
        sql="select top 1 * from LockIP "
        rs.open sql,conn,1,3
        rs.addnew
        rs("IpDress")=LockIpName
        rs("LockExplain")=LockExplain
        rs("LockTime")=now()
        rs.Update
        rs.close
        set rs=nothing
        Response.Write "锁定的IP地址添加成功"
        '--------------------------------
        Application(BBSname&"LockIP")=""
        '--------------------------------
    else
        Response.Write "参数有误"
    end if
    
case 27
    IP_ID=Request.QueryString("IP_ID")
    if IP_ID<>"" then
        Set rs = Server.CreateObject("ADODB.Recordset")
        sql="select top 1 * from LockIP where ID="&cint(IP_ID)&" "
        rs.open sql,conn,1,3
        if not(rs.bof and rs.eof) then
            rs.delete
            Response.Write "解除成功"
            '--------------------------------
            Application(BBSname&"LockIP")=""
            '--------------------------------
        else
            Response.Write "没有找到这个IP"
        end if
        rs.close
        set rs=nothing
    else
        Response.Write "参数有误"
    end if

case 28
   Application(BBSname&"TOP")=""
   Application(BBSname&"index")=""
   Application(BBSname&"gg")=""
   Application(BBSname&"link")=""
   Application(BBSname&"TOP_FT")=""
   Application(BBSname&"gg_FT")=""
   Application(BBSname&"link_FT")=""
   
   Call BT_Board_GX
   Response.Write "操作完成"
   
case 29
   Special=Request.Form("Special")
   Special_ex=Request.Form("Special_ex")
   if Special<>"" then
    Set rs = Server.CreateObject("ADODB.Recordset")
    sql="select top 1 * from Special where Special='"&Special&"' "
    rs.open sql,conn,1,3    
    if Special<>"" and Special_ex<>"" and Request.Form("add")="增加" then
      if rs.BOF and rs.EOF then
      rs.AddNew 
      rs("Special")=Special
      rs("Special_explain")=Special_ex
      rs("AppendTime")=now()
      rs.Update 
      Response.Write "增加成功"
      else
      Response.Write "已经存在"
      end if
    end if
    if Special<>"" and Request.Form("del")="删除" then
      if rs.BOF and rs.EOF then
       Response.Write "不存在这个专题"
      else
        rs.Delete 
        rs.Update 
        Response.Write "<br><br>&nbsp;&nbsp;&nbsp;"&flname&"删除成功"
      end if
    end if 
   rs.Close 
   set rs=nothing
   Application(BBSname&"index")=""
   end if%>
    <br><form name=addbbsfl  method="post" action="admin_index.asp?admin=29">&nbsp;
    &nbsp;增加专题:&nbsp;<INPUT class=fminpt name=Special type=text size=20><br><br>
    &nbsp;&nbsp;&nbsp;专题说明:&nbsp;<INPUT class=fminpt name=Special_ex type=text size=50><br><br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=Submit value="增加" name=add>&nbsp; <input type="reset" name="Clear" value="清除"></form><br>
    <form name=delbbsfl  method="post" action="admin_index.asp?admin=29">&nbsp;
    &nbsp;删除专题&nbsp;<SELECT name=Special><OPTION selected>所有专题</OPTION>
    <%Set rs = Server.CreateObject("ADODB.Recordset")
    sql="select * from Special "
    rs.open sql,conn,1,3   
    if not (rs.bof and rs.eof) then
    rs.MoveFirst 
    while not rs.eof
    Response.Write "<OPTION value="&rs("Special")&">"&rs("Special")&"</OPTION>"
    rs.MoveNext
    wend
    end if
    rs.Close 
    set rs=nothing
    Response.Write "</SELECT><input type=Submit value=删除 name=del></form>"
  '----------------------------------------------------------

end select
conn.close
set conn=nothing
Response.Write "</td></tr></table>"%>
<!--#include file="../inc/tom1.inc"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -