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

📄 admin_boardaset.asp

📁 生活者姿态整站程序 生活者姿态整站程序 生活者姿态整站程序
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file=inc/char.asp-->
<!--#include file=inc/theme.asp-->
<!--#include file=chkuser.asp-->
<%
	stats="斑竹管理页面"
	dim rsactiveusers,activeuser
	dim sql,rs
	dim sql1,rs1
	dim id,boardid,rootid
	dim Maxid
	if founduser=false then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请登陆后进行操作。"
	end if
	if request("boardid")="" then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请指定论坛版面。"
	elseif not isInteger(request("boardid")) then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>非法的版面参数。"
	else
		boardid=request("boardid")
		if chkboardmaster(boardid)=false then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>您不是该版面斑竹或者系统管理员。"
		end if
	end if
	call nav()
	call headline(1)
	if founderr=true then
		call error()
	else
	dim title
	dim content
	set rs=server.createobject("adodb.recordset")
	call main()
	end if
	set rs=nothing
	call endline()
	sub main()
%>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebackcolor%> align=center>
  <tr>
    <td>
      <table cellpadding=3 cellspacing=1 border=0 width=100%>
        <tr bgcolor='<%=Tabletitlecolor%>'>
          <td align=center colspan="2"><font color="<%=TablefontColor%>">欢迎<b> <%=htmlencode(membername)%></b>进入版主管理页面</font></td>
        </tr>
            <tr bgcolor=<%=tablebodycolor%>>
              <td width="30%" valign=top><font color="<%=TableContentColor%>">
&nbsp;&nbsp;注意:各个版面版主可以在自己版面自由发布公告和版面设置,管理员可以在所有版面发布,并对信息进行管理操作。
<br><BR>
版主管理选项:<BR>
主版主可增删副版主:<%if bmflag_1=1 then%>打开<%else%>关闭<%end if%><BR>
主版主可修改颜色配置:<%if bmflag_2=1 then%>打开<%else%>关闭<%end if%><BR>
主版主可更改论坛使用设置:<%if bmflag_3=1 then%>打开<%else%>关闭<%end if%><BR>
所有版主均可修改颜色配置:<%if bmflag_4=1 then%>打开<%else%>关闭<%end if%><BR>
所有版主均可更改论坛设置:<%if bmflag_5=1 then%>打开<%else%>关闭<%end if%><BR>
</font>
	      </td>
              <td width="70%" valign=top>
<font color="<%=TableContentColor%>">
      		<table cellpadding=0 cellspacing=0 border=0 width=100% align=center>
		  <tr>
			<td width="100%" height=24 bgcolor=<%=aTableTitlecolor%>>
<font color="<%=TableContentColor%>">
<B>注意</B>:<BR>本页面为版主专用,使用前请看左边相对应的功能是否打开,在进行管理设置的时候,不要随意更改设置,如需更改,必须填写完整或者正确的填写。<BR>
        <b>管理选项:<a href=admin_boardaset.asp?boardid=<%=boardid%>><font color="<%=TableContentColor%>">论坛公告发布</font></a>
        <%if master then%>
        | <b><a href=admin_boardaset.asp?action=manage&boardid=<%=boardid%>><font color="<%=TableContentColor%>">公告管理</font></a>
        <%end if%> | 
		<a href=admin_boardaset.asp?action=editbminfo&boardid=<%=boardid%>><font color="<%=TableContentColor%>">基本信息管理</font></a> | 
		<a href=admin_boardaset.asp?action=editbmset&boardid=<%=boardid%>><font color="<%=TableContentColor%>">基本设置管理</font></a> | 
		<a href=admin_boardaset.asp?action=editbmcolor&boardid=<%=boardid%>><font color="<%=TableContentColor%>">颜色设置管理</font></a></b></font>
		  </td></tr>
		</table>
<%
	select case request("action")
	case "new"
		call savenews()
	case "manage"
		call manage()
	case "edit"
		call edit()
	case "update"
		call update()
	case "del"
		call del()
	case "editbminfo"
		call editbminfo()
	case "savebminfo"
		call savebminfo()
	case "editbmset"
		call editbmset()
	case "savebmset"
		call savebmset()
	case "editbmcolor"
		call editbmcolor()
	case "savebmcolor"
		call savebmcolor()
	case else
	call news()
	end select
%></font>
	      </td>
            </tr>
        </table>
        </td>
    </tr>
</table>
<%
end sub

sub news()
%>
<form action="admin_boardaset.asp?action=new" method=post name=FORM>
      		
  <table cellpadding=0 cellspacing=0 border=0 width=100% align=center>
    <tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">发布版面: </font></div>
      </td>
      <td width="80%"> 
        <%if master then%>
        <%
   sql="select boardid,boardtype from board"
   rs.open sql,conn,1,1
