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

📄 bbs_admin.asp

📁 安全性好,适用于制作论坛和进行资源下载的个人和大型网站使用!
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%rs.movenext
loop
if rs.eof and rs.bof then%><option value="0">没有版主</option>
<%end if
rs.close
set rs=nothing
%></select></td>
          <td><a href="?type=7&bid=<%=tbdate("id")%>">版主管理</a></td>
          <td><a href="?type=edit_bbs&id=<%=tbdate("id")%>">编辑</a></td>
          <td><a href="?act=del_bbs&id=<%=tbdate("id")%>">删除</a></td>
        </tr>
<%
icount=icount+1
tbdate.movenext
loop
tbdate.close
set tbdate=nothing
%>
        <tr class=Hxcmsqs>
          <td width="100%" height="30" align="left" colspan="11">
           <input type="submit" value="切换关闭属性" name="hx66_action" class="button">
           <input type="submit" value="更新排列次序" name="hx66_action" class="button"></td>
        </tr>
        </form>
        <form method="post" action="?act=add_bbs">
        <tr class=Hxcmsss>
          <td colspan="11">≡ 添加新的版块 ≡</td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="11">&nbsp;版块标题:<input type="text" name="title" maxlength="10" class="input"></td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="11">&nbsp;选择版区:<select name="hx66_bbsid" class="input">
<%
sql="select * from hx66_bbsid"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof%><option value="<%=rs("id")%>"><%=rs("hx66_title")%></option>
<%rs.movenext
loop
if rs.eof and rs.bof then%><option value="0">当前没有分类</option>
<%end if%>
</select></td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="11">&nbsp;超级版主:<input type="text" name="admin" size="20" maxlength="20" class="input"> **<font color=red>一个版只能一个超级版主,其它的在相应版块的“版主管理”里添加</font></td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="11">&nbsp;版面样式:<input type="text" name="css" size="20" maxlength="3" class="input"> **<font color=red>此版面的默认皮肤文件夹号</font></td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="11">&nbsp;版面介绍:<input type="text" name="dis" size="71" maxlength="45" class="input"></td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="3">&nbsp;版面等级:
          <select name="Grade" id="Grade">
          <option value="0" selected>游客可读</option>
          <option value="1">普通会员</option>
          <option value="2">VIP 会员</option>
        </select></td><td colspan="8">**<font color=red>如设定为VIP用户等级,请将此版的版主在主程序里设定为VIP用户</font></td>
        </tr>
        <tr class=Hxcmsds>
          <td colspan="3">&nbsp;版面属性:
          <select name="ziduan" id="ziduan">
          <option value="0" selected>正常版块</option>
          <option value="1">回复版块</option>
          <option value="2">展示版块</option>
         </select></td><td colspan="8"><li>正常版—不作属性限制</li><li>回复版—不能发主题(该版版主和管理员可发),只能回复,任何人可查看</li><li>展示版—不能发主题(该版版主和管理员可发),不能回复,任何人可查看</li></td>
        </tr>
        <tr class=Hxcmsqs>
          <td colspan="11">&nbsp;<input type="submit" name="submit" value="确认添加" class="button"></td>
        </tr>
        </form>
<%
end sub

sub edit_bbs()
dim editbid
editbid=request.querystring("id")
if not IsNumeric(editbid) or editbid="" then
   Response.write "<script language=JavaScript>alert('非法操作!');history.back()</script>"
   response.end
else
editbid=clng(editbid)
end if
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_bbsinfo,hx66_admin where hx66_bbsinfo.id=hx66_admin.hx66_bid and hx66_admin.hx66_bidadmin=1 and hx66_bbsinfo.id="&editbid&" order by hx66_bbsinfo.id desc"
rs.open sqlstr,conn,1,3
if not rs.eof then
%>
<form method="post" action="?act=edit_bbs_send&id=<%=editbid%>">
  <tr class=Hxcmsss>
    <td>版块编辑</td>              
  </tr>
  <tr class=Hxcmsds>
    <td height="25">&nbsp;版块标题:<input type="text" name="title" maxlength="10" value="<%=rs("hx66_bbstitle")%>" class="input"></td>
  </tr>
  <tr class=Hxcmsds>
    <td height="25">&nbsp;选择版区:<select name="hx66_bbsid" id="hx66_bbsid" class="input">
