<!--#include file="inc.asp"-->
<!--#include file="conn.asp"-->
<card title="球彩投注设置"><p>
<%
dim votename,HaContent,bigpay,smallpay,newfortime
votename=request("votename")
HaContent=request("HaContent")
bigpay=request("bigpay")
smallpay=request("smallpay")
newfortime=request("fortime")

TP=request("TP")
if TP<>"" then

if votename="" then
  Call Error("系统名称不能为空！")
  end if
if len(votename)>30 then
  Call Error("系统名称最多30字！")
  end if
  
if HaContent="" then
  Call Error("欢迎语不能为空！")
  end if
if len(HaContent)>15 then
  Call Error("欢迎语最多15字！")
  end if
  
if bigpay="" or IsNumeric(bigpay)=False then
  Call Error("最大投注额应该是数字形式！")
  end if
if smallpay="" or IsNumeric(smallpay)=False then
  Call Error("最小投注额应该是数字形式！")
  end if

  if newfortime="" or IsNumeric(newfortime)=False then
  Call Error("分钟应该是数字形式！")
  end if
  
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from YD_all where id=1",ydzqconn,1,2
rs("votename")=votename
rs("HaContent")=HaContent
rs("bigpay")=bigpay
rs("smallpay")=smallpay
rs("fortime")=newfortime
rs.update
rs.close
set rs=nothing
response.write"编辑成功！<br/>"
else
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from yd_all where id=1",ydzqconn,1,1
 Response.Write "系统名称:"
 Response.Write "<input name=""votename"&tt&""" value="""&rs("votename")&"""/><br/>"
 Response.Write "欢迎语:"
 Response.Write "<input name=""HaContent"&tt&""" value="""&rs("HaContent")&"""/><br/>"

 Response.Write "最大投注额"
 Response.Write "<input name=""bigpay"&tt&""" value="""&rs("bigpay")&"""/><br/>"
 Response.Write "最小投注额"
 Response.Write "<input name=""smallpay"&tt&""" value="""&rs("smallpay")&"""/><br/>"
 Response.Write "开奖前"
 Response.Write "<input name=""fortime"&tt&""" value="""&rs("fortime")&""" size=""5""/>分钟停止下注<br/>"
 
rs.close
set rs=nothing

conn.close
set conn=nothing
ydzqconn.close
set ydzqconn=nothing
Response.Write "<anchor>[提交设置]"
Response.Write "<go href=""admin_config.asp?saytk="&saytk&"&amp;sid="&sid&""" method=""post"" accept-charset='utf-8'>"
Response.Write "<postfield name=""votename"" value=""$(votename"&tt&")""/>"
Response.Write "<postfield name=""HaContent"" value=""$(HaContent"&tt&")""/>"
Response.Write "<postfield name=""smallpay"" value=""$(smallpay"&tt&")""/>"
Response.Write "<postfield name=""bigpay"" value=""$(bigpay"&tt&")""/>"
Response.Write "<postfield name=""fortime"" value=""$(fortime"&tt&")""/>"
Response.Write "<postfield name=""TP"" value=""ok""/>"
Response.Write "</go></anchor><br/>"
end if
%>
---------------
<!--#include file="fanhui.asp"-->
</p></card>
</wml>