📄 admin_boardset.asp
字号:
rs.movenext
loop
rs.close
%></table>
<%
end sub
sub edit()
%>
<form action="admin_boardset.asp?action=updat&id=<%=request("id")%>" method=post>
<TABLE cellPadding=1 cellSpacing=1 class=tableborder1 align=center style="width:96%;word-break:break-all;">
<tr><td valign=top align=right class=tablebody1>发布版面:
</td>
<td class=tablebody1>
<%
dim sel
sql="select boardid,boardtype from board"
rs.open sql,conn,1,1
%>
<select name="boardid" size="1">
<option value="0" <%if request("boardid")=0 then%>selected<%end if%>>论坛首页</option>
<%
do while not rs.eof
if Clng(request("boardid"))=Clng(rs("boardid")) then
sel="selected"
else
sel=""
end if
response.write "<option value='"+CStr(rs("BoardID"))+"' "&sel&">"+rs("Boardtype")+"</option>"+chr(13)+chr(10)
rs.movenext
loop
rs.close
%>
</select>
</td></tr>
<%
sql="select * from bbsnews where id="&cstr(request("id"))
rs.open sql,conn,1,1
%>
<tr><td width="20%" valign=top align=right class=tablebody1>
发布人:
</td>
<td width="80%" class=tablebody1><input type=text name=username size=36 value=<%=rs("username")%>></td></tr>
<tr><td width="20%" valign=top align=right class=tablebody1>
标题:
</td>
<td width="80%" class=tablebody1><input type=text name=title size=60 value=<%=rs("title")%>></td></tr>
<tr><td width="20%" valign=top align=right class=tablebody1>
内容:
</td>
<td width="80%" class=tablebody1><textarea cols=60 rows=6 name="content">
<%
content=replace(rs("content"),"<br>",chr(13))
content=replace(content," "," ")
response.write ""&content&""
rs.close
%>
</textarea></td>
</tr>
<tr><td width="100%" valign=top colspan="2" align=center class=tablebody2>
<input type=Submit value="修 改" name=Submit"> <input type="reset" name="Clear" value="清 除">
</td></tr>
</table>
</form>
<%
end sub
sub update()
dim username,title,content
dim caneditann
caneditann=false
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(25))=1 then
caneditann=true
else
caneditann=false
end if
if not caneditann then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
exit sub
end if
if request("id")="" or not isnumeric(request("id")) then
Errmsg=Errmsg+"<br><li>请选择正确的公告。"
founderr=true
exit sub
end if
if request("boardid")<>"" or (not isInteger(request("boardid"))) then
boardid=clng(request("boardid"))
else
Errmsg=Errmsg+"<br><li>请选择正确的论坛。"
founderr=true
exit sub
end if
if request("username")="" then
Errmsg=Errmsg+"<br>"+"<li>请输入发布者。"
founderr=true
else
username=checkstr(request("username"))
end if
if request("title")="" then
Errmsg=Errmsg+"<br>"+"<li>请输入新闻标题。"
founderr=true
else
title=checkstr(request("title"))
end if
if request("content")="" then
Errmsg=Errmsg+"<br>"+"<li>请输入新闻内容。"
founderr=true
else
content=checkstr(request("content"))
end if
if founderr=true then
call dvbbs_error()
else
sql="select * from bbsnews where id="&cstr(request("id"))
rs.open sql,conn,1,3
rs("username")=username
rs("title")=title
rs("content")=content
rs("addtime")=Now()
rs("boardid")=boardid
rs.update
rs.close
myCache.name="AnnounceMents"&BoardID
myCache.makeEmpty
call success()
end if
end sub
sub del()
dim caneditann
caneditann=false
if (master or superboardmaster or boardmaster) and Cint(GroupSetting(26))=1 then
caneditann=true
else
caneditann=false
end if
if not caneditann then
Errmsg=Errmsg+"<br><li>您没有执行此操作的权限。"
founderr=true
exit sub
end if
if request("id")="" and not isnumeric(request("id")) then
Errmsg=Errmsg+"<br><li>请选择正确的公告。"
founderr=true
exit sub
end if
dim delid
delid=replace(request("id"),"'","")
conn.execute("delete from bbsnews where id in ("&delid&")")
myCache.name="AnnounceMents"&BoardID
myCache.makeEmpty
call success()
end sub
sub success()
%><br><br>
成功:新闻操作
<%
end sub
sub editbminfo()
dim master_1
%><form action ="admin_boardset.asp?action=saveditbm&boardid=<%=boardid%>" method=post>
<%
set rs= server.CreateObject ("adodb.recordset")
sql = "select * from board where boardid="+CSTr(boardid)
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br>"+"<li>您没有指定相应论坛ID,不能进行管理。"
call dvbbs_error()
exit sub
end if
if not master then
if Board_Setting(33)=1 then
master_1=split(rs("boardmaster"),"|")
if membername<>master_1(0) then
Errmsg=Errmsg+"<br>"+"<li>本项功能为主版主专用。"
call dvbbs_error()
exit sub
end if
else
Errmsg=Errmsg+"<br>"+"<li>您未有修改设置的权限。"
call dvbbs_error()
exit sub
end if
end if
%>
<input type='hidden' name=editid value='<%=boardid%>'>
<TABLE cellPadding=1 cellSpacing=1 class=tableborder1 align=center style="width:96%;word-break:break-all;">
<tr>
<th width="20%" height=22 class=tablebody2><b>字段名称:</b> </td>
<th >
<div align="center"><b>变量值:</b></div>
</th>
</th>
<tr>
<td height=22 class=tablebody1 align="center">论坛名称:</td>
<td class=tablebody1>
<input type="text" name="boardtype" size="30" value='<%=htmlencode(rs("boardtype"))%>'>
</td>
</tr>
<tr>
<td height=22 class=tablebody2 align="center">版面说明:</td>
<td class=tablebody1>
<input type="text" name="readme" size="60" value='<%=htmlencode(rs("readme"))%>'>
</td>
</tr>
<tr>
<td height=22 class=tablebody1 align="center">版主修改:</td>
<td class=tablebody1>
<input type="text" name="boardmaster" size="30" value='<%=rs("boardmaster")%>'>(多版主添加请用|分隔,如:沙滩小子|wodeail)
</td>
</tr>
<tr>
<td height=22 class=tablebody2> </td>
<td class=tablebody2>
<input type="submit" name="Submit" value="提交">
</td>
</tr>
</table>
</form>
<%
rs.close
end sub
sub savebminfo()
dim rname
dim readme,boardtype,boardmaster
if request("boardid")<>"" or (not isInteger(request("boardid"))) then
boardid=clng(request("boardid"))
else
Errmsg=Errmsg+"<br><li>请选择正确的论坛。"
founderr=true
exit sub
end if
readme=checkStr(Request.form("readme"))
boardtype=checkStr(Request.form("boardtype"))
boardmaster=checkStr(Request.form("boardmaster"))
if readme="" then
Errmsg=Errmsg+"<br>"+"<li>请输入论坛简介。"
founderr=true
end if
if boardtype="" then
Errmsg=Errmsg+"<br>"+"<li>请输入论坛名称。"
founderr=true
end if
if boardmaster="" then
Errmsg=Errmsg+"<br>"+"<li>请输入管理成员。"
founderr=true
end if
if founderr=true then
call dvbbs_error()
exit sub
end if
rname=split(boardmaster,"|")
for i=0 to ubound(rname)
sql="select top 1 username from [user] where username='"&replace(rname(i),"'","")&"'"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
founderr=true
errmsg=errmsg+"<br>"+"<li>论坛没有这个用户,不能添加为版主"
exit sub
exit for
end if
set rs=nothing
next
set rs=server.createobject("adodb.recordset")
sql = "select * from board where boardid="+Cstr(request("boardid"))
rs.open sql,conn,1,3
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br>"+"<li>您没有指定相应论坛ID,不能进行管理。"
call dvbbs_error()
exit sub
end if
rs("boardmaster") = boardmaster
rs("readme") = readme
rs("boardtype")=boardtype
rs.Update
rs.Close
response.write "<p>论坛修改成功!"
end sub
sub editbmset()
dim chkedit
dim master_1
chkedit=false
set rs=conn.execute("select boardmaster from board where boardid="&request("boardid"))
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br>"+"<li>您没有指定相应论坛ID,不能进行管理。"
call dvbbs_error()
exit sub
end if
if isnull(rs(0)) then
Errmsg=Errmsg+"<br>"+"<li>本论坛还未有管理员。"
call dvbbs_error()
exit sub
end if
master_1=split(rs(0),"|")
if Board_Setting(35)=1 then
chkedit=true
else
if Board_Setting(34)=0 then
chkedit=false
elseif Board_Setting(34)=1 and membername=master_1(0) then
chkedit=true
else
chkedit=false
end if
end if
if master then
chkedit=true
end if
if chkedit=false then
Errmsg=Errmsg+"<br>"+"<li>本项功能为主版主专用。 "
call dvbbs_error()
else
%>
<form method="POST" action=admin_boardset.asp?action=savebmset&boardid=<%=request("boardid")%>>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -