<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="conn.asp"-->
<%call head()
Call saycarda("富翁工厂设置")
%>
<%
   set rs=Server.CreateObject("ADODB.Recordset")
  rs.open"select top 1 id from users order by id",conn,1,1
if myid<>rs("id") then
call error("权限不足！")
end if
 rs.close
 set rs=nothing

dim winername,winervice,bigzu,hyin,sitein,winerin,TP,winlogo,wincent
winername=request("winername")
winervice=request("winervice")
bigzu=request("bigzu")
zucent=request("zucent")
hyin=request("hyin")
sitein=request("sitein")
winerin=request("winerin")
wincent=request("wincent")
winlogo=request("winlogo")
zhunum=request("zhunum")
zhucent=request("zhucent")
Isopen=request("Isopen")
TP=request("TP")
if TP<>"" then

if winername="" then
  Call Error("系统名称不能为空！")
  end if
if len(winername)>30 then
  Call Error("系统名称最多30字！")
  end if

if len(winlogo)>255 then winlogo="http://"



if winervice="" then
  Call Error("欢迎语不能为空！")
  end if
if len(winervice)>30 then
  Call Error("欢迎语最多30字！")
  end if
if bigzu="" or IsNumeric(bigzu)=False then
Call Error("最大投注量无效！")
end if
  
if zucent="" or IsNumeric(zucent)=False then
Call Error("每注金额填写无效！")
end if
if wincent="" or IsNumeric(wincent)=False then
Call Error("保底币数填写无效！")
end if


if hyin="" or IsNumeric(hyin)=False then
Call Error("比例填写无效！")
end if
  
if winerin="" or IsNumeric(winerin)=False then
Call Error("比例填写无效！")
end if
if sitein="" or IsNumeric(sitein)=False then
Call Error("比例填写无效！")
end if
if zhucent="" or IsNumeric(zhucent)=False then
Call Error("开奖金额限制无效！")
end if

