<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true"
    CodeBehind="DomainSetting.aspx.cs" Inherits="BingoWebsiteCollector.Web.Management.DomainSetting" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="right" style="text-align: center; margin-top: 10px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        多域名设置</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                        <tr class="tr1">
                            <td colspan="2">
                                <asp:Label ID="laTitle" runat="server" Text="添加多域名设置"></asp:Label><br />
                                <asp:Label ID="laErrorInfo" runat="server" ForeColor="Red"></asp:Label>
                                <asp:Label ID="laSuccessInfo" runat="server" ForeColor="Green"></asp:Label><br />
                                多域名设置，是用于控制我们采集多个域名内容的时候的一些设置，比如，我们采集www.sohu.com,和blog.sohu.com,因为这两个域名很可能编码不一致，这样我们就可以添加这两个域名，指定编码，另外我们采集淘宝相关内容的时候，必须屏蔽item.taobao.com，这样的宝贝页，我们也可以通过这个设置来解决。
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    名称<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbDomainName" runat="server" CausesValidation="True" EnableViewState="False"
                                    Wrap="False" ValidationGroup="checkAdd" />
                                <validation targetid="<%=tbDomainName.ClientID%>" targetname="名称" type="text" />
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    域名<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbDomain" runat="server" CausesValidation="True" EnableViewState="False"
                                    Wrap="False" ValidationGroup="checkAdd" />
                                <validation targetid="<%=tbDomain.ClientID%>" targetname="域名" type="text" />
                                请输入一个完整的域名信息，比如说<a href="http://www.baidu.com">http://www.baidu.com</a>, 
                                如果有端口号，和协议，也请正确输入，比如 https://www.google.com.hk:8000
                            </td>
                        </tr>
                        <tr>
                            <td width="20%">
                                <div align="right">
                                    网页编码<font color="red">*</font>：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbCharset" runat="server" CausesValidation="True" EnableViewState="False"
                                    Wrap="False" ValidationGroup="checkAdd" />
                                <validation targetid="<%=tbCharset.ClientID%>" targetname="网页编码" type="text" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    选项：</div>
                            </td>
                            <td align="left">
                                <asp:CheckBox ID="cbIsEnable" CssClass="checkbox" runat="server" Text="是否激活" Checked="True" /><br />
                                如果不激活，那么该域名将不会转换成本地地址，也不会被采集。
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:LinkButton ID="lbSubmit" runat="server" Text="【提交】" OnClick="lbSubmit_Click"
                                    OnClientClick="return validateForm()" />
                                &nbsp;<asp:LinkButton ID="lbCancel" runat="server" Text="【取消】" OnClick="lbCancel_Click" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear">
    </div>
    <div class="right" style="text-align: center; margin-top: 10px;">
        <div class="clear">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        多域名列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <asp:GridView ID="gvDomainSetting" runat="server" AutoGenerateColumns="False" GridLines="None"
                        CssClass="table_list" Width="100%" EnableModelValidation="True">
                        <Columns>
                            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False" Text="【编辑】" CommandArgument='<%# Bind("DomainId") %>'
                                        OnClick="lbEdit_Click"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandArgument='<%# Bind("DomainId") %>'
                                        Text="【删除】" OnClick="lbDelete_Click" OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="DomainId" HeaderText="编号" SortExpression="DomainId" />
                            <asp:CheckBoxField DataField="IsEnable" HeaderText="是否激活" SortExpression="IsEnable" />
                            <asp:BoundField DataField="DomainName" HeaderText="名称" SortExpression="DomainName" />
                            <asp:BoundField DataField="Domain" HeaderText="域名" SortExpression="Domain" />
                            <asp:BoundField DataField="Charset" HeaderText="网页编码" SortExpression="Charset" />
                            <asp:BoundField DataField="CreatedOn" HeaderText="创建时间" SortExpression="CreatedOn" />
                        </Columns>
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <EmptyDataTemplate>
                            没有数据，请先添加！
                        </EmptyDataTemplate>
                        <FooterStyle CssClass="dg_header" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear" style="margin-top: 10px;">
    </div>
</asp:Content>
