<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_Domain" Title="Untitled Page" Codebehind="KS.Domain.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
       <!--<KS:TopNav ID="TopNav2" runat="server" Text="频道绑定二级域名配置" />-->
<div class="content-area mt20">
       <script>
              function showDomain() {
       if (jQuery("#<%=this.RdbAllowSubDomain.ClientID %> :radio[checked]").val() == "true") {
           jQuery(".rootDomain").show();
       } else {
           jQuery(".rootDomain").hide();
       }

              }
           jQuery(document).ready(function () {
               showDomain();
           });
       </script>
       <div class="myTitle">频道绑定二级域名配置</div>
       <table id="tbs" width="99%" border="0" cellpadding="1" cellspacing="1" class="CTable" style="table-layout:fixed"> 
             <tr>
                  <td align="right" class="lefttd" height="30" style="width: 198px" valign="top">
                      <strong>网站是否启用二级域名：</strong></td>
                  <td class="righttd">
                      <asp:RadioButtonList ID="RdbAllowSubDomain" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                       <asp:ListItem Value="true">启用</asp:ListItem>
                       <asp:ListItem Value="false" Selected="True">不启用</asp:ListItem>
                      </asp:RadioButtonList>
                      <div class="tips">当您的网站会员中心、考试系统、商城系统、问吧系统或是频道绑定二级域名时必须设置启用二级域名。</div>
                      <div class="rootDomain"><strong>根域名：</strong><asp:TextBox ID="TxtRootDomain" runat="server" CssClass="textbox" /> <span class="tips">如：kesion.com，不能带“www”。</span></div>
                      </td>
              </tr>
       </table>
       <div class="rootDomain">
        <KS:KSGV ID="list" cssclass="CTable" runat="server" Width="100%" AutoGenerateColumns="False" EmptyDataText="暂无域名绑定配置" GridLines="None" OnRowDataBound="list_RowDataBound" PagerType="CustomNumeric">
            <Columns>
             <asp:BoundField HeaderText="ID" DataField="ID">
                    <ItemStyle HorizontalAlign="Center" Width="40px" />
                </asp:BoundField>
          
            <asp:TemplateField HeaderText="频道名称">
                <ItemStyle HorizontalAlign="Left" Width="150px" />
                <ItemTemplate>
                  <%#Eval("name") %>
                 </ItemTemplate>
            </asp:TemplateField>  
                <asp:TemplateField HeaderText="控制器标识">
                <ItemStyle HorizontalAlign="Center" Width="50px" />
                <ItemTemplate>
                  <%#Eval("control") %>
                 </ItemTemplate>
            </asp:TemplateField>  
            <asp:TemplateField HeaderText="绑定域名">
                <ItemStyle HorizontalAlign="Center" />
                <ItemTemplate>
                  <asp:TextBox CssClass="textbox" Width="460px" ID="TxtDomain" Text='<%#Eval("Domain") %>' runat="server"></asp:TextBox>
                 </ItemTemplate>
            </asp:TemplateField>  
            <asp:TemplateField HeaderText="是否启用">
                <ItemStyle HorizontalAlign="Center" />
                <ItemTemplate>
                  <asp:CheckBox ID="CkbEnable" runat="server" />
                  <asp:HiddenField ID="HidEnable" runat="server" Value='<%# Eval("enable") %>' />
                  <asp:HiddenField ID="HidControl" runat="server" Value='<%# Eval("control") %>' />
                 </ItemTemplate>
            </asp:TemplateField>  
           
            </Columns>
           
            <PagerStyle CssClass="Page" HorizontalAlign="Right" />
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
            
      </KS:KSGV>

   
        <br />
        <script type="text/javascript">
            showtips('<span class="state"><strong>说明：</strong><br /></span>1、绑定二级域名前需要先将您要绑定的二级域名解释到您的服务器IP；<br/>2、需要在<a href="KS.Config.aspx" style="color:red">基本信息设置</a>里的“其它选项里”找到生成路径设置将其设置为“绝对路径”；<br/>3、如需某个频道不绑定二级域名可以直接留空或是设置为不启用；<br/>4、绑定二级域名以http://开头，后面不能带/，如：http://news.kesion.com；');
		</script>
    </div>
       
     <asp:Panel ID="Panel1" runat="server" Height="30px" CssClass="main-button">
            &nbsp;&nbsp;<asp:Button ID="Button1" CssClass="button" runat="server" Text="批量保存" 
                onclick="Button1_Click" />&nbsp;</asp:Panel>
       
	  </div>

 
</asp:Content>

