<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="true"  CodeFile="reg.aspx.cs" Inherits="_reg" %>
<%@ Register TagPrefix="anthem" Namespace="Anthem" Assembly="Anthem" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASPXCN.COM.CN注册新用户</title>
<script language="javascript" type="text/javascript">
<!--
window.onerror = function(){
return true;
}

function Anthem_Error(result) 
{
    alert('页面显示出现错误,请将此错误报告管理员Email:webmaster@aspxcn.cn,错误信息如下: ' + result.error);
}

String.prototype.len=function()
{ 
return this.replace(/[^\x00-\xff]/g,"**").length; 
} 

function CheckNameLength(source, arguments) 
{ 
if (arguments.Value.len()<=18) 
arguments.IsValid = true; 
else 
arguments.IsValid = false; 
}

var kws = '管理员|访客|叼|妈妈的|我靠|操|fuck|sb|bitch|guest|他妈的|性爱|操你妈|三级片|sex|腚|妓|娼|阴蒂|奸|尻|贱|婊|靠|叉|龟头|屄|赑|妣|肏|尻|屌|<|>|"';
function checkKeyword(source, arguments)
{
if (eval("/"+kws+"/gi.test(arguments.Value)"))
arguments.IsValid = false; 
else
arguments.IsValid = true; 
}
//-->
</script>
</head>
<body style="text-align: center">
    <form id="form1" runat="server" >
        <br />
        <anthem:Panel runat=server AutoUpdateAfterCallBack=true ID="RegPanel">
        <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderStyle="Dashed" BorderWidth="1px" Font-Names="宋体" Font-Size="12pt" LoginCreatedUser="False" ContinueDestinationPageUrl="~/default.aspx" Width="300px" CreateUserButtonText="确 定">
            <WizardSteps>
                <asp:CreateUserWizardStep runat="server">
                    <ContentTemplate>
                        <table border="0" style="width: 300px; font-family: 宋体">
                            <tr>
                                <td align="center" colspan="2" style="font-weight: bold; color: white; height: 24px;
                                    background-color: #507cd1">
                                    注册新帐户</td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">用户名:</asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="UserName" runat="server" MaxLength="18"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                        ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                    </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">密码:</asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="Password" runat="server" TextMode="Password" MaxLength="20"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                        ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">确认密码:</asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="ConfirmPassword"  runat="server" TextMode="Password" MaxLength="20"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                        ErrorMessage="必须填写“确认密码”。" ToolTip="必须填写“确认密码”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">Email:</asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="Email" runat="server" MaxLength="50"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                        ErrorMessage="必须填写“电子邮件”。" ToolTip="必须填写“电子邮件”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">安全提示问题:</asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="Question" runat="server" MaxLength="20"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
                                        ErrorMessage="必须填写“安全提示问题”。" ToolTip="必须填写“安全提示问题”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 90px">
                                    <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">安全答案:</asp:Label></td>
                                <td align="left">
                                    <asp:TextBox ID="Answer" runat="server" MaxLength="20"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
                                        ErrorMessage="必须填写“安全答案”。" ToolTip="必须填写“安全答案”。" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2">
                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="*“密码”和“确认密码”必须匹配。"
                                        ValidationGroup="CreateUserWizard1"></asp:CompareValidator><anthem:CustomValidator ID="CustomValidator1" runat="server" AutoUpdateAfterCallBack="true"
                                        ClientValidationFunction="CheckNameLength" ControlToValidate="UserName" Display="Dynamic"
                                        ErrorMessage="*用户名不能大于18个字符或9个中文字!" SetFocusOnError="true" ValidationGroup="CreateUserWizard1"></anthem:CustomValidator><anthem:RegularExpressionValidator ID="emailValidator" runat="server" AutoUpdateAfterCallBack="true"
                                        ControlToValidate="Email" Display="Dynamic" ErrorMessage="*Email格式有误，请重新输入!"
                                        SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                        ValidationGroup="post"></anthem:RegularExpressionValidator>
                                    <anthem:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                        AutoUpdateAfterCallBack="true" ControlToValidate="UserName" Display="Dynamic" ErrorMessage="*含有非法的特殊符号!"
                                        SetFocusOnError="True" ValidationExpression="[^|?*:/\\]*$"
                                        ValidationGroup="post"></anthem:RegularExpressionValidator>
                                    <anthem:CustomValidator ID="CustomValidator2" runat="server" AutoUpdateAfterCallBack="true"
                                        ClientValidationFunction="checkKeyword" ControlToValidate="UserName" Display="Dynamic"
                                        ErrorMessage="*含有非法关键字!" SetFocusOnError="true" ValidationGroup="CreateUserWizard1"></anthem:CustomValidator></td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" style="color: red">
                                    <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:CreateUserWizardStep>
                <asp:CompleteWizardStep runat="server">
                    <ContentTemplate>
                        <table border="0" style="font-size: 100%; width: 300px; font-family: 宋体">
                            <tr>
                                <td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #507cd1">
                                    完成</td>
                            </tr>
                            <tr>
                                <td>
                                    已成功创建您的帐户。</td>
                            </tr>
                            <tr>
                                <td align="right" colspan="2">
                                    <asp:Button ID="ContinueButton" runat="server" BackColor="White" BorderColor="#507CD1"
                                        BorderStyle=Dashed BorderWidth="1px" CausesValidation="False"
                                         ForeColor="#284E98" Text="关闭" OnClientClick="window.close()" ValidationGroup="CreateUserWizard1" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:CompleteWizardStep>
            </WizardSteps>
            <SideBarStyle BackColor="#507CD1" Font-Size="0.9em" VerticalAlign="Top" />
            <TitleTextStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <SideBarButtonStyle  ForeColor="White" BackColor="#507CD1" />
            <NavigationButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
                BorderWidth="1px"  ForeColor="#284E98" />
            <HeaderStyle BackColor="#284E98" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
                ForeColor="White" HorizontalAlign="Center" BorderColor="#EFF3FB" BorderWidth="2px" />
            <CreateUserButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Dashed"
                BorderWidth="1px"  ForeColor="#284E98" />
            <ContinueButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
                BorderWidth="1px"  ForeColor="#284E98" />
            <StepStyle Font-Size="0.8em" />
            <CancelButtonStyle BorderStyle="Dashed" />
        </asp:CreateUserWizard></anthem:Panel>
    </form>
</body>
</html>
