<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->


<% call head()
Call saycarda("设置")

dim ID,nam,grouptxt,groupkf,logo,action
action=request("action")
ID=request("bbsid")
if id="" then
ID=request("id")
end if
if ID="" or IsNumeric(ID) = False then
  Call Error("ID无效！")
end if

if keys=1 or adminzone=abs(id) or skey=abs(id) or keys=2 then
else
  Call Error("权限不足！")
end if

nam=request("nam")
logo=request("logo")
grouptxt=request("grouptxt")
groupkf=request(request("groupkf"))


if action="ok" then

if nam="" then
  Call Error("名称不能为空！")
end if

if grouptxt="" then
  Call Error("版文不能为空！")
end if
if len(nam)>10 then
  Call Error("论坛名称最多10字！")
end if
if len(grouptxt)>100 then
  Call Error("论坛版文最多100字！")
end if
if logo="" then logo="/IMG/lt.gif"

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from ydbbs where ID="&ID,conn,1,2
rs("name")=nam
rs("groupkf")=groupkf
rs("grouptxt")=grouptxt
rs("logo")=logo
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing

response.write"成功设置论坛"
ELSE
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select name,logo,grouptxt,groupkf from ydbbs where ID="&id,conn,1,1
if rs.eof then
  Call Error("不存在的版块！")
  end if
nam=rs("name")
grouptxt=rs("grouptxt")
groupkf=rs("groupkf")
logo=rs("logo")
rs.close
set rs=Nothing
if saytk=>2 then
	Response.write "<form name=""form"" method=""post"" action=""bbsadmin.asp?ID="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"
response.write"论坛名称:切勿更改<br/>"
response.write"<input name='nam' value='"&nam&"' title='论坛名称'/><br/>"
response.write"论坛LOGO<br/>"
response.write"<input name='logo' value='"&logo&"' title='论坛LOGO'/><br/>"
response.write"论坛版规<br/>"
response.write"<input name='grouptxt' value='"&grouptxt&"' title='论坛宣言'/><br/>"
response.write"进入权限:<select name='groupkf' value='"&groupkf&"'>"
response.write"<option value='0'>论坛开门</option>"
response.write"<option value='1'>论坛关门</option>"
response.write"</select><br/>"

response.write "<input type=""hidden"" name=""action"" value=""ok""/>"
%>

<input type="submit" name="Submit" value="确认"></form><br/><%
Else
response.write"论坛名称:切勿更改<br/>"
response.write"<input name='nam"&tt&"' value='"&nam&"' title='论坛名称'/><br/>"
response.write"论坛LOGO<br/>"
response.write"<input name='logo"&tt&"' value='"&logo&"' title='论坛LOGO'/><br/>"
response.write"论坛版文<br/>"
response.write"<input name='grouptxt"&tt&"' value='"&grouptxt&"' title='论坛版文'/><br/>"
response.write"进入权限:<select name='groupkf"&tt&"' value='"&groupkf&"'>"
response.write"<option value='0'>无权设置</option>"
response.write"<option value='1'>管理员操作项</option>"
response.write"</select><br/>"
response.write"<anchor>[确定提交]<go href='bbsadmin.asp?ID="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&"' method='post' accept-charset='utf-8'>"
response.write"<postfield name='nam' value='$(nam"&tt&")'/>"
response.write"<postfield name='logo' value='$(logo"&tt&")'/>"
response.write"<postfield name='groupkf' value='$(groupkf"&tt&")'/>"
response.write"<postfield name='grouptxt' value='$(grouptxt"&tt&")'/>"
response.write"<postfield name='action' value='ok'/>"
response.write"</go></anchor>"
end If
End if
response.write"<br/>----------<br/>"
response.write"<a href=""bbs_vip.asp?bbsid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">论坛版务</a>"
response.write"<br/><a href=""board.asp?bbsid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回论坛</a>"
%><!--#include file="fanhui.asp"-->
<%call headsay()%>