<%@ Page Language="C#"  MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Shop.Admin.User.KS_UserVIP" Codebehind="KS.UserVIP.aspx.cs" %>
<%@ Import Namespace="Kesion.APPCode" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Course" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<style>
.sTable td{border-bottom: #dce4e6 solid 1px !important; padding:10px 0 !important;}
</style>
   <asp:Panel ID="listPanel" runat="server" Width="100%">
    <div class="content-area mt20">	
        <div class="tabs_header">
            <ul class="tabs">
                <li <%=KSCMS.S("Contractype")==""?" class='active'":string.Empty %>><a href="KS.UserVIP.aspx?action=Contrac"><span>VIP会员购买设置</span></a></li>
                <li <%=KSCMS.S("Contractype")=="1"?" class='active'":string.Empty %>><a href="KS.UserVIP.aspx?action=Contrac&Contractype=1"><span>SVIP会员购买设置</span></a></li>
            </ul>
            <span class="fr">
                <a href="KS.UserVIPPopup.aspx">会员中心弹窗购买VIP设置</a>
            </span>
       </div>
        <table id="tbs" width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable"> 
         	<tr>
                <td align="left" class="righttd Lheight36 pt0" height="30">
                    <input type="button" name="Submit52" value="增加选项" class="button fr button_on mr20" onclick="javascript: doadd(1);"> 
                    <input name="editnum" type="hidden" id="editnum" value="<%=editnum %>" class="button fr button_on">   
                    <div class="ml20">充值金额及对应VIP天数：</div>
                </td>
            </tr>
            <tr>
                <td class="righttd"  style="padding:0px 5px;">
                    <table border="0" cellpadding="0" cellspacing="0" class="sTable" width="100%">
                        <tr class="CTitle">
                            <td width='3%' style="text-align:center">编号</td>
                             <td width='10%' style="text-align:center"> 会员名称</td>
                            <td width='10%' style="text-align:center"> 天数</td>
                             <td width='10%' style="text-align:center"> 标签</td>
                             <td width='10%' style="text-align:center">金额</td>  
                             <td width='10%' style="text-align:center"> 说明</td>
                             <td width='8%' style="text-align:center"> 说明是否划线</td>
                            <td style="text-align:center">操作</td>              
                        </tr>
                        <tbody id="addrecord"><%=tableStr %></tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="left" class="righttd"></td>
            </tr>
            <tr>
                <td align="left" class="righttd">VIP充值介绍：</td>
            </tr>
          	<tr>
                <td class="righttd">
                    <asp:TextBox ID="intro"  Width="98%" Height="200px" TextMode="MultiLine" runat="server"></asp:TextBox>                          
                    <% Kesion.APPCode.EditorAPI.EchoEditor("editor",this.intro.ClientID,"Basic");%>
                </td>
        	</tr>  
        </table>
		<script>
          function doadd(num) {
              var i;
              var str = "";
              var oldi = 0;
              var j = 0;
              oldi = parseInt(jQuery('#editnum').val());
              for (i = 1; i <= num; i++) {
                  j = i + oldi;
                  str = str + "<tr id='tr" + j + "'><td width=2% height=20> <div align=center><input type=hidden name=id id='id' value=" + j + ">" + j + "</div></td>";
                  str = str + "<td width=20%> <div align=center><input type=text class=textbox name=title" + j + " size=20 style='width:120px;text-align:center' value=''></div></td>";//名称
                  str = str + "<td width=15%> <div align=center><input type=text class=textbox name=days" + j + " size=20 style='width:80px;text-align:center' value=0>天</div></td>";
                  str = str + "<td width=20%> <div align=center><input type=text class=textbox name=tag" + j + " size=20 style='width:120px;text-align:center' value=''></div></td>";//标签
                  str = str + "<td width=10%> <div align=center><input type=text class=textbox name=money" + j + " size=5 style='width:80px;text-align:center' value=0>元</div></td>";
                  str = str + "<td width=20%> <div align=center><input type=text class=textbox name=remark" + j + " size=20 style='width:120px;text-align:center' value=''></div></td>";//说明
                  str = str + "<td width=8%> <div align=center><input type=checkbox class=checkbox name=remarkenabled" + j + " size=20   checked></div></td>";
                  str = str + "<td> <div align=center ><a href='javascript:;' class='greenFont' onClick='if (confirm(\"确认删除吗？\")){ del(" + j + "); }'>删除</a></div></td></tr>";
              }
              $("#addrecord").append(str);
              jQuery('#editnum').val(j);
          }
          function del(id) {
             $("#tr" + id).remove();
          }
        </script>

         <KS:Foot runat="server"  ID="Foot1" CancelButtonVisible="false" OnSubmit="Foot1_Submit"/>
        <KS:Tips ID="Tips1" runat="server" ImagePath="../../admin/images/" />

	</div>
  </asp:Panel>
  <asp:Panel ID="superPanel" runat="server" Width="100%" Visible="false">
        <div class="content-area mt20">
              <div class="tabs_header">
            <ul class="tabs">
                <li <%=KSCMS.S("Contractype")==""?" class='active'":string.Empty %>><a href="KS.UserVIP.aspx?action=Contrac"><span>VIP会员购买设置</span></a></li>
                <li <%=KSCMS.S("Contractype")=="1"?" class='active'":string.Empty %>><a href="KS.UserVIP.aspx?action=Contrac&Contractype=1"><span>SVIP会员购买设置</span></a></li>
            </ul>
            <span class="fr">
                <a href="KS.UserVIPPopup.aspx">会员中心弹窗购买VIP设置</a>
            </span>
       </div>
             <table id="tbs" width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable"> 
         	<tr>
                <td align="left" class="righttd Lheight36 pt0" height="30">
                    <input type="button" name="Submit52" value="增加选项" class="button fr button_on mr20" onclick="javascript: superdoadd(1);"> 
                    <input name="supereditnum" type="hidden" id="supereditnum" value="<%=supereditnum %>" class="button fr button_on">   
                    <div class="ml20">充值金额及对应<%=KSCMS.S("Contractype")=="1"?"SVIP":"VIP" %>天数：</div>
                </td>
            </tr>
            <tr>
                <td class="righttd" __designer:mapid="e0" style="padding:0px 5px;">
                    <table border="0" cellpadding="0" cellspacing="0" class="sTable" width="100%" __designer:mapid="e1">
                        <tr class="CTitle">
                            <td width='3%' style="text-align:center">编号</td>
                             <td width='10%' style="text-align:center"> 会员名称</td>
                            <td width='10%' style="text-align:center"> 天数</td>
                             <td width='10%' style="text-align:center"> 标签</td>
                             <td width='10%' style="text-align:center">金额</td>  
                             <td width='10%' style="text-align:center"> 说明</td>
                             <td width='8%' style="text-align:center"> 说明是否划线</td>
                            <td style="text-align:center">操作</td>              
                        </tr>
                        <tbody id="superaddrecord"><%=supertableStr %></tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="left" class="righttd"></td>
            </tr>
            <tr>
                <td align="left" class="righttd">SVIP会员充值介绍：</td>
            </tr>
          	<tr>
                <td class="righttd">
                    <asp:TextBox ID="superintro"  Width="98%" Height="200px" TextMode="MultiLine" runat="server"></asp:TextBox>                          
                    <% Kesion.APPCode.EditorAPI.EchoEditor("editor",this.superintro.ClientID,"Basic");%>
                </td>
        	</tr>  
        </table>
		<script>
             function superdoadd(num) {
              var i;
              var str = "";
              var oldi = 0;
              var j = 0;
              oldi = parseInt(jQuery('#supereditnum').val());
              for (i = 1; i <= num; i++) {
                  j = i + oldi;
                  str = str + "<tr id='tr" + j + "'>";
                  str = str + "<td width=2% height=20> <div align=center><input type=hidden name=id id='id' value=" + j + ">" + j + "</div></td>";
                    str = str + "<td width=20%> <div align=center><input type=text class=textbox name=title" + j + " size=20 style='width:120px;text-align:center' value=''></div></td>";//名称
                  str = str + "<td width=15%> <div align=center><input type=text class=textbox name=days" + j + " size=20 style='width:120px;text-align:center' value=0>天</div></td>";
                  str = str + "<td width=20%> <div align=center><input type=text class=textbox name=tag" + j + " size=20 style='width:120px;text-align:center' value=''></div></td>";//标签
                  str = str + "<td width=10%> <div align=center><input type=text class=textbox name=money" + j + " size=5 style='width:80px;text-align:center' value=0>元</div></td>";
                   str = str + "<td width=20%> <div align=center><input type=text class=textbox name=remark" + j + " size=20 style='width:120px;text-align:center' value=''></div></td>";//说明
                  str = str + "<td width=8%> <div align=center><input type=checkbox class=checkbox name=remarkenabled" + j + " size=20   checked></div></td>";
                  str = str + "<td> <div align=center ><a href='javascript:;' class='greenFont' onClick='if (confirm(\"确认删除吗？\")){ superdel(" + j + "); }'>删除</a></div></td>";
                  str = str + "</tr>";

              }
              $("#superaddrecord").append(str);
              jQuery('#supereditnum').val(j);
          }
          function superdel(id) {
             $("#tr" + id).remove();
            }

        </script>

       <%-- <KS:Foot runat="server" CancelButtonEnabled="false" ID="Foot1" OnSubmit="Foot1_Submit"/>--%>
         <KS:Foot runat="server"  ID="FootSuper" CancelButtonVisible="false"  OnSubmit="FootSuper_Submit" />
        <KS:Tips ID="Tips2" runat="server" ImagePath="../../admin/images/" />

        </div>
  </asp:Panel>
</asp:Content>