<%@ 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 runat="server">
    <title></title>
</head>
<body>
<form action="action.ashx" method="post" id="config_form_xiuxian">
<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_1073_junet1" name="com_1073_junet"  value="on" <%if(app.Setting("com_1073_junet")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_junet1">开启</label>
<input type="radio" id="com_1073_junet2" name="com_1073_junet" value="off" <%if(app.Setting("com_1073_junet")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_junet2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_junet" value="<%=app.Setting("premiun_1073_junet") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_junet_moneys") %>" custom="<%=GetCustomKey("premiun_1073_junet_moneys") %>" name="premiun_1073_junet_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">盛大卡:</td>
<td >
<input type="radio" id="com_1073_shengda1" name="com_1073_shengda"  value="on" <%if(app.Setting("com_1073_shengda")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_shengda1">开启</label>
<input type="radio" id="com_1073_shengda2" name="com_1073_shengda" value="off" <%if(app.Setting("com_1073_shengda")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_shengda2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_shengda" value="<%=app.Setting("premiun_1073_shengda") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_shengda_moneys") %>" custom="<%=GetCustomKey("premiun_1073_shengda_moneys") %>" name="premiun_1073_shengda_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">完美卡:</td>
<td >
<input type="radio" id="com_1073_wanmei1" name="com_1073_wanmei"  value="on" <%if(app.Setting("com_1073_wanmei")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_wanmei1">开启</label>
<input type="radio" id="com_1073_wanmei2" name="com_1073_wanmei" value="off" <%if(app.Setting("com_1073_wanmei")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_wanmei2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_wanmei" value="<%=app.Setting("premiun_1073_wanmei") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_wanmei_moneys") %>" custom="<%=GetCustomKey("premiun_1073_wanmei_moneys") %>" name="premiun_1073_wanmei_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">网易卡:</td>
<td >
<input type="radio" id="Radio1" name="com_1073_wangyi"  value="on" <%if(app.Setting("com_1073_wangyi")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_wangyi1">开启</label>
<input type="radio" id="Radio2" name="com_1073_wangyi" value="off" <%if(app.Setting("com_1073_wangyi")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_wangyi2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_netease" value="<%=app.Setting("premiun_1073_netease") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_netease_moneys") %>" custom="<%=GetCustomKey("premiun_1073_netease_moneys") %>" name="premiun_1073_netease_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">支付宝:</td>
<td >
<input type="radio" id="com_1073_aipay3" name="com_1073_aipay"  value="on" <%if(app.Setting("com_1073_aipay")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_aipay1">开启</label>
<input type="radio" id="com_1073_aipay4" name="com_1073_aipay" value="off" <%if(app.Setting("com_1073_aipay")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_aipay2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_alipay" value="<%=app.Setting("premiun_1073_alipay") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_alipay_moneys") %>" custom="<%=GetCustomKey("premiun_1073_alipay_moneys") %>" name="premiun_1073_alipay_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">神州行:</td>
<td >
<input type="radio" id="com_1073_szx3" name="com_1073_szx"  value="on" <%if(app.Setting("com_1073_szx")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_szx1">开启</label>
<input type="radio" id="com_1073_szx4" name="com_1073_szx" value="off" <%if(app.Setting("com_1073_szx")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_szx2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_szx" value="<%=app.Setting("premiun_1073_szx") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_szx_moneys") %>" custom="<%=GetCustomKey("premiun_1073_szx_moneys") %>" name="premiun_1073_szx_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">联通卡:</td>
<td >
<input type="radio" id="com_1073_liantong3" name="com_1073_liantong"  value="on" <%if(app.Setting("com_1073_liantong")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_liantong1">开启</label>
<input type="radio" id="com_1073_liantong4" name="com_1073_liantong" value="off" <%if(app.Setting("com_1073_liantong")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_liantong2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_unicom" value="<%=app.Setting("premiun_1073_unicom") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_unicom_moneys") %>" custom="<%=GetCustomKey("premiun_1073_unicom_moneys") %>" name="premiun_1073_unicom_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">电信卡:</td>
<td >
<input type="radio" id="com_1073_dianxin3" name="com_1073_dianxin"  value="on" <%if(app.Setting("com_1073_dianxin")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_dianxin1">开启</label>
<input type="radio" id="com_1073_dianxin4" name="com_1073_dianxin" value="off" <%if(app.Setting("com_1073_dianxin")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_dianxin2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_dianxin" value="<%=app.Setting("premiun_1073_dianxin") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_dianxin_moneys") %>" custom="<%=GetCustomKey("premiun_1073_dianxin_moneys") %>" name="premiun_1073_dianxin_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">天下一卡通:</td>
<td >
<input type="radio" id="com_1073_tianxia3" name="com_1073_tianxia"  value="on" <%if(app.Setting("com_1073_tianxia")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_tianxia1">开启</label>
<input type="radio" id="com_1073_tianxia4" name="com_1073_tianxia" value="off" <%if(app.Setting("com_1073_tianxia")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_tianxia2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_tianxia" value="<%=app.Setting("premiun_1073_tianxia") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_tianxia_moneys") %>" custom="<%=GetCustomKey("premiun_1073_tianxia_moneys") %>" name="premiun_1073_tianxia_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">网银支付:</td>
<td >
<input type="radio" id="com_1073_bank3" name="com_1073_bank"  value="on" <%if(app.Setting("com_1073_bank")=="on"){ %> checked="checked" <%}%> /><label  for="com_1073_bank1">开启</label>
<input type="radio" id="com_1073_bank4" name="com_1073_bank" value="off" <%if(app.Setting("com_1073_bank")=="off"){ %> checked="checked" <%}%> /><label for="com_1073_bank2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_1073_bank" value="<%=app.Setting("premiun_1073_bank") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_1073_bank_moneys") %>" custom="<%=GetCustomKey("premiun_1073_bank_moneys") %>" name="premiun_1073_bank_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_xiuxian', 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>
