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

📄 admin_board.asp

📁 生活者姿态整站程序 生活者姿态整站程序 生活者姿态整站程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file=inc/char.asp-->
<!--#include file=chkuser.asp-->
<title><%=ForumName%>--管理页面</title>
<link rel="stylesheet" type="text/css" href="forum.css">

<BODY <%=ForumBody%>>
<%
	dim str

	if instr(session("flag"),"01")=0 then
		Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
		call Error()
	else
		call main()
		conn.close
		set conn=nothing
	end if

	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><font color="<%=TablefontColor%>">欢迎<b><%=membername%></b>进入管理中心</font>
        </td>
        </tr>
            <tr bgcolor=<%=tablebodycolor%>>
          <td width="100%" valign=top> <font color="<%=TableContentColor%>">
            <table width="100%" border="0" cellspacing="3" cellpadding="0">
              <tr>
                <td><font color="<%=TableContentColor%>">1.注意事项: 在下面,您将看到目前所有的论坛分类。您可以编辑论坛分类名或是增加一个新的论坛到这个分类中。 也可以编辑或删除目前存在的论坛。您可以对目前的分类重新进行排列。 
                   <p><font color=<%=AlertFontColor%>>2.特别注意</font>:删除论坛同时将删除该论坛下所有帖子!删除分类同时删除下属论坛和其中帖子! 操作时请完整填写表单信息。</font>
                </td>
              </tr>
              <tr>
              <td>
              <p align=cetner><b><a href=admin_board.asp><font color="<%=TableContentColor%>">论坛管理</font></a> | <a href="admin_board.asp?action=addclass"><font color="<%=TableContentColor%>">新建论坛分类</font></a></p>
              </td>
              <tr>
            </table>
<%
if Request("action") = "add" then
	call add()
elseif Request("action") = "edit" then
	call edit()
elseif request("action") = "savenew" then
	call savenew()
elseif request("action") = "savedit" then
	call savedit()
elseif request("action") = "del" then
	call del()
elseif request("action") = "orders" then
	call orders()
elseif request("action") = "updateorders" then
	call updateorders()
elseif request("action") = "addclass" then
	call addclass()
elseif request("action") = "saveclass" then
	call saveclass()
elseif request("action") = "del1" then
	call del1()
elseif request("action") = "mode" then
	call mode()
elseif request("action") = "savemod" then
	call savemod()
else
	call boardinfo()
end if
end sub

sub add()
%>
 <form action ="admin_board.asp?action=savenew" method=post>
<%
	set rs = server.CreateObject ("Adodb.recordset")
	sql="select Max(boardid) from board"
	rs.open sql,conn,1,1
	boardnum=rs(0)+1
	rs.close
%><B>论坛其它设置请添加论坛后在论坛版面管理首页点击相应连接</B>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor=<%=aTableTitlecolor%>> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><b>说明</b> </td>
<td width="48%"><font color="<%=TableContentColor%>"><b>内容</b> </td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>论坛序号</B><BR>注意不能和别的论坛序号相同</font></td>
<td width="48%"> 
<input type="text" name="newboardid" size="24" value=<%=boardnum+1%>>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>论坛名称</B></font></td>
<td width="48%"> 
<input type="text" name="boardtype" size="24">
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>所属类别</B></font></td>
<td width="48%"> 
<select name=class>
<%
	sql = "select * from class"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "<option value=>请先添加类别"
	else
	do while not rs.EOF
%>
<option value=<%=rs("id")%>><%=rs("class")%> 
<%
	rs.MoveNext 
	loop
	end if
	rs.Close 
%>
</select>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>版面说明</B></font></td>
<td width="48%"> 
<input type="text" name="readme" size="24">
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>论坛版主</B><BR>多版主添加请用|分隔,如:沙滩小子|wodeail</font></td>
<td width="48%"> 
<input type="text" name="boardmaster" size="24">
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>是否为隐含版面</B><BR>0表示开放,1表示隐含</font></td>
<td width="48%"> 
<select name="lockboard">
<option value="0" selected>0 
<option value="1">1 
</select>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>首页显示论坛图片</B><BR>出现在首页论坛版面介绍左边<BR>请直接填写图片URL</font></td>
<td width="48%"> 
<input type="text" name="indexIMG" size="35" value="">
</td>
</tr>
<tr bgcolor="<%=atabletitlecolor%>"> 
<td width="52%" height=24>&nbsp;</td>
<td width="48%"> 
<input type="submit" name="Submit" value="添加论坛">
</td>
</tr>
</table>
</form>
<%
set rs=nothing
end sub

sub edit()
%>
 <form action ="admin_board.asp?action=savedit" method=post>           