<%
sql="select * from hx66_bbsid"
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof%>
                <option value="<%=rs2("id")%>" <%if rs2("id")=rs("hx66_bbsid") then response.write "selected" end if%>><%=rs2("hx66_title")%></option>
                <%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
                <option value="0">当前没有分类</option>
                <%end if%>
              </select></td>
        </tr>
        <tr class=Hxcmsds>
          <td height="25">&nbsp;超级版主:<input type="text" name="admin" size="20" maxlength="20" value="<%=rs("hx66_name")%>" class="input"></td>
        </tr>
        <tr class=Hxcmsds>
          <td height="25">&nbsp;版面样式:<input type="text" name="css" size="20" maxlength="3" value="<%=rs("hx66_bbsskin")%>" class="input"></td>
        </tr>
        <tr class=Hxcmsds>
          <td height="25">&nbsp;版面介绍:<input type="text" name="dis" size="71" maxlength="45" value="<%=rs("hx66_bbsdis")%>" class="input"></td>
        </tr>
        <tr class=Hxcmsds>
          <td height="25">&nbsp;版面等级:
        <select name="Grade" id="Grade">
        <option value="0" <%if rs("hx66_Grade")="0" then response.write "selected" end if%>>游客可读</option>
        <option value="1" <%if rs("hx66_Grade")="1" then response.write "selected" end if%>>普通用户</option>
        <option value="2" <%if rs("hx66_Grade")="2" then response.write "selected" end if%>>VIP 用户</option>
        </select></td>
        </tr>
        <tr class=Hxcmsds>
          <td height="25">&nbsp;版面属性:
        <select name="ziduan" id="ziduan">
        <option value="0" <%if rs("hx66_ziduan")="0" then response.write "selected" end if%>>正常版块</option>
        <option value="1" <%if rs("hx66_ziduan")="1" then response.write "selected" end if%>>回复版块</option>
        <option value="2" <%if rs("hx66_ziduan")="2" then response.write "selected" end if%>>展示版块</option>
        </select></td>
        </tr>
        <tr class=Hxcmsds>
          <td height="25">&nbsp;版面关闭:<input type="checkbox" name="opcl" value="1"<%if rs("hx66_bbsopcl")=1 then response.write" checked"%>></td>
        </tr>
         <tr class=Hxcmsds>
          <td height="25">&nbsp;<input type="submit" name="submit" value="确认修改" class="button"></td>
        </tr>
</form>
<%
else
   Response.write "<script language=JavaScript>alert('未找到指定的版面!');history.back()</script>"
   response.end
end if
end sub

