<%@ Page Language="C#" MasterPageFile="Blog.master" AutoEventWireup="true" Inherits="Ruiao.WebSite.Blog.Activation" Codebehind="Activation.aspx.cs" %>
<asp:Content ID="MyHead" ContentPlaceHolderID="cphHead" runat="Server">
<script type="text/javascript" src="<%=AppUrl %>/Common/Script/WebResource.axd.js"></script>
<script type="text/javascript">
function BlogNameUsedCheck_CallServer()
{
    var me = document.getElementById("BlogNameUsedCheckButton").disabled = true;
    
    var Params = escape(document.getElementById('<%if(!String.IsNullOrEmpty(Config["BloggerDomainName"]) && bool.Parse(Config["DefaultAllowMyDomainName"])){ %><%=tbName1.ClientID %><%}else{%><%=tbName2.ClientID %><%} %>').value);
    
    <%= ClientScript.GetCallbackEventReference(this, "Params", "BlogNameUsedCheck_ReceiveServerData",null)%>;
}
function BlogNameUsedCheck_ReceiveServerData(ReceiveValue)
{
    alert(ReceiveValue);
    
    var me = document.getElementById("BlogNameUsedCheckButton").disabled = false;
}
</script>
</asp:Content>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMain" Runat="Server">
<div id="ContentContainer">

    <form id="Activation_Form" runat="server" >

    <div id="ActivationContainer">
        <div id="Title"><span>激活博客</span></div>
        <div id="Body">
        
        <div id="BloggerUrl">
        <div class="Title">博客地址：</div>
        <%if (!String.IsNullOrEmpty(Config["BloggerDomainName"]) && bool.Parse(Config["DefaultAllowMyDomainName"])){ %>
        <div class="Body"><%=Ruiao.Common.AppSetting.UrlScheme%><asp:TextBox ID="tbName1" runat="server" CssClass="Input_01"></asp:TextBox>.<%=Config["BloggerDomainName"].ToString() %>
        <%}else{%>
        <div class="Body"><%=Ruiao.Common.AppSetting.AppUrl + "/" + Config["BloggerPath"]%>/<asp:TextBox ID="tbName2" runat="server" CssClass="Input_01"></asp:TextBox>
        <%} %>
        <button id="BlogNameUsedCheckButton" onclick="BlogNameUsedCheck_CallServer()" class="SubmitButton">检查有效性</button>
        <span class="Notes">博客的唯一标识与URL路径，请使用<%=Ruiao.Blog.Entity.bgBlog.Name_MixLength%>-<%=Ruiao.Blog.Entity.bgBlog.Name_MaxLength%>个英文与数字</span>
        </div>
        </div>
        
        <div id="BlogInfo">
        <div class="Title">必要资料：</div>
        <div class="Body">
        <ul>
        <li><div class="Left">主标题：</div><div class="Right"><asp:TextBox ID="tbTitle" runat="server" CssClass="Input_01"></asp:TextBox><span class="Notes">博客主标题，请使用<%=Ruiao.Blog.Entity.bgBlog.Title_MixLength%>-<%=Ruiao.Blog.Entity.bgBlog.Title_MaxLength%>个中英文与数字</span></div></li>
        <li><div class="Left">副标题：</div><div class="Right"><asp:TextBox ID="tbDescription" runat="server" CssClass="Input_01"></asp:TextBox><span class="Notes">博客副标题，请使用<%=Ruiao.Blog.Entity.bgBlog.SubTitle_MixLength%>-<%=Ruiao.Blog.Entity.bgBlog.SubTitle_MaxLength%>个中英文与数字</span></div></li>
        <li><div class="Left">联系信箱：</div><div class="Right"><asp:TextBox ID="tbEmail" runat="server" CssClass="Input_01"></asp:TextBox><span class="Notes">请输入有效的邮件地址，这将使得您的访客更容易与您取得联系</span></div></li>
        <li><div class="Left">博客频道：</div><div class="Right"><asp:DropDownList ID="ddlChannel" runat="server"></asp:DropDownList><span class="Notes">请选择正确的所属频道，可以让别人更容易访问到您的博客</span></div></li>
        </ul>
        </div>
        </div>
        
        <div id="Submit"><asp:Button ID="btActivation" runat="server" Text="立即激活博客" OnClick="btActivation_Click" CssClass="SubmitButton" /></div>
            
        </div>
    </div>

    </form>
    
</div>
</asp:Content>