<!--#include file="inc.asp"-->
<!--#include file="conn.asp"-->
<card title="球彩投注管理员设置"><p>
<%

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
 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/>"
rs.close
set rs=nothing

conn.close
set conn=nothing
ydzqconn.close
set ydzqconn=nothing
Response.Write "<anchor>[提交设置]"
Response.Write "<go href=""admin_config2.asp?saytk="&saytk&"&amp;sid="&sid&""" 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
%>
---------------
<!--#include file="fanhui.asp"-->
</p></card>
</wml>