sub managebbsset()
set rs=server.CreateObject("adodb.recordset")
sqlstr="select top 1 * from hx66_bbsset"
rs.open sqlstr,conn,1,1
if not rs.eof then
%>
<form method="post" action="?act=managebbssetsend">
  <tr class=Hxcmsss>
    <td>论坛系统参数设置</td>                  </tr>
        <tr class=Hxcmsds>
          <td width="100%" height="25"><font color=red>·</font>论坛名称:<input type="text" name="name" size="25" value="<%=rs("hx66_bbsname")%>" maxlength="25" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>每页显示:<input type="text" name="num" size="10" value="<%=rs("hx66_perpagenum")%>" maxlength="10" class="input"> 帖 **贴子列表的显示贴数。</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>可供选择的样式有:<input type="text" name="css" size="10" value="<%=rs("hx66_bbscss")%>" maxlength="10" class="input"> 类 **填写风格皮肤文件夹的最大数(整数数字,可填大点,如10)。</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>首页皮肤文件夹号:<input type="text" name="hx66_bbsskin" size="10" value="<%=rs("hx66_bbsskin")%>" maxlength="10" class="input"> </td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>论坛皮肤是否前台自选变化:<input type="radio" name="hx66_skins" value="1" <%if rs("hx66_skins")=1 then response.write " checked"%>>是&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="hx66_skins" value="2"<%if rs("hx66_skins")=2 then response.write " checked"%>>否</td>      
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>发贴模式使用的编辑器规则:<input type="radio" name="showset" value="1" <%if rs("hx66_showset")=1 then response.write " checked"%>>HTML编辑器 &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="showset" value="2"<%if rs("hx66_showset")=2 then response.write " checked"%>>UBB 标签</td>      
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>自动删除帖子条件一,总数多少:<input type="text" name="delbbsidinfo" size="10" value="<%=rs("hx66_delbbsidinfo")%>" maxlength="10" class="input"> 帖以后</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>自动删除帖子条件二,帖子多少:<input type="text" name="delbbsdayinfo" size="10" value="<%=rs("hx66_delbbsdayinfo")%>" maxlength="10" class="input"> 天不活动以后</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>是否使用限制会员编辑、删除自已贴在48小时内有效功能:<input type="checkbox" name="useubase" value="1"<%if rs("hx66_useubase")=1 then response.write " checked"%>> (如果不使用此功能,请不要勾选。)</td>         
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>发表投票的最多选项数:<input type="text" name="hx66_Vote" size="10" value="<%=rs("hx66_vote")%>" maxlength="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>会员发主题贴的积分值:<input type="text" name="hx66_ztpoints" size="10" value="<%=rs("hx66_ztpoints")%>" maxlength="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>会员回复贴子的积分值:<input type="text" name="hx66_hfpoints" size="10" value="<%=rs("hx66_hfpoints")%>" maxlength="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>会员主题固顶的积分值:<input type="text" name="hx66_tpoints" size="10" value="<%=rs("hx66_tpoints")%>" maxlength="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>会员主题精华的积分值:<input type="text" name="hx66_jpoints" size="10" value="<%=rs("hx66_jpoints")%>" maxlength="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>会员能够转换积分到主程序的最低积分值:<input type="text" name="hx66_points" size="10" value="<%=rs("hx66_points")%>" maxlength="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>会员论坛积分按:<input type="text" name="hx66_money" size="10" value="<%=rs("hx66_money")%>" maxlength="10" class="input"> :10比例转换到主程序积分。</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>是否允许会员上传:<input type="radio" name="hx66_0" value="1" <%if checknum(hx66_upload(0))=1 then%>checked<%end if%>>是 <input type="radio" name="hx66_0" value="2" <%if checknum(hx66_upload(0))=2 then%>checked<%end if%>>否</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>最大上传文件大小:<input type="text" name="hx66_1" value="<%=checknum(hx66_upload(1))%>" size="10" class="input"> KB</td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>最多上传文件个数:<input type="text" name="hx66_2" value="<%=checknum(hx66_upload(2))%>" size="10" class="input"></td>
        </tr>
        <tr>
          <td class=Hxcmsds height="25"><font color=red>·</font>允许上传文件类型:<input type="text" name="uploadtype" value="<%=rs("hx66_uploadtype")%>" size="40" class="input"> 各个类型间用 | 隔开</td>
        </tr>
        <tr class=Hxcmsqs>
          <td height="25" align="center"><input type="submit" name="submit" value="确认修改" class="button"></td>
        </tr>
</form>
<%
else
   Response.write "<script language=JavaScript>alert('非法操作!');history.back()</script>"
   response.end
end if
rs.close
set rs=nothing
end sub

sub add_bbsid()
dim title
title=htmlencode(restr(request.form("title")))
if title="" then
   Response.write "<script language=JavaScript>alert('标题不能为空!');history.back()</script>"
   response.end
end if
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_bbsid"
rs.open sqlstr,conn,1,3
rs.addnew()
rs("hx66_title")=title
rs.update
rs.close
set rs=nothing
response.write "<script language=JavaScript>alert('新的区版块添加成功!');window.location.href = '?type=6'</script>"
response.end
end sub

sub edit_bbsid_send()
dim editbid
editbid=request.querystring("id")
if not IsNumeric(editbid) or editbid="" then
   Response.write "<script language=JavaScript>alert('非法操作!');history.back()</script>"
   response.end