%>
        <select name="boardid" size="1">
          <option value="0">论坛首页</option>
          <%
	do while not rs.eof
        response.write "<option value='"+CStr(rs("BoardID"))+"'>"+rs("Boardtype")+"</option>"+chr(13)+chr(10)
	rs.movenext
	loop
	rs.close
%>
        </select>
        <%else%>
        <%
	sql="select boardtype from board where boardid="&boardid
	rs.open sql,conn,1,1
	boardtype=rs("boardtype")
%>
        <select name="boardid" size="1">
          <option value="<%=boardid%>"><%=boardtype%></option>
        </select>
        <%end if%>
      </td>
    </tr>
    <tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">发布人: </font></div>
      </td>
      <td width="80%">
        <input type=text name=username size=36 value="<%=membername%>" disabled>
        <input type=hidden name=username value="<%=membername%>">
      </td>
    </tr>
    <tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">标题: </font></div>
      </td>
      <td width="80%">
        <input type=text name=title size=36>
      </td>
    </tr>
    <tr> 
      <td width="20%" valign=top> 
        <div align="center"><font color="<%=TableContentColor%>">内容: </font></div>
      </td>
      <td width="80%">
        <textarea cols=35 rows=6 name="content"></textarea>
      </td>
    </tr>
    <tr>
      <td width="100%" valign=top colspan="2" align=center> 
        <input type=Submit value="发 送" name=Submit">
        &nbsp; 
        <input type="reset" name="Clear" value="清 除">
      </td>
    </tr>
  </table>
</form>
<%
end sub

sub savenews()
	if request("boardid")<>"" then
		boardid=request("boardid")
	else
		Errmsg=Errmsg+"<br>"+"<li>您输入了错误的参数。"
		founderr=true
	end if
	if request("username")="" then
		Errmsg=Errmsg+"<br>"+"<li>请输入发布者。"
		founderr=true
	else
		username=request("username")
	end if
	if request("title")="" then
		Errmsg=Errmsg+"<br>"+"<li>请输入新闻标题。"
		founderr=true
	else
		title=request("title")
	end if
	if request("content")="" then
		Errmsg=Errmsg+"<br>"+"<li>请输入新闻内容。"
		founderr=true
	else
		content=request("content")
	end if
	if founderr=true then
		call error()
	else
		sql="select * from bbsnews"
		rs.open sql,conn,1,3
		rs.addnew
		rs("username")=username
		rs("title")=title
		rs("content")=content
		rs("addtime")=Now()
		rs("boardid")=boardid
		rs.update
		rs.close
		call success()
	end if
end sub

sub manage()
	if master=false then
	exit sub
	end if
	sql="select * from bbsnews"
	rs.open sql,conn,1,1
%>
      		<table cellpadding=0 cellspacing=0 border=0 width=100% align=center>
		  <tr><td width="80%" valign=top height=22>
<font color="<%=TableContentColor%>">标题</font>
		  </td>
		  <td width="20%">
<font color="<%=TableContentColor%>">操作</font>
		  </td></tr>
<%do while not rs.eof%>
		  <tr><td width="80%" valign=top height=22><a href=admin_boardaset.asp?action=edit&id=<%=rs("id")%>&boardid=<%=rs("boardid")%>><font color="<%=TableContentColor%>"><%=rs("title")%></font></a>
		  </td>
		  <td width="20%"><a href=admin_boardaset.asp?action=del&id=<%=rs("id")%>&boardid=<%=boardid%>><font color="<%=TableContentColor%>">删除</font></a>
		  </td></tr>
<%
	rs.movenext
	loop
	rs.close
%></table>
<%
end sub

sub edit()
%>
<form action="admin_boardaset.asp?action=update&id=<%=request("id")%>" method=post>
      		<table cellpadding=0 cellspacing=0 border=0 width=100% align=center>
		  <tr><td width="20%" valign=top>
<font color="<%=TableContentColor%>">发布版面:</font>
		  </td>
		  <td width="80%">
<%
	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 Cint(request("boardid"))=Cint(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>
<font color="<%=TableContentColor%>">发布人:</font>
		  </td>
		  <td width="80%"><input type=text name=username size=36 value=<%=rs("username")%>></td></tr>
		  <tr><td width="20%" valign=top>
<font color="<%=TableContentColor%>">标题:</font>
		  </td>
		  <td width="80%"><input type=text name=title size=36 value=<%=rs("title")%>></td></tr>
		  <tr><td width="20%" valign=top>
<font color="<%=TableContentColor%>">内容:</font>
		  </td>
		  <td width="80%"><textarea cols=35 rows=6 name="content">
<%
	    content=replace(rs("content"),"<br>",chr(13))
            content=replace(content,"&nbsp;"," ")
            response.write ""&content&""
	    rs.close
%>

⌨️ 快捷键说明

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