<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<%call head()
Call saycardc(""&zonene&"")

dim ID,nam,yc,oopp,adminusid,grouptxt,groupkf,zonejb
ID=request("id")
nam=request("nam")
oopp=clng(request("oopp"))
adminusid=request("adminusid")
grouptxt=request("grouptxt")
yc=clng(request("yc"))
groupkf=clng(request("groupkf"))
zonejb=clng(request("zonejb"))
if ID="" or IsNumeric(ID) = False then
  Call Error("ID无效！")
end if
if adminusid="" or IsNumeric(adminusid) = False then
  Call Error("管理ID无效！")
end if

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

if grouptxt="" then
  Call Error("简介不能为空！")
end if
if len(nam)>10 then
  Call Error(""&zonene&"名称最多10字！")
end if
if len(grouptxt)>200 then
  Call Error(""&zonene&"简介最多200字！")
end if


set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from ydbbs where ID="&ID,conn,1,2

rs("name")=nam
rs("yc")=yc
rs("oopp")=oopp
rs("groupkf")=groupkf
rs("grouptxt")=grouptxt
rs("adminusid")=adminusid
rs("zonejb")=zonejb
rs.update
rs.close
set rs=nothing
conn.Execute("update Users set adminzone=0 Where adminzone=" & id)

conn.Execute("update Users set adminzone="&ID&" Where id=" & adminusid)


conn.close
set conn=nothing

response.write"成功编辑"&zonene&"<br/>"

response.write"----------<br/>"

response.write"<a href=""adminbbs.asp?sid="&sid&"&amp;saytk="&saytk&""">["&zonene&"管理]</a>"
%><!--#include file="fanhui.asp"-->
<%response.write""
call headsay()%>
