<%@ Page Title="" Language="C#" MasterPageFile="../BaseMaster.Master" CodeBehind="UserGroupDetail.aspx.cs" Inherits="WAP2P.Web.PC.Admin.Sys.UserGroupDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="header" runat="server">
    <style type="text/css">
        #tipSetting textarea {
            width: 90%;
            height: 40px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <form class="auto" method="post" action="" beforesubmit="setJsons();" onsuccess="parent.$.jPopupEdit.close(true);">
        <div class="m-editbar">
            <input type="submit" class="btn-larger c-priority iconfont" value="&#xe684; 保存" />
            <input type="button" class="btn-larger c-normal iconfont" value="&#xe634; 关闭" onclick="parent.$.jPopupEdit.close();" />
        </div>
        <div class="m-content m-editcontent">
            <table class="m-info" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <th class="info-listhead" colspan="4">会员组基本设置</th>
                </tr>
                <tr>
                    <th>会员组名称</th>
                    <td><input type="text" name="name" placeholder="请输入合适的组名称" value="<% =Model.Name.HtmlEncode() %>" class="w250" data-vtype="must" data-vmsg="请输入会员组名称" /></td>
                    <th>是否为默认会员组</th>
                    <td><% =HtmlHelper.CheckBox("isDefaultGroup", "为默认会员组", Model.IsDefaultGroup) %></td>
                </tr>
                <tr>
                    <th>所属会员类型</th>
                    <td>
                        <div class="ui-radio">
                            <ruson:MultipleInput runat="server" ID="userTypeId" Type="Radio"></ruson:MultipleInput>
                        </div>
                    </td>                    
                    <th>会员组级别</th>
                    <td>
                        <input type="text" name="groupLevel" class="w60 ui-int" value="<% =Model.GroupLevel %>" data-vtype="number" data-vmsg="会员组级别必须为一个数值" />
                        <em>数字越大，级别越高。注意：前台用户在同级组别间不可进行升级操作</em>
                    </td>
                </tr>                
                <tr>
                    <th>会员组图标</th>
                    <td colspan="3">
                        <div id="iconResult" class="mb10"><% =IsNew ? string.Empty : string.Format("<img src=\"{0}\" alt=\"\">", Model.Icon)  %></div>
                        <div class="pl136"><input type="hidden" name="icon" id="icon" value="<% =Model.Icon.HtmlEncode() %>" data-vtype="must" data-vmsg="请上传图标" /></div>
                        <input type="file" id="iconFile" />
                        <em>请上传尺寸为 <i class="fcred-3">140 X 140 像素</i> 的图片</em>
                    </td>
                </tr>
                <tr>
                    
                </tr>
                <tr>
                    <th>详细描述</th>
                    <td colspan="3"><textarea name="description"><% =Model.Description.HtmlEncode() %></textarea></td>
                </tr>
                <tr>
                    <th class="info-listhead" colspan="4">会员组升级设置<span>（当以下选项均未勾选时，用户前台将不显示该会员组）</span></th>
                </tr>
                <tr>
                    <th>升级设置</th>
                    <td colspan="3"><% =HtmlHelper.CheckBox("canUpGroup", "允许本组成员升级到其它组", Model.CanUpGroup) %></td>
                </tr>
                <tr>
                    <th>是否支持现金购买本组</th>
                    <td>
                        <span class="ui-checkbox autonext"><% =HtmlHelper.CheckBox("canUpByAmount", "允许现金升级", Model.CanUpByAmount) %></span>
                        <span class="pl50">
                            <ul class="ui-listvalue pt10" id="js-ulUpByAmount">
                                <asp:Repeater runat="server" ID="rptUpByAmount">
                                    <ItemTemplate>
                                        <li style="height:52px; width:350px;">
                                            <a href="javascript:void(0)" class="iconfont fs22 listvalue-delete js-upOper" title="删除">&#xe65a;</a>
                                            <div class="pt10">
                                                <input type="text" class="w50 ui-int js-month" data-vtype="number" data-vmsg="请输入正确的月份" value="<%# Eval("Key") %>" /> 月，所需金额 <input type="text" class="w100 ui-float js-value" value="<%# ((decimal)Eval("Value")).ToMoneyString() %>" data-vtype="money" data-vmsg="请输入正确的金额" /> 元
                                            </div>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                            <input type="button" class="btn-base c-normal iconfont" id="js-btnUpByAmount" value="&#xe67a; 新增" onclick="$('#js-ulUpByAmount').append(document.getElementById('tmpUpByAmount').innerHTML);" />
                            <input type="hidden" name="upByAmountJson" id="upByAmountJson" />
                        </span>
                    </td>
                    <th>是否支持积分兑换本组</th>
                    <td>
                        <span class="ui-checkbox autonext"><% =HtmlHelper.CheckBox("canUpByScore", "允许积分升级", Model.CanUpByScore) %></span>
                        <span class="pl50">
                            <ul class="ui-listvalue pt10" id="js-ulUpByScore">
                                <asp:Repeater runat="server" ID="rptUpByScore">
                                    <ItemTemplate>
                                        <li style="height:52px; width:350px;">
                                            <a href="javascript:void(0)" class="iconfont fs22 listvalue-delete js-upOper" title="删除">&#xe65a;</a>
                                            <div class="pt10">
                                                <input type="text" class="w50 ui-int js-month" data-vtype="number" data-vmsg="请输入正确的月份" value="<%# Eval("Key") %>" /> 月，所需积分 <input type="text" class="w100 ui-int js-value" value="<%# Eval("Value") %>" data-vtype="number" data-vmsg="请输入正确的积分" /> 分
                                            </div>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                            <input type="button" class="btn-base c-normal iconfont" id="js-btnUpByScore" value="&#xe67a; 新增" onclick="$('#js-ulUpByScore').append(document.getElementById('tmpUpByScore').innerHTML);" />
                            <input type="hidden" name="upByScoreJson" id="upByScoreJson" />
                        </span>
                    </td>
                </tr>               
                <tr>
                    <th class="info-listhead" colspan="4">会员组借贷设置</th>
                </tr>
                <tr>
                    <th>可借贷类型</th>
                    <td colspan="3">
                        <table id="borrowFilters" class="info-inlinetable">
                            <asp:Repeater runat="server" ID="rptBorrowFilter" ItemType="WAP2P.Sys.BorrowType">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <span class="ui-checkbox autonext">
                                                <label><input type="checkbox" value="<%# Item.Id %>" data-to="BorrowTypeId" <%# Model.BorrowFilters != null && Model.BorrowFilters.Where(item => item.BorrowTypeId == Item.Id).FirstOrDefault() != null ? " checked=\"checked\"" : string.Empty %> /><%# Item.Name %></label>
                                            </span>
                                            <%# Item.CheckQuotaType == BorrowType.CheckQuotaTypeEnum.PayAndReceive ? string.Format(@"<span class=""pl50"">影响待收比：<input type=""text"" placeholder=""标类型比例+本值"" data-to=""Value"" class=""ui-float w150"" data-vtype=""money"" data-vmsg=""请输入正确值"" value=""{0}"" /> %</span>
                                            ", Model.BorrowFilters == null ? string.Empty : ((Model.BorrowFilters.Where(item => item.BorrowTypeId == Item.Id).FirstOrDefault() ?? new WAP2P.Sys.UserGroup.BorrowFilter()).Value * 100).ToInterestString()) : string.Empty %>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <th>是否允许设置智能投标</th>
                    <td colspan="3">
                        <span class="ui-checkbox autonext"><% =HtmlHelper.CheckBox("autoBid", "允许智能投标", Model.AutoBid) %></span>
                        <span class="pl50">自动优先级：<input type="text" name="autoBidPriority" value="<% =Model.AutoBidPriority.ToString() %>" class="ui-int w120" data-vtype="number" data-vmsg="请输入正确数值" placeholder="值越大优先级越高" /></span>
                        <span class="pl50">智能投标方案：<input type="text" name="autoBidMaxRecored" value="<% =Model.AutoBidMaxRecored.ToString() %>" class="ui-int w60" data-vtype="number" data-vmsg="请输入正确数值" /> 套</span>
                    </td>
                </tr>
                <tr>
                    <th>是否允许预约</th>
                    <td><% =HtmlHelper.CheckBox("canReserve", "允许预约", Model.CanReserve) %></td>
                    <th>是否允许投标</th>
                    <td><% =HtmlHelper.CheckBox("canBid", "允许投标", Model.CanBid) %></td>
                </tr>
                <tr>
                    <th class="info-listhead" colspan="4">会员组费率设置</th>
                </tr>
                <tr>
                    <th>借款服务费比率</th>
                    <td>
                        <input type="text" name="loadFee" value="<% =(Model.LoadFee * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                        <span class="ui-autoculation js-autoculation">%</span>
                    </td>
                    <th>利息服务费比率</th>
                    <td>
                        <input type="text" name="interestFee" value="<% =(Model.InterestFee * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                        <span class="ui-autoculation js-autoculation">%</span>
                    </td>
                </tr>                
                <tr>
                    <th>债权转让服务费比率</th>
                    <td colspan="3">
                        <input type="text" name="transferFee" value="<% =(Model.TransferFee * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                        <span class="ui-autoculation js-autoculation">%</span>
                    </td>
                </tr>
                <tr>
                    <th>提现到账时间</th>
                    <td id="supportExtractionCash" colspan="3">
                        <table class="info-inlinetable">
                            <asp:Repeater runat="server" ID="rptExtractionCashTime">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <span class="ui-checkbox autonext">
                                                <label>
                                                    <input type="checkbox" data-to="ExtractionCashTime" value="<%# Eval("Key") %>" 
                                                        <%# Model.ExtractionCashs != null && Model.ExtractionCashs.Where(item => item.Type == (WAP2P.Infrastructure.ExtractionCashTime)Eval("Key")).FirstOrDefault() != null ? "checked=\"checked\"" : string.Empty %> /><%# Eval("Value") %>
                                                </label>
                                            </span>
                                            <span class="pl50">提现费用比率：<input type="text" class="w100 ui-interest" value="<%# Model.ExtractionCashs != null && Model.ExtractionCashs.Where(item => item.Type == (WAP2P.Infrastructure.ExtractionCashTime)Eval("Key")).FirstOrDefault() != null ? (Model.ExtractionCashs.Where(item => item.Type == (WAP2P.Infrastructure.ExtractionCashTime)Eval("Key")).FirstOrDefault().Ratio * 100).ToInterestString() : string.Empty %>" data-to="Ratio" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                                                    <span class="ui-autoculation js-autoculation">%</span></span></td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <th>线上账户提现费率</th>
                    <td>
                        <span>
                            <input type="text" name="onlineAccountExtracFeeRatio" value="<% =(Model.OnlineAccountExtracFeeRatio * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                            <span class="ui-autoculation js-autoculation">%</span>
                            </span>
                    </td>
                    <th>线下账户提现费率</th>
                    <td>
                        <span>
                            <input type="text" name="offlineAccountExtracFeeRatio" value="<% =(Model.OfflineAccountExtracFeeRatio * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                            <span class="ui-autoculation js-autoculation">%</span>
                        </span>
                    </td>
                </tr>                
                <tr>
                    <th>借款账户提现费率</th>
                    <td>
                        <span><input type="text" name="loanAccountExtracFeeRatio" value="<% =(Model.LoanAccountExtracFeeRatio * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                            <span class="ui-autoculation js-autoculation">%</span>
                        </span>
                    </td>
                    <th>回款账户提现费率</th>
                    <td>
                        <span><input type="text" name="receiveAccountExtracFeeRatio" value="<% =(Model.ReceiveAccountExtracFeeRatio * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                            <span class="ui-autoculation js-autoculation">%</span>
                        </span>
                    </td>
                </tr>                
                <tr>
                    <th>奖励账户提现费率</th>
                    <td colspan="3">
                        <span><input type="text" name="rewardAccountExtracFeeRatio" value="<% =(Model.RewardAccountExtracFeeRatio * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                            <span class="ui-autoculation js-autoculation">%</span>
                        </span>
                    </td>
                </tr>
                <tr>
                    <th class="info-listhead" colspan="4">会员组奖励设置</th>
                </tr>
                <tr>
                    <th>是否允许推荐人员</th>
                    <td colspan="4">
                        <span class="ui-checkbox autonext"><% =HtmlHelper.CheckBox("canRecommend", "允许推荐人", Model.CanRecommend) %></span>
                        <span class="pl50">推荐奖励比率：<input type="text" name="recommendRatio" value="<% =(Model.RecommendRatio * 100).ToInterestString() %>" class="ui-interest w100" data-vtype="money|range" data-vmax="100" data-vmsg="请输入正确的比率|比率需在0%-100%之间" />
                            <span class="ui-autoculation js-autoculation">%</span>
                        </span>
                    </td>
                </tr>
                <tr>
                    <th class="info-listhead" colspan="4">会员组提醒设置</th>
                </tr>
                <tr>
                    <td colspan="4">
                        <dl class="edittabs" id="tipSetting">
                            <dt>
                                <asp:Repeater runat="server" ID="rptReminddt">
                                    <ItemTemplate>
                                        <label<%# Container.ItemIndex == 0 ? " class=\"on\"" : string.Empty %> href="#<%# Container.DataItem %>"><span><%# Container.DataItem %></span>
                                        </label>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </dt>
                            <asp:Repeater runat="server" ID="rptReminddd">
                                <ItemTemplate>
                                    <dd class="pa10<%# Container.ItemIndex == 0 ? " on" : string.Empty %>" id="<%# Container.DataItem %>">
                                        <table class="m-info" cellpadding="0" cellspacing="0" width="100%">
                                            <tr>
                                                <th class="g-fleft" width="20%">提醒说明</th>
                                                <th class="g-fcenter" width="20%">启用通道</th>
                                                <th class="g-fcenter" width="15%">用户变更</th>
                                                <th class="g-fcenter" width="45%">发送模板</th>
                                            </tr>
                                            <asp:Repeater runat="server" ID="rptRemindDetail">
                                                <ItemTemplate>
                                                    <tr class="data">
                                                        <td class="g-fleft"><%# Eval("Value.Item1") %></td>
                                                        <td class="g-fcenter">
                                                            <span class="ui-checkbox">
                                                                <label><input type="checkbox" data-to="Email" value="<% =(int)RemindSetting.TipType.Email %>" <%# ((remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")) ?? new RemindSetting()).TipTypes & RemindSetting.TipType.Email) == RemindSetting.TipType.Email ? " checked=\"checked\"" : string.Empty %> />
                                                                    <%# RemindSetting.TipType.Email.GetDescription() %></label></span>
                                                            <span class="ui-checkbox">
                                                                <label><input type="checkbox" data-to="PhoneMessage" value="<% =(int)RemindSetting.TipType.PhoneMessage %>" <%# ((remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")) ?? new RemindSetting()).TipTypes & RemindSetting.TipType.PhoneMessage) == RemindSetting.TipType.PhoneMessage ? " checked=\"checked\"" : string.Empty %> />
                                                                    <%# RemindSetting.TipType.PhoneMessage.GetDescription() %></label></span>
                                                            <span class="ui-checkbox">
                                                                <label><input type="checkbox" data-to="SiteMessage" value="<% =(int)RemindSetting.TipType.SiteMessage %>" <%# ((remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")) ?? new RemindSetting()).TipTypes & RemindSetting.TipType.SiteMessage) == RemindSetting.TipType.SiteMessage ? " checked=\"checked\"" : string.Empty %> />
                                                                    <%# RemindSetting.TipType.SiteMessage.GetDescription() %></label></span>
                                                        </td>
                                                        <td class="g-fcenter">
                                                            <span class="ui-checkbox">
                                                                <label><input type="checkbox" data-to="UserEdit" value="true" <%# (remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")) != null ? remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")).UserEdit : (bool)Eval("Value.Item3")) ? " checked=\"checked\"" : string.Empty %> />
                                                                   可编辑</label></span>
                                                        </td>
                                                        <td class="g-fcenter">
                                                            <input type="hidden" data-to="TipKey" value="<%# Eval("Key") %>" />
                                                            <textarea data-to="TipTemplate"><%# remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")) != null ? remindSetting.FirstOrDefault(item => item.TipKey == (string)Eval("Key")).TipTemplate : Eval("Value.Item4") %></textarea>
                                                        </td>
                                                    </tr>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </table>
                                    </dd>
                                </ItemTemplate>
                            </asp:Repeater>
                        </dl>
                    </td>
                </tr>
            </table>
        </div>
        <input type="hidden" name="borrowFilterJson" id="borrowFilterJson" />
        <input type="hidden" name="supportExtractionCashJson" id="supportExtractionCashJson" />
        <input type="hidden" name="remindJson" id="remindJson" />
    </form>
    <script type="text/template" id="tmpUpByAmount">
        <li style="height:52px; width:350px;">
            <a href="javascript:void(0)" class="iconfont fs22 listvalue-delete js-upOper" title="删除">&#xe65a;</a>
            <div class="pt10">
                <input type="text" class="w50 ui-int js-month" data-vtype="number" data-vmsg="请输入正确的月份" /> 月，所需金额 <input type="text" class="w100 ui-float js-value" data-vtype="money" data-vmsg="请输入正确的金额" /> 元
            </div>
        </li>
    </script>
    <script type="text/template" id="tmpUpByScore">
        <li style="height:52px; width:350px;">
            <a href="javascript:void(0)" class="iconfont fs22 listvalue-delete js-upOper" title="删除">&#xe65a;</a>
            <div class="pt10">
                <input type="text" class="w50 ui-int js-month" data-vtype="number" data-vmsg="请输入正确的月份" /> 月，所需积分 <input type="text" class="w100 ui-int js-value" data-vtype="number" data-vmsg="请输入正确的积分" /> 分
            </div>
        </li>
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script>
        //提交前设置Json对象。
        function setJsons() {
            //可借贷类型
            var borrowFilters = [];
            $('#borrowFilters tr').each(function(i, n) {
                n = $(n);
                var check = n.find('input[data-to=BorrowTypeId]');
                if (check[0].checked) {
                    var val = n.find('input[data-to=Value]').val();
                    val = val ? parseFloat(val.replace(/,/g, '')) : null;

                    borrowFilters.push({
                        BorrowTypeId: parseInt(check.val()),
                        Value: val
                    });
                }
            });
            //提现到账时间
            var extractionCashs = [];
            $('#supportExtractionCash tr').each(function(i, n) {
                n = $(n);
                var check = n.find('input[data-to=ExtractionCashTime]');
                if (check[0].checked) {                    
                    extractionCashs.push({
                        Type: parseInt(check.val()),
                        Ratio: parseFloat(n.find('input[data-to=Ratio]').val().replace(/,/g ,''))
                    });
                }
            });

            //提醒设置
            var reminds = [];
            $('#tipSetting tr.data').each(function(i, n) {
                n = $(n);
                var tipTypes = 0;
                $.each(n.find(':checked'), function(j, m) {
                    tipTypes = tipTypes | parseInt($(m).val());
                });

                reminds.push({
                    TipKey: n.find('input[data-to=TipKey]').val(),
                    TipTypes: tipTypes,
                    UserEdit: n.find('input[data-to=UserEdit]')[0].checked,
                    TipTemplate: n.find('textarea[data-to=TipTemplate]').val()
                });
            });

            $('#borrowFilterJson').val(utils.toJsonString(borrowFilters));
            $('#supportExtractionCashJson').val(utils.toJsonString(extractionCashs));
            $('#remindJson').val(utils.toJsonString(reminds));

            initUpGroupData();
        };

        //升级方案
        $('#js-ulUpByAmount,#js-ulUpByScore').on('click', '.js-upOper', function() {
            var parent = $(this).parent();
            if (parent.is('li'))
                parent.remove();            
        });

        function initUpGroupData() {
            var obj = [];
            var months = $('#js-ulUpByAmount .js-month'), amounts = $('#js-ulUpByAmount .js-value');            
            months.each(function(i, n) {                
                obj.push({
                    Key: $(n).val(),
                    Value:  parseFloat($(amounts.eq(i)).val().replace(/,/g, ''))
                });
            });
            $('#upByAmountJson').val(utils.toJsonString(obj));
            
            obj = [];
            var months = $('#js-ulUpByScore .js-month'), amounts = $('#js-ulUpByScore .js-value');            
            months.each(function(i, n) {                
                obj.push({
                    Key: $(n).val(),
                    Value:  parseInt($(amounts.eq(i)).val())
                });
            });
            $('#upByScoreJson').val(utils.toJsonString(obj));
        }

        //开关切换
        function toggleNext(dom, show) {
            var els = $(dom).nextAll();

            if (show) {              
                els.show();
                els.find(':input').attr('data-vmust', 'true');
            }
            else {
                els.hide();
                els.find(':input').attr('data-vmust', 'false');
            }
        };

        $('.autonext').each(function (i, n) {
            toggleNext(n, $(n).find(':checkbox').first()[0].checked);
        }).click(function () {
            toggleNext(this, $(this).find(':checkbox').first()[0].checked);
        });

        //提醒
        $('#tipSetting').tabs({
            tabSelector: '>dt label'
        });

        //图标
        setTimeout(function () {
            $('#iconFile').uploadify({
                width: 120,
                height: 32,
                multi: false,
                removeTimeout: 0,
                swf: '../res/uploadify/uploadify.swf?v=<% =CryptoHelper.Random(100000,999999) %>',
                uploader: '../res/uploadify/SwfUpload.aspx?type=image&width=140&height=140',
                buttonClass:'iconfont',
                buttonText: '&#xe629; 上传图标',
                fileTypeExts: '<% =WAP2P.Web.PC.Admin.Res.uploadify.SwfUpload.AllowImages %>',
                formData: {
                    <% =WAP2P.Web.Admin.Membership.CookieName %> : '<% =Request.Cookies[WAP2P.Web.Admin.Membership.CookieName].Value %>'
                },
                onUploadSuccess: function(res, data) {                    
                    eval('var d = ' + data);                    
                    if (d.Success) {
                        $('#icon').val(d.Message).trigger('blur');
                        $('#iconResult').html('<img src="' + d.Message + '" />');
                    } else {
                        $.jError(d.Message);
                    }
                }
            });
        }, 10);      
    </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="list" runat="server">
</asp:Content>
