<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="conn.asp"-->

<%'=============================
call head()
Call cardgame("球彩投注管理员设置",yanse12)

if keys<>1 and keys<>2 then
call error("站长ID1权限！")
end if
dim newballadmin,balladminmsg
newballadmin=request("balladmin")
balladminmsg=request("balladminmsg")
TP=request("TP")
if TP<>"" then

if newballadmin="" then
  Call Error("系统管理员不能为空！")
  end if
if balladminmsg="" or IsNumeric(balladminmsg)=False then
  Call Error("内线管理员不能为空！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select ID from users where id="&balladminmsg,conn,1,1
if rs.eof then
  Call Error("内线管理员ID不存在！")
  end if
rs.close
set rs=nothing

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select balladmin,adminmsg from YD_all where id=1",ydzqconn,1,2
rs("balladmin")=newballadmin
rs("adminmsg")=balladminmsg
rs.update
rs.close
set rs=nothing
response.write"编辑成功！<br/>"
else
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select balladmin,adminmsg from yd_all where id=1",ydzqconn,1,1
if saytk<>1 then
Response.write "<form name=""form"" method=""post"" action=""admin_config2.asp?sid="&sid&"&amp;saytk="&saytk&""">"
 Response.Write "管理员ID:(多个ID之间用,分开)"
 Response.Write "<input name=""balladmin"" value="""&rs("balladmin")&"""/><br/>"
 Response.Write "内线管理员ID:"
 Response.Write "<input name=""balladminmsg"" value="""&rs("adminmsg")&"""/><br/>"
else
 Response.Write "管理员ID:(多个ID之间用,分开)"
 Response.Write "<input name=""balladmin"&tt&""" value="""&rs("balladmin")&"""/><br/>"
 Response.Write "内线管理员ID:"
 Response.Write "<input name=""balladminmsg"&tt&""" value="""&rs("adminmsg")&"""/><br/>"
end if
rs.close
set rs=nothing

conn.close
set conn=nothing
ydzqconn.close
set ydzqconn=nothing
if saytk<>1 then
response.write "<input type=""hidden"" name=""tp"" value=""ok""/>"
response.write "<input type=""submit"" name=""Submit"" value=""提交设置""></form><br/>"
else
Response.Write "<anchor>[提交设置]"
Response.Write "<go href=""admin_config2.asp?sid="&sid&"&amp;saytk="&saytk&""" method=""post"" accept-charset='utf-8'>"
Response.Write "<postfield name=""balladmin"" value=""$(balladmin"&tt&")""/>"
Response.Write "<postfield name=""balladminmsg"" value=""$(balladminmsg"&tt&")""/>"
Response.Write "<postfield name=""TP"" value=""ok""/>"
Response.Write "</go></anchor><br/>"
end if
end if
%>
---------------
<!--#include file="fanhui2.asp"-->
<%call headsay()%>