<%@ Page Language="C#" AutoEventWireup="true" %>

<script runat="server">
protected string GetCustomKey(string pKey)
{
    string __mini = app.Setting("custom_" + pKey + "_mini");
    string __max = app.Setting("custom_" + pKey + "_max");
    return __mini + "," + __max;
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
<form action="action.ashx" method="post" id="config_form_zhigame">
<input type="hidden" name="sys_all_payconfig" value="form.type.allpay" />
<table class="opera">


<tr><td class="t1">财付通:</td>
<td >
<input type="radio" id="com_zhigame_cft1" name="com_zhigame_cft"  value="on" <%if(app.Setting("com_zhigame_cft")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_cft1">开启</label>
<input type="radio" id="com_zhigame_cft2" name="com_zhigame_cft" value="off" <%if(app.Setting("com_zhigame_cft")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_cft2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_cft" value="<%=app.Setting("premiun_zhigame_cft") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_cft_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_cft_moneys") %>" name="premiun_zhigame_cft_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">银行卡:</td>
<td >
<input type="radio" id="com_zhigame_jcyh1" name="com_zhigame_jcyh"  value="on" <%if(app.Setting("com_zhigame_jcyh")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_jcyh1">开启</label>
<input type="radio" id="com_zhigame_jcyh2" name="com_zhigame_jcyh" value="off" <%if(app.Setting("com_zhigame_jcyh")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_jcyh2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_jcyh" value="<%=app.Setting("premiun_zhigame_jcyh") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_jcyh_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_jcyh_moneys") %>" name="premiun_zhigame_jcyh_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">银行卡支付:</td>
<td >
<input type="radio" id="com_zhigame_yh1" name="com_zhigame_yh"  value="on" <%if(app.Setting("com_zhigame_yh")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_yh1">开启</label>
<input type="radio" id="com_zhigame_yh2" name="com_zhigame_yh" value="off" <%if(app.Setting("com_zhigame_yh")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_yh2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_yh" value="<%=app.Setting("premiun_zhigame_yh") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_yh_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_yh_moneys") %>" name="premiun_zhigame_yh_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">支付宝:</td>
<td >
<input type="radio" id="com_zhigame_zfb1" name="com_zhigame_zfb"  value="on" <%if(app.Setting("com_zhigame_zfb")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_zfb1">开启</label>
<input type="radio" id="com_zhigame_zfb2" name="com_zhigame_zfb" value="off" <%if(app.Setting("com_zhigame_zfb")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_zfb2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_zfb" value="<%=app.Setting("premiun_zhigame_zfb") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_zfb_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_zfb_moneys") %>" name="premiun_zhigame_zfb_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">手机充值卡:</td>
<td >
<input type="radio" id="com_zhigame_jcsjcard1" name="com_zhigame_jcsjcard"  value="on" <%if(app.Setting("com_zhigame_jcsjcard")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_jcsjcard1">开启</label>
<input type="radio" id="com_zhigame_jcsjcard2" name="com_zhigame_jcsjcard" value="off" <%if(app.Setting("com_zhigame_jcsjcard")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_jcsjcard2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_jcsjcard" value="<%=app.Setting("premiun_zhigame_jcsjcard") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_jcsjcard_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_jcsjcard_moneys") %>" name="premiun_zhigame_jcsjcard_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">神州行:</td>
<td >
<input type="radio" id="com_zhigame_kqcard1" name="com_zhigame_kqcard"  value="on" <%if(app.Setting("com_zhigame_kqcard")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_kqcard1">开启</label>
<input type="radio" id="com_zhigame_kqcard2" name="com_zhigame_kqcard" value="off" <%if(app.Setting("com_zhigame_kqcard")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_kqcard2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_kqcard" value="<%=app.Setting("premiun_zhigame_kqcard") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_kqcard_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_kqcard_moneys") %>" name="premiun_zhigame_kqcard_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">骏网卡支付:</td>
<td >
<input type="radio" id="com_zhigame_jcykt1" name="com_zhigame_jcykt"  value="on" <%if(app.Setting("com_zhigame_jcykt")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_jcykt1">开启</label>
<input type="radio" id="com_zhigame_jcykt2" name="com_zhigame_jcykt" value="off" <%if(app.Setting("com_zhigame_jcykt")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_jcykt2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_jcykt" value="<%=app.Setting("premiun_zhigame_jcykt") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_jcykt_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_jcykt_moneys") %>" name="premiun_zhigame_jcykt_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">固话手机:</td>
<td >
<input type="radio" id="com_zhigame_hlzf1" name="com_zhigame_hlzf"  value="on" <%if(app.Setting("com_zhigame_hlzf")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_hlzf1">开启</label>
<input type="radio" id="com_zhigame_hlzf2" name="com_zhigame_hlzf" value="off" <%if(app.Setting("com_zhigame_hlzf")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_hlzf2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_hlzf" value="<%=app.Setting("premiun_zhigame_hlzf") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_hlzf_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_hlzf_moneys") %>" name="premiun_zhigame_hlzf_moneys" class="ShowPayMoney"></td>
</tr>

<%--<tr><td class="t1">快钱网银:</td>
<td >
<input type="radio" id="Radio1" name="com_zhigame_zfb"  value="on" <%if(app.Setting("com_zhigame_zfb")=="on"){ %> checked="checked" <%}%> /><label  for="com_zhigame_zfb1">开启</label>
<input type="radio" id="Radio2" name="com_zhigame_zfb" value="off" <%if(app.Setting("com_zhigame_zfb")=="off"){ %> checked="checked" <%}%> /><label for="com_zhigame_zfb2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_zhigame_kqwy" value="<%=app.Setting("premiun_zhigame_kqwy") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_zhigame_kqwy_moneys") %>" custom="<%=GetCustomKey("premiun_zhigame_kqwy_moneys") %>" name="premiun_zhigame_kqwy_moneys" class="ShowPayMoney"></td>
</tr>--%>


   
</table>
<div class="postdiv"><input style=' padding-left:10px;' class="ui-button ui-widget ui-state-default ui-corner-all" value="保存设置" type="submit" /></div>
</form>
<script type="text/javascript">
<![CDATA[
    AjaxForm({ finder: '#config_form_zhigame', succEnd: 'msg', refurl: '', message: "提交成功" });
    function InitPayMoney() {
        $(".ShowPayMoney").each(function (i, d) {
            var slef = $(d);
            var hasMoney = new Array();
            var _customMoney = new Array();
            hasMoney = (slef.attr("data")).split(',');
            if (typeof (slef.attr("custom")) != "undefined") {
                _customMoney = (slef.attr("custom")).split(',');
            }
            var name = slef.attr("name");
            for (var i = 0; i < moneys.length; i++) {
                var input_value = moneys[i];
                if (hasMoney.InArray(input_value)) {
                    var _html_ = money_temp_check.replace("{0}", name).replace("{1}", input_value).replace("{2}", input_value);
                    slef.append(_html_);
                } else {
                    var _html_ = money_temp.replace("{0}", name).replace("{1}", input_value).replace("{2}", input_value);
                    slef.append(_html_);
                }
            }
            /** 自定义范围 **/
            slef.append(customMoneys(name, _customMoney));
        })
    }

    function customMoneys(nm, cm) {
        var _mini = "1";
        var _max = "100000";
        if (cm.length == 2) {
            _mini = cm[0];
            _max = cm[1];
        }
        var _h1 = "<span style=' padding-left:10px;color:#f44'>";
        _h1 += "自定义范围:";
        _h1 += "<input class='minicustom' value='" + _mini + "' name='custom_" + nm + "_mini' >";
        _h1 += "到";
        _h1 += "<input class='minicustom' value='" + _max + "' name='custom_" + nm + "_max' >";
        _h1 += "</span>";
        return _h1;
    }

    setTimeout(InitPayMoney, 400);
//]]>
</script>
</body>
</html>