if zhunum="" or IsNumeric(zhunum)=False then
Call Error("开奖下注数限制无效！")
end if
if Isopen="" or IsNumeric(Isopen)=False then
Call Error("开奖限制开关选择无效！")
end if

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from wineradmin where id=1",ydzqconn,1,2
rs("winername")=winername
rs("winlogo")=winlogo
rs("winervice")=winervice
rs("bigzu")=bigzu
rs("zucent")=zucent
rs("wincent")=wincent
rs("hyin")=hyin
rs("sitein")=sitein
rs("winerin")=winerin
rs("zhunum")=zhunum
rs("zhucent")=zhucent
rs("Isopen")=Isopen
rs.update
rs.close
set rs=nothing
response.write"富翁工厂设置成功！<br/>"
else
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from wineradmin where id=1",ydzqconn,1,1
if saytk>1 then
call xlanlj("winerget.asp?sid="&sid&"&amp;saytk="&saytk&"")
 Response.Write "系统名称:"
 Response.Write "<input name=""winername"" value="""&rs("winername")&"""/><br/>"
  Response.Write "LOGO地址:"
 Response.Write "<input name=""winlogo"" value="""&rs("winlogo")&"""/><br/>"
 
 Response.Write "欢迎语:"
 Response.Write "<input name=""winervice"" value="""&rs("winervice")&"""/><br/>"
 Response.Write "是否开启开奖限制"
 Response.Write "<select name=""Isopen"" value="""&rs("Isopen")&""">"
 Response.Write "<option value=""0"">关闭</option>"
 Response.Write "<option value=""1"">开启</option>"
 Response.Write "</select><br/>"
 Response.Write "自动开奖下注数(超过此数即自动开奖)<br/>"
 Response.Write "<input name=""zhunum"" value="""&rs("zhunum")&"""/>注<br/>"
 Response.Write "自动开奖下注金额(超过此金额即自动开奖)<br/>"
 Response.Write "<input name=""zhucent"" value="""&rs("zhucent")&"""/>"&getcent&"<br/>"
 
 Response.Write "每轮下注数(超过此数即转到下轮)<br/>"
 Response.Write "<input name=""bigzu"" value="""&rs("bigzu")&"""/>注<br/>"
 
 Response.Write "每注金额<br/>"
 Response.Write "<input name=""zucent"" value="""&rs("zucent")&"""/><br/>"
 Response.Write "每场游戏保底金"
 Response.Write "<input name=""wincent"" value="""&rs("wincent")&"""/><br/>"
 
 
 Response.Write "开奖会员得币"
 Response.Write "<input name=""hyin"" value="""&rs("hyin")&"""/>%<br/>"
 
 Response.Write "系统收取税费"
 Response.Write "<input name=""sitein"" value="""&rs("sitein")&"""/>%<br/>"
 
 Response.Write "开奖游戏保底"
 Response.Write "<input name=""winerin"" value="""&rs("winerin")&"""/>%<br/>"
  Response.Write "以上三项百分数相加一定要为100％<br/>"
 
rs.close
set rs=nothing

conn.close
set conn=nothing
ydzqconn.close
set ydzqconn=nothing
 call xltjlj("tp","ok")
 call xlanlj1("提交设置")
  else
 Response.Write "系统名称:"
 Response.Write "<input name=""winername"&tt&""" value="""&rs("winername")&"""/><br/>"
  Response.Write "LOGO地址:"
 Response.Write "<input name=""winlogo"&tt&""" value="""&rs("winlogo")&"""/><br/>"
 
 Response.Write "欢迎语:"
 Response.Write "<input name=""winervice"&tt&""" value="""&rs("winervice")&"""/><br/>"
 Response.Write "是否开启开奖限制"
 Response.Write "<select name=""Isopen"&tt&""" value="""&rs("Isopen")&""">"
 Response.Write "<option value=""0"">关闭</option>"
 Response.Write "<option value=""1"">开启</option>"
 Response.Write "</select><br/>"
 Response.Write "自动开奖下注数(超过此数即自动开奖)<br/>"
 Response.Write "<input name=""zhunum"&tt&""" value="""&rs("zhunum")&"""/>注<br/>"
 Response.Write "自动开奖下注金额(超过此金额即自动开奖)<br/>"
 Response.Write "<input name=""zhucent"&tt&""" value="""&rs("zhucent")&"""/>"&getcent&"<br/>"
 
 Response.Write "每轮下注数(超过此数即转到下轮)<br/>"
 Response.Write "<input name=""bigzu"&tt&""" value="""&rs("bigzu")&"""/>注<br/>"
 
 Response.Write "每注金额<br/>"
 Response.Write "<input name=""zucent"&tt&""" value="""&rs("zucent")&"""/><br/>"
 Response.Write "每场游戏保底金"
 Response.Write "<input name=""wincent"&tt&""" value="""&rs("wincent")&"""/><br/>"
 
 
 Response.Write "开奖会员得币"
 Response.Write "<input name=""hyin"&tt&""" value="""&rs("hyin")&"""/>%<br/>"
 
 Response.Write "系统收取税费"
 Response.Write "<input name=""sitein"&tt&""" value="""&rs("sitein")&"""/>%<br/>"
 
 Response.Write "开奖游戏保底"
 Response.Write "<input name=""winerin"&tt&""" value="""&rs("winerin")&"""/>%<br/>"
 
 Response.Write "以上三项百分数相加一定要为100％<br/>"
 
rs.close
set rs=nothing

conn.close
set conn=nothing
ydzqconn.close
set ydzqconn=nothing

Response.Write "<anchor>[提交设置]"
Response.Write "<go href=""winerget.asp?sid="&sid&"&amp;saytk="&saytk&""" method=""post"" accept-charset='utf-8'>"
Response.Write "<postfield name=""winername"" value=""$(winername"&tt&")""/>"
Response.Write "<postfield name=""winlogo"" value=""$(winlogo"&tt&")""/>"
Response.Write "<postfield name=""winervice"" value=""$(winervice"&tt&")""/>"
Response.Write "<postfield name=""Isopen"" value=""$(Isopen"&tt&")""/>"
Response.Write "<postfield name=""zhunum"" value=""$(zhunum"&tt&")""/>"
Response.Write "<postfield name=""zhucent"" value=""$(zhucent"&tt&")""/>"
Response.Write "<postfield name=""bigzu"" value=""$(bigzu"&tt&")""/>"
Response.Write "<postfield name=""zucent"" value=""$(zucent"&tt&")""/>"
Response.Write "<postfield name=""wincent"" value=""$(wincent"&tt&")""/>"
Response.Write "<postfield name=""hyin"" value=""$(hyin"&tt&")""/>"
Response.Write "<postfield name=""winerin"" value=""$(winerin"&tt&")""/>"
Response.Write "<postfield name=""sitein"" value=""$(sitein"&tt&")""/>"
Response.Write "<postfield name=""TP"" value=""ok""/>"
Response.Write "</go></anchor><br/>"
end if
end if
Response.Write "<a href='winerset.asp?sid="&sid&"&amp;saytk="&saytk&"'>返回上级</a>"
%>
<!--#include file="fanhui.asp"-->
<%Call headsay()%>  