<%@ 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_yeepay"><%--不能与其他页面相同--%>
<%-- 提交类型，可以相同，尽量不一致 --%>
<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_yeepay_bank1" name="com_yeepay_bank" value="on" <%if(app.Setting("com_yeepay_bank")=="on"){ %> checked="checked" <%}%> /><label   for="com_yeepay_bank1">开启</label>
<input type="radio" id="com_yeepay_bank2" name="com_yeepay_bank" value="off" <%if(app.Setting("com_yeepay_bank")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_bank2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_bank" value="<%=app.Setting("premiun_yeepay_bank") %>" /></td><%--溢价，与以前基本一致--%>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_bank_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_bank_moneys") %>" name="premiun_yeepay_bank_moneys" class="ShowPayMoney"></td>
<%--上边这行，是新加出来的，设置一个name属性，一个data属性(类似input的value属性，用于显示)会根据data属性的值，用js动态创建复选框
name 属性设置为溢价KEY_moneys,前面和溢价KEY一致。
--%>
</tr>
<%-- ***********************单个设置项*********************** --%>


<tr><td class="t1">信用卡:</td>
<td >
<input type="radio" id="com_yeepost_pay1" name="com_yeepost_pay" value="on" <%if(app.Setting("com_yeepost_pay")=="on"){ %> checked="checked" <%}%> /><label   for="com_yeepost_pay1">开启</label>
<input type="radio" id="com_yeepost_pay2" name="com_yeepost_pay" value="off" <%if(app.Setting("com_yeepost_pay")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepost_pay2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepost_pay" value="<%=app.Setting("premiun_yeepost_pay") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepost_pay_moneys") %>" custom="<%=GetCustomKey("premiun_yeepost_pay_moneys") %>" name="premiun_yeepost_pay_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">联通充值卡:</td>
<td >
<input type="radio" id="com_yeepay_UNICOM1" name="com_yeepay_UNICOM" value="on" <%if(app.Setting("com_yeepay_UNICOM")=="on"){ %> checked="checked" <%}%> /><label   for="com_yeepay_UNICOM1">开启</label>
<input type="radio" id="com_yeepay_UNICOM2" name="com_yeepay_UNICOM" value="off" <%if(app.Setting("com_yeepay_UNICOM")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_UNICOM2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_UNICOM" value="<%=app.Setting("premiun_yeepay_UNICOM") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_UNICOM_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_UNICOM_moneys") %>" name="premiun_yeepay_UNICOM_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">电信充值卡:</td>
<td >
<input type="radio" id="com_yeepay_TELECOM1" name="com_yeepay_TELECOM" value="on" <%if(app.Setting("com_yeepay_TELECOM")=="on"){ %> checked="checked" <%}%> /><label   for="com_yeepay_TELECOM1">开启</label>
<input type="radio" id="com_yeepay_TELECOM2" name="com_yeepay_TELECOM" value="off" <%if(app.Setting("com_yeepay_TELECOM")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_TELECOM2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_TELECOM" value="<%=app.Setting("premiun_yeepay_TELECOM") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_TELECOM_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_TELECOM_moneys") %>" name="premiun_yeepay_TELECOM_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">神州行充值卡:</td>
<td >
<input type="radio" id="com_yeepay_SZX1" name="com_yeepay_SZX" value="on" <%if(app.Setting("com_yeepay_SZX")=="on"){ %> checked="checked" <%}%> /><label   for="com_yeepay_SZX1">开启</label>
<input type="radio" id="com_yeepay_SZX2" name="com_yeepay_SZX" value="off" <%if(app.Setting("com_yeepay_SZX")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_SZX2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_SZX" value="<%=app.Setting("premiun_yeepay_SZX") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_SZX_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_SZX_moneys") %>" name="premiun_yeepay_SZX_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">Q币充值卡:</td>
<td >
<input type="radio" id="com_yeepay_QQCARD1" name="com_yeepay_QQCARD" value="on"  <%if(app.Setting("com_yeepay_QQCARD")=="on"){ %> checked="checked" <%}%> /><label   for="com_yeepay_QQCARD1">开启</label>
<input type="radio" id="com_yeepay_QQCARD2" name="com_yeepay_QQCARD" value="off" <%if(app.Setting("com_yeepay_QQCARD")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_QQCARD2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_QQCARD" value="<%=app.Setting("premiun_yeepay_QQCARD") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_QQCARD_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_QQCARD_moneys") %>" name="premiun_yeepay_QQCARD_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">盛大一卡通:</td>
<td >
<input type="radio" id="com_yeepay_SNDACARD1" name="com_yeepay_SNDACARD" value="on"  <%if(app.Setting("com_yeepay_SNDACARD")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_SNDACARD1">开启</label>
<input type="radio" id="com_yeepay_SNDACARD2" name="com_yeepay_SNDACARD" value="off" <%if(app.Setting("com_yeepay_SNDACARD")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_SNDACARD2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_SNDACARD" value="<%=app.Setting("premiun_yeepay_SNDACARD") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_SNDACARD_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_SNDACARD_moneys") %>" name="premiun_yeepay_SNDACARD_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">纵游一卡通:</td>
<td >
<input type="radio" id="com_yeepay_ZONGYOU1" name="com_yeepay_ZONGYOU" value="on"  <%if(app.Setting("com_yeepay_ZONGYOU")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_ZONGYOU1">开启</label>
<input type="radio" id="com_yeepay_ZONGYOU2" name="com_yeepay_ZONGYOU" value="off" <%if(app.Setting("com_yeepay_ZONGYOU")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_ZONGYOU2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_ZONGYOU" value="<%=app.Setting("premiun_yeepay_ZONGYOU") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_ZONGYOU_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_ZONGYOU_moneys") %>" name="premiun_yeepay_ZONGYOU_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">天下一卡通:</td>
<td >
<input type="radio" id="com_yeepay_TIANXIA1" name="com_yeepay_TIANXIA" value="on"  <%if(app.Setting("com_yeepay_TIANXIA")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_TIANXIA1">开启</label>
<input type="radio" id="com_yeepay_TIANXIA2" name="com_yeepay_TIANXIA" value="off" <%if(app.Setting("com_yeepay_TIANXIA")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_TIANXIA2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_TIANXIA" value="<%=app.Setting("premiun_yeepay_TIANXIA") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_TIANXIA_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_TIANXIA_moneys") %>" name="premiun_yeepay_TIANXIA_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">天宏一卡通:</td>
<td >
<input type="radio" id="com_yeepay_TIANHONG1" name="com_yeepay_TIANHONG" value="on"  <%if(app.Setting("com_yeepay_TIANHONG")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_TIANHONG1">开启</label>
<input type="radio" id="com_yeepay_TIANHONG2" name="com_yeepay_TIANHONG" value="off" <%if(app.Setting("com_yeepay_TIANHONG")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_TIANHONG2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_TIANHONG" value="<%=app.Setting("premiun_yeepay_TIANHONG") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_TIANHONG_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_TIANHONG_moneys") %>" name="premiun_yeepay_TIANHONG_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">骏网一卡通:</td>
<td >
<input type="radio" id="com_yeepay_JUNNET1" name="com_yeepay_JUNNET" value="on"  <%if(app.Setting("com_yeepay_JUNNET")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_JUNNET1">开启</label>
<input type="radio" id="com_yeepay_JUNNET2" name="com_yeepay_JUNNET" value="off" <%if(app.Setting("com_yeepay_JUNNET")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_JUNNET2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_JUNNET" value="<%=app.Setting("premiun_yeepay_JUNNET") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_JUNNET_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_JUNNET_moneys") %>" name="premiun_yeepay_JUNNET_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">完美充值卡:</td>
<td >
<input type="radio" id="com_yeepay_WANMEI1" name="com_yeepay_WANMEI" value="on"  <%if(app.Setting("com_yeepay_WANMEI")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_WANMEI1">开启</label>
<input type="radio" id="com_yeepay_WANMEI2" name="com_yeepay_WANMEI" value="off" <%if(app.Setting("com_yeepay_WANMEI")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_WANMEI2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_WANMEI" value="<%=app.Setting("premiun_yeepay_WANMEI") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_WANMEI_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_WANMEI_moneys") %>" name="premiun_yeepay_WANMEI_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">网易充值卡:</td>
<td >
<input type="radio" id="com_yeepay_NETEASE1" name="com_yeepay_NETEASE" value="on"  <%if(app.Setting("com_yeepay_NETEASEI")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_NETEASE1">开启</label>
<input type="radio" id="com_yeepay_NETEASE2" name="com_yeepay_NETEASE" value="off" <%if(app.Setting("com_yeepay_NETEASEI")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_NETEASE2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_NETEASE" value="<%=app.Setting("premiun_yeepay_NETEASE") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_NETEASE_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_NETEASE_moneys") %>" name="premiun_yeepay_NETEASE_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">搜狐充值卡:</td>
<td >
<input type="radio" id="com_yeepay_SOHU1" name="com_yeepay_SOHU" value="on"  <%if(app.Setting("com_yeepay_SOHU")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_SOHU1">开启</label>
<input type="radio" id="com_yeepay_SOHU2" name="com_yeepay_SOHU" value="off" <%if(app.Setting("com_yeepay_SOHU")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_SOHU2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_SOHU" value="<%=app.Setting("premiun_yeepay_SOHU") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_SOHU_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_SOHU_moneys") %>" name="premiun_yeepay_SOHU_moneys" class="ShowPayMoney"></td>
</tr>


<tr><td class="t1">久游充值卡:</td>
<td >
<input type="radio" id="com_yeepay_JIUYOU1" name="com_yeepay_JIUYOU" value="on"  <%if(app.Setting("com_yeepay_JIUYOU")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_JIUYOU1">开启</label>
<input type="radio" id="com_yeepay_JIUYOU2" name="com_yeepay_JIUYOU" value="off" <%if(app.Setting("com_yeepay_JIUYOU")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_JIUYOU2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_JIUYOU" value="<%=app.Setting("premiun_yeepay_JIUYOU") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_JIUYOU_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_JIUYOU_moneys") %>" name="premiun_yeepay_JIUYOU_moneys" class="ShowPayMoney"></td>
</tr>

<tr><td class="t1">征途卡:</td>
<td >
<input type="radio" id="com_yeepay_ZHENGTU1" name="com_yeepay_ZHENGTU" value="on"  <%if(app.Setting("com_yeepay_ZHENGTU")=="on"){ %> checked="checked" <%}%> /><label  for="com_yeepay_ZHENGTU1">开启</label>
<input type="radio" id="com_yeepay_ZHENGTU2" name="com_yeepay_ZHENGTU" value="off" <%if(app.Setting("com_yeepay_ZHENGTU")=="off"){ %> checked="checked" <%}%> /><label for="com_yeepay_ZHENGTU2">关闭</label>
</td>
<td class="t1">溢价:</td><td ><input name="premiun_yeepay_ZHENGTU" value="<%=app.Setting("premiun_yeepay_ZHENGTU") %>" /></td>
<td class="t1">金额:</td><td data="<%=app.Setting("premiun_yeepay_ZHENGTU_moneys") %>" custom="<%=GetCustomKey("premiun_yeepay_ZHENGTU_moneys") %>" name="premiun_yeepay_ZHENGTU_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_yeepay', 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>