<%
set rs_c= server.CreateObject ("adodb.recordset")
sql = "select * from class"
rs_c.open sql,conn,1,1
set rs= server.CreateObject ("adodb.recordset")
sql = "select * from board where boardid="+CSTr(request("editid"))
rs.open sql,conn,1,1
%>            
<input type='hidden' name=editid value='<%=Request("editid")%>'>
<B>论坛其它修改设置请在论坛版面管理首页点击相应连接</B>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor=<%=aTableTitleColor%>> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><b>说明</b> </font></td>
<td width="48%"> 
<div align="center"><font color="<%=TableContentColor%>"><b>内容</b></font></div>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>论坛序号</B><BR>注意不能和别的论坛序号相同</font></td>
<td width="48%"> 
<input type="text" name="newboardid" size="3"  value = '<%=rs("boardid")%>'>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>论坛名称</B></font></td>
<td width="48%"> 
<input type="text" name="boardtype" size="24"  value = '<%=rs("boardtype")%>'>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>所属类别</B></font></td>
<td width="48%"> 
<select name=class>
<% do while not rs_c.EOF%>
<option value=<%=rs_c("id")%> <% if cint(rs("class")) = rs_c("id") then%> selected <%end if%>><%=rs_c("class")%> 
<%
rs_c.MoveNext 
loop
rs_c.Close 
%>
</select>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>版面说明</B></font></td>
<td width="48%"> 
<input type="text" name="readme" size="24" value='<%=rs("readme")%>'>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>论坛版主</B><BR>多斑竹添加请用|分隔,如:沙滩小子|wodeail</font></td>
<td width="48%"> 
<input type="text" name="boardmaster" size="24"  value='<%=rs("boardmaster")%>'>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>是否为隐含版面</B><BR>0表示开放,1表示隐含</font></td>
<td width="48%"> 
<select name="lockboard">
<option value="0" <%if rs("lockboard")=0 then%>selected<%end if%>>0 
<option value="1" <%if rs("lockboard")=1 then%>selected<%end if%>>1 
</select>
</td>
</tr>
<tr> 
<td width="52%" height=24><font color="<%=TableContentColor%>"><B>首页显示论坛图片</B><BR>出现在首页论坛版面介绍左边<BR>请直接填写图片URL</font></td>
<td width="48%">
<input type="text" name="indexIMG" size="35" value="<%=rs("indexIMG")%>">
</td>
</tr>
<tr bgcolor=<%=aTableTitleColor%>> 
<td width="52%" height=24>&nbsp;</td>
<td width="48%"> 
<input type="submit" name="Submit" value="提交修改">
</td>
</tr>
</table>
</form>
<%
rs.close
end sub
sub mode()
%>
 <form action ="admin_board.asp?action=savemod" method=post>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr bgcolor=<%=aTableTitlecolor%>> 
<td width="52%" height=22><font color="<%=TableContentColor%>"><b>说明:</b> </font></td>
<td width="48%"><font color="<%=TableContentColor%>"><b>操作:</b> </font></td>
</tr>
<tr> 
<td width="52%" height=22><font color="<%=TableContentColor%>"><B>论坛名称</B></td>
<td width="48%"> <font color="<%=TableContentColor%>">
<%
set rs= server.CreateObject ("adodb.recordset")
sql="select boardid,boardtype,boarduser,boardskin from board where boardid="&request("boardid")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "该版面并不存在。"
else
response.write rs(1)
response.write "<input type=hidden value="&rs(0)&" name=boardid>"
boarduser=rs(2)
boardskin=rs(3)
end if
rs.close
set rs=nothing
%></font>
</td>
</tr>
<tr> 
<td width="52%"><font color="<%=TableContentColor%>"><B>论坛类型</B>:<br>
常规论坛:允许会员发贴回帖,所有用户可浏览<BR>
正规论坛:允许会员发贴回帖,登陆用户可浏览<BR>
开放论坛:所有用户可发贴回帖浏览<BR>
评论论坛:版主和总版主可发贴回帖,一般会员可回帖浏览<BR>
认证论坛:总版主可发贴回帖,其他所有会员需经过总版主认证<BR>
精华论坛:只有版主和总版主可操作</font>
</td>
<td width="48%" valign=top> 
<select name="boardskin" size=1>
<option value=1 <%if boardskin=1 then%> selected <%end if%>>常规论坛</option>
<option value=6 <%if boardskin=6 then%> selected <%end if%>>正规论坛</option>
<option value=2 <%if boardskin=2 then%> selected <%end if%>>开放论坛</option>
<option value=3 <%if boardskin=3 then%> selected <%end if%>>评论论坛</option>
<option value=5 <%if boardskin=5 then%> selected <%end if%>>认证论坛</option>
<option value=4 <%if boardskin=4 then%> selected <%end if%>>精华论坛</option>
</select>
</td>
</tr>
<tr> 
<td width="52%"><font color="<%=TableContentColor%>"><B>认证用户</B>:<br>
只有设定为认证论坛的论坛需要填写能够进入该版面的用户,每输入一个用户请确认用户名在论坛中存在,每个用户名用<B>回车</B>分开</font>
</td>
<td width="48%"> 
<textarea cols=35 rows=6 name="vipuser">
<%
if not isnull(boarduser) or boarduser<>"" then
	response.write replace(boarduser,",",chr(10))
end if
%>
</textarea>
</td>
</tr>
<tr bgcolor="<%=atabletitlecolor%>"> 
<td width="52%" height=22>&nbsp;</td>
<td width="48%"> 
<input type="submit" name="Submit" value="设定">
</td>
</tr>
</table>
</form>
<%
end sub

sub savemod()
on error resume next
set rs= server.CreateObject ("adodb.recordset")
sql="select boardskin,boarduser from board where boardid="&request("boardid")
rs.open sql,conn,1,3
rs("boardskin")=request("boardskin")
response.write "<p>论坛设置成功!<br><br>"
if cint(request("boardskin"))=5 then
	if trim(request("vipuser"))<>"" or not isnull(request("vipuser")) then
	boarduser=request("vipuser")
	boarduser=split(boarduser,chr(13)&chr(10))
	for i = 0 to ubound(boarduser)
	if not (boarduser(i)="" or boarduser(i)=" ") then
		boarduser_1=""&boarduser_1&""&boarduser(i)&","
	end if
	next
	userlen=len(boarduser_1)
	boarduser=left(boarduser_1,userlen-1)
	rs("boarduser")=boarduser
	response.write "<p>添加用户:"&boarduser&"<br><br>"
	'response.write boarduser
	'response.end
	end if
end if
rs.update
rs.close
set rs=nothing

⌨️ 快捷键说明

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