else
editbid=clng(editbid)
end if
dim title
title=htmlencode(restr(request.form("title")))
if title="" then
   Response.write "<script language=JavaScript>alert('标题不能为空!');history.back()</script>"
   response.end
end if
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_bbsid where id="&editbid
rs.open sqlstr,conn,1,3
if not rs.eof then
rs("hx66_title")=title
rs.update
rs.close
set rs=nothing
response.write "<script language=JavaScript>alert('区版面修改成功!');window.location.href = '?type=6'</script>"
else
   Response.write "<script language=JavaScript>alert('未找到指定的版面!');history.back()</script>"
   response.end
end if
end sub

sub del_bbsid()
dim delbid
delbid=request.querystring("id")
if not IsNumeric(delbid) or delbid="" then
   Response.write "<script language=JavaScript>alert('非法操作!');history.back()</script>"
   response.end
else
delbid=clng(delbid)
end if

set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_bbsid where id="&delbid
rs.open sqlstr,conn,1,3
if not rs.eof then
  if request.querystring("yn")="" then
%>
<script language="javascript">
if(confirm("确认删除[<%=rs("hx66_title")%>]吗?"))
window.location="?act=del_bbsid&id=<%=delbid%>&yn=1"
else
history.back()
</script>
<%
  else
     rs.delete
     rs.close
     set rs=nothing
     response.write "<script language=JavaScript>alert('删除成功!');window.location.href = '?type=6'</script>"
  end if
else
   Response.write "<script language=JavaScript>alert('未找到指定的版面!');history.back()</script>"
   response.end
end if
end sub

sub managebbsid()
dim icount,id,hx66_order
set rs=server.CreateObject("adodb.recordset")
for icount=0 to 40
if not request.form("sel_"&icount)="" then
if not IsNumeric(request.form("sel_"&icount)) then
   Response.write "<script language=JavaScript>alert('非法操作!');history.back()</script>"
   response.end
else
id=request.form("sel_"&icount)
hx66_order=request.form("hx66_"&icount)
end if
sqlstr="select * from hx66_bbsid where id="&id
rs.open sqlstr,conn,1,3
if not rs.eof then
   if request("hx66_action")="更新排列次序" then
      rs("hx66_order")=hx66_order
      rs.update
   end if
end if
rs.close
end if
next
set rs=nothing
response.redirect "?type=6&bid="&bid
response.end
end sub

sub add_bbs()
dim bbscss,Grade,admin,bbsid,title,dis,hx66_ziduan
bbscss=request.form("css")
Grade=request.form("Grade")
admin=htmlencode(restr(request.form("admin")))
bbsid=request.form("hx66_bbsid")
title=htmlencode(restr(request.form("title")))
dis=htmlencode(restr(request.form("dis")))
hx66_ziduan=request.form("ziduan")
if not IsNumeric(bbscss) or bbscss="" then
   Response.write "<script language=JavaScript>alert('样式必须是数字!');history.back()</script>"
   response.end
else
bbscss=clng(bbscss)
end if
if admin="" or title="" then
   Response.write "<script language=JavaScript>alert('版块标题和超级版主(主版主)不能为空!');history.back()</script>"
   response.end
end if
dim newbbsid
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_bbsinfo"
rs.open sqlstr,conn,1,3
rs.addnew
rs("hx66_bbstitle")=title
rs("hx66_bbsskin")=bbscss
rs("hx66_bbsdis")=dis
rs("hx66_bbsopcl")=0
rs("hx66_Grade")=Grade
rs("hx66_bbsid")=bbsid
rs("hx66_ziduan")=hx66_ziduan
rs.update
newbbsid=rs("id")
rs.close
sqlstr="select * from hx66_admin"
rs.open sqlstr,conn,1,3
rs.addnew
rs("hx66_name")=admin
rs("hx66_bid")=newbbsid
rs("hx66_bidadmin")=1
rs.update
rs.close
set rs=nothing
response.write "<script language=JavaScript>alert('新的版块添加成功!');window.location.href = '?type=1'</script>"
response.end
end sub

⌨️ 快捷键说明

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