<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="pg_RegisterUser.aspx.cs" Inherits="pg_RegisterSite" Title="Untitled Page" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" Runat="Server">
    <div class="contentDiv">
    <table border="0" cellpadding="0" cellspacing="0" >
        <tr id="Tr1">
            <td id="rightTableData" valign="top">
                <div id="linksPanel" style="margin-right:15px; margin-top : 10px;">
                    <table id="tblpanel" border="0" cellpadding="0" cellspacing="0" style="width:200px;">
                        <tr>
                            <td id="panelheadright" class="panelheadright">
                            </td>
                            <td id="panelheadrepeat" class="panelheadrepeat" align="center" style="width:160px;">
                                <asp:Label ID="lblpanelHead" runat="server" Text="منوی سایت" style="color:White; font-weight:bold; "></asp:Label>
                            </td>
                            <td id="panelheadleft" class="panelheadleft">
                            </td>
                        </tr>
                        <tr>
                            <td id="panelmarginright" class="panelmarginright">
                            </td>
                            <td valign="top" class="panelcontentback" style="background-image:none; background-color : White; "> <!-- ************ Content Place !-->
                                <div class="panelcontent" style="margin-top:17px;">
                                    <asp:Panel ID="panelMenues" runat="server">
                                    </asp:Panel>
                                </div>
                            </td>
                            <td id="panelmarginleft" class="panelmarginleft" align="left">
                            </td>
                        </tr>
                        <tr>
                            <td id="panelbottomright" class="panelbottomright" align="right" >
                            </td>
                            <td id="panelbottomrepeat" class="panelbottomrepeat" style="width:160px;">
                            </td>
                            <td id="panelbottomleft" class="panelbottomleft" align="left";>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
            <td id="contentTableData" style="width:100%; padding-right : 10px;" align="right"; valign="top"; >
                <div id="RegContent" class="contentDiv" >
                    <div id="panelContainer" style="width:420px;">
                        <table id="panel" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td id="Td1" class="panelheadright">
                                </td>
                                <td id="Td2" class="panelheadrepeat" align="center" style="width:380px;">
                                    <asp:Label ID="Label1" runat="server" Text="مشخصات حساب کاربری" style="color:White;"></asp:Label>
                                </td>
                                <td id="Td3" class="panelheadleft">
                                </td>
                            </tr>
                            <tr>
                                <td id="Td4" class="panelmarginright">
                                </td>
                                <td valign="top" class="panelcontentback" > <!-- ************ Content Place !-->
                                    <div class="panelcontent">

                                        <table border="0" cellpadding="0" cellspacing="5px">
                                            <tr>
                                                <td align="left" valign="top">
                                                    <asp:Label ID="Label2" runat="server" Text="نام کاربری :"></asp:Label>
                                                </td>
                                                <td align="right" valign="top">
                                                    <asp:TextBox ID="tbUserName" runat="server" Font-Names="Tahoma" Font-Size="9pt" Width="200px"></asp:TextBox>
                                                    <cc1:TextBoxWatermarkExtender ID="TextBox1_TextBoxWatermarkExtender" 
                                                        runat="server" Enabled="True" TargetControlID="tbUserName" 
                                                        WatermarkCssClass="WaterMarkClass" WatermarkText="اجباری - غیر تکراری">
                                                    </cc1:TextBoxWatermarkExtender>
                                                    <asp:RequiredFieldValidator ID="validTbUserName" runat="server" 
                                                        ErrorMessage="*" 
                                                        ControlToValidate="tbUserName" >
                                                    </asp:RequiredFieldValidator>
                                                </td>
                                                <td align="center" valign="top" style="width:30px; height:20px;">
                                                    <asp:UpdatePanel ID="UpdatePanelImage1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                            <asp:Image ID="imgCheckUsername" runat="server" Width="30px" Height="20px" ImageUrl="~/images/ok.gif" Visible="false"/>
                                                        </ContentTemplate>
                                                        <Triggers>
                                                            <asp:AsyncPostBackTrigger ControlID="btnCheck" EventName="Click"/>
                                                        </Triggers>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <asp:Label ID="Label3" runat="server" Text="کلمه عبور :"></asp:Label>
                                                </td>
                                                <td align="right" valign="top">
                                                    <asp:TextBox ID="tbUserPass1" runat="server" Font-Names="Tahoma" Font-Size="9pt" Width="200px" TextMode="Password"></asp:TextBox>
                                                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                                        ErrorMessage="**" ControlToValidate="tbUserPass1" 
                                                        ControlToCompare="tbUserPass2" Operator="Equal">
                                                    </asp:CompareValidator>
                                                    <asp:RequiredFieldValidator ID="validtbpass1" runat="server" 
                                                        ErrorMessage="*" 
                                                        ControlToValidate="tbUserPass1" >
                                                    </asp:RequiredFieldValidator>
                                                </td>
                                                <td align="center" valign="top" style="width:30px; height:20px;">
                                                    <asp:UpdatePanel ID="UpdatePanelImage2" runat="server" RenderMode="Inline" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                            <asp:Image ID="imgCheckPass1" runat="server" Width="30px" Height="20px" ImageUrl="~/images/ok.gif" Visible="false"/>
                                                        </ContentTemplate>
                                                        <Triggers>
                                                            <asp:AsyncPostBackTrigger ControlID="btnCheck" EventName="Click"/>
                                                        </Triggers>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <asp:Label ID="Label4" runat="server" Text="تکرار کلمه عبور :"></asp:Label>
                                                </td>
                                                <td align="right" valign="top">
                                                    <asp:TextBox ID="tbUserPass2" runat="server" Font-Names="Tahoma" Font-Size="9pt" Width="200px" TextMode="Password">
                                                    </asp:TextBox>
                                                </td>
                                                <td align="center" valign="top" style="width:30px; height:20px;">
                                                    <asp:UpdatePanel ID="UpdatePanelImage3" runat="server" RenderMode="Inline" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                            <asp:Image ID="imgCheckPass2" runat="server" Width="30px" Height="20px" ImageUrl="~/images/ok.gif" Visible="false" />
                                                        </ContentTemplate>
                                                        <Triggers>
                                                            <asp:AsyncPostBackTrigger ControlID="btnCheck" EventName="Click"/>
                                                        </Triggers>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <asp:Label ID="Label5" runat="server" Text="آدرس ایمیل :"></asp:Label>
                                                </td>
                                                <td align="right" valign="top">
                                                    <asp:TextBox ID="tbEmailAddress" runat="server" Font-Names="Tahoma" Font-Size="9pt" Width="200px">
                                                    </asp:TextBox>
                                                </td>
                                                <td align="center" valign="top" style="width:30px; height:20px;">
                                                </td>
                                            </tr>
                                            <tr style="height:40px;">
                                                <td valign="middle" align="center">
                                                    <div >
                                                        <asp:UpdateProgress ID="UpdateProgressCheck" runat="server" AssociatedUpdatePanelID="UpdatePanelCheckButton" DisplayAfter="0" >
                                                            <ProgressTemplate>
                                                                <asp:Image ID="Image2" Width="40px" Height="40px" runat="server" ImageUrl="~/images/loading1.gif" ImageAlign="Middle"/>
                                                            </ProgressTemplate>
                                                        </asp:UpdateProgress>
                                                    </div>
                                                </td>
                                                <td align="right" valign="middle" >
                                                    <asp:UpdatePanel ID="UpdatePanelCheckButton" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                                                        <ContentTemplate>
                                                            <asp:LinkButton ID="btnCheck" runat="server" CssClass="smallbuttons" 
                                                                Width="60px" Height="20px" style="float:right; margin-top : 10px;" onclick="btnCheck_Click">بررسی</asp:LinkButton>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                                <td id="Td5" class="panelmarginleft" align="left">
                                </td>
                            </tr>
                            <tr>
                                <td id="Td6" class="panelbottomright" align="right" >
                                </td>
                                <td id="Td7" class="panelbottomrepeat" style="width:380px;">
                                </td>
                                <td id="Td8" class="panelbottomleft" align="left";>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- ************************************************************************************************** RoleChooser ::
                    *******************************************************************************************************
                    !-->
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
                        <ContentTemplate>
                            <div id="Div2" style="width:390px; padding-top : 30px;">
                                <table id="Table2" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td id="Td92" class="panelheadright">
                                        </td>
                                        <td id="Td102" class="panelheadrepeat" align="center" style="width:350px;">
                                            <asp:Label ID="Label12" runat="server" Text="نقش کاربر" style="color:White;"></asp:Label>
                                        </td>
                                        <td id="Td112" class="panelheadleft">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="Td122" class="panelmarginright">
                                        </td>
                                        <td valign="top" class="panelcontentback" > <!-- ************ Content Place !-->
                                            <div id="divRoleType" class="panelcontent" style="text-align:right; " runat="server">
                                                <asp:RadioButton ID="rbAdmin" runat="server" Text="کارمند آموزشگاه" 
                                                    GroupName="role" oncheckedchanged="rbAdmin_CheckedChanged" 
                                                    AutoPostBack="True" Enabled="false"></asp:RadioButton><br />
                                                <asp:RadioButton ID="rbTeacher" runat="server" Text="مدرس" GroupName="role" oncheckedchanged="rbAdmin_CheckedChanged" 
                                                    AutoPostBack="True" Enabled="false"></asp:RadioButton><br />
                                                <asp:RadioButton ID="rbStudent" runat="server" Text="دانشجو" GroupName="role" oncheckedchanged="rbAdmin_CheckedChanged" 
                                                    AutoPostBack="True" Enabled="false"></asp:RadioButton><br />
                                                <asp:RadioButton ID="rbUser" runat="server" Text="کاربر سایت" GroupName="role" oncheckedchanged="rbAdmin_CheckedChanged" 
                                                    AutoPostBack="True" Enabled="false"></asp:RadioButton><br />
                                            </div>
                                        </td>
                                        <td id="Td132" class="panelmarginleft" align="left">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="Td142" class="panelbottomright" align="right" >
                                        </td>
                                        <td id="Td152" class="panelbottomrepeat" style="width:350px;">
                                        </td>
                                        <td id="Td162" class="panelbottomleft" align="left";>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="progressPanel" style="margin-top:30px; ">
                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" >
                                    <ProgressTemplate>
                                        <asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading1.gif" 
                                            Height="60px" Width="60px" ImageAlign="Middle"/>
                                    </ProgressTemplate>
                                </asp:UpdateProgress>
                            </div>
                            <!-- ************************************************************************************************** panel 2222222:
                            *******************************************************************************************************
                            !-->
                             <div id="divUserType" runat="server" visible="false" style="width:390px; margin-top : 30px;">
                                <table id="tbl12" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td id="Td92" class="panelheadright">
                                        </td>
                                        <td id="Td102" class="panelheadrepeat" align="center" style="width:350px;">
                                            <asp:Label ID="Label6" runat="server" Text="مشخصات شخصی کاربر" style="color:White;"></asp:Label>
                                        </td>
                                        <td id="Td112" class="panelheadleft">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="Td122" class="panelmarginright">
                                        </td>
                                        <td valign="top" class="panelcontentback" > <!-- ************ Content Place !-->
                                            <div id="divPanelContent" runat="server" class="panelcontent">
                                                <table border="0" cellpadding="0" cellspacing="5px">
                                                    <tr>
                                                        <td align="left" valign="top">
                                                            <asp:Label ID="Label22" runat="server" Text="نام و نام خانوادگی :"></asp:Label>
                                                        </td>
                                                        <td align="right" valign="top">
                                                            <asp:TextBox ID="tbFullname" runat="server" Width="200" Font-Names="Tahoma" Font-Size="9"></asp:TextBox>
                                                            <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" 
                                                                runat="server" Enabled="True" TargetControlID="tbFullname" 
                                                                WatermarkCssClass="WaterMarkClass" WatermarkText="اجباری">
                                                            </cc1:TextBoxWatermarkExtender>
                                                            <asp:RequiredFieldValidator ID="validTbFullname" runat="server" ErrorMessage="*" ControlToValidate="tbFullname" ></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" valign="top">
                                                            <asp:Label ID="Label7" runat="server" Text="جنسیت :"></asp:Label>
                                                        </td>
                                                        <td align="right" valign="top">
                                                            <asp:RadioButton ID="rbMale" runat="server" Text="مرد" GroupName="gender" Checked="true"/>
                                                            <asp:RadioButton ID="rbFemale" runat="server" Text="زن" GroupName="gender" style="margin-right:15px;" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="left" valign="top">
                                                            <asp:Label ID="Label8" runat="server" Text="میزان تحصیلات :"></asp:Label>
                                                        </td>
                                                        <td align="right" valign="top">
                                                            <asp:DropDownList ID="cmbTahsilat" runat="server" Width="200" Font-Names="Tahoma" Font-Size="9">
                                                                <asp:ListItem></asp:ListItem>
                                                                <asp:ListItem>زیر دیپلم</asp:ListItem>
                                                                <asp:ListItem>دیپلم</asp:ListItem>
                                                                <asp:ListItem>پیش دانشگاهی</asp:ListItem>
                                                                <asp:ListItem>فوق دیپلم</asp:ListItem>
                                                                <asp:ListItem>دانشجو</asp:ListItem>
                                                                <asp:ListItem>لیسانس</asp:ListItem>
                                                                <asp:ListItem>بالاتر</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" align="center" valign="middle">
                                                            <asp:Label ID="lblMoreAttributes" runat="server" Text=""></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                        <td id="Td132" class="panelmarginleft" align="left">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="Td142" class="panelbottomright" align="right" >
                                        </td>
                                        <td id="Td152" class="panelbottomrepeat" style="width:350px;">
                                        </td>
                                        <td id="Td162" class="panelbottomleft" align="left";>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnCheck" EventName="Click"/>
                        </Triggers>
                    </asp:UpdatePanel>
                    <div id="sendButton" style="margin-top:20px; vertical-align:middle;">
                        <asp:UpdatePanel ID="UpdatePanelOkButton" runat="server">
                            <ContentTemplate>
                                <asp:LinkButton ID="btnOk" runat="server" Visible="false" Height="25px" 
                                    Width="100px" CssClass="buttons" onclick="btnOk_Click" >تأیید</asp:LinkButton>
                                <div id="divProgressOkButton" style="width:40px; height:40px; vertical-align:middle; text-align:center;">
                                    <asp:UpdateProgress ID="UpdateProgressOkButton" runat="server" AssociatedUpdatePanelID="UpdatePanelOkButton">
                                        <ProgressTemplate>
                                            <asp:Image ID="Image3" runat="server" ImageUrl="~/images/loading1.gif" Width="40px" Height="40px"/>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <asp:UpdatePanel ID="UpdatePanelErrorList" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <div id="divErrorList" runat="server" class="errorList">
                                    <asp:Label ID="lblErrorList" runat="server" Text=""></asp:Label>
                                </div>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnOk" EventName="Click"/>
                            </Triggers>
                        </asp:UpdatePanel>
                    <!-- ************************************************************************************* !-->
                   </div>
               </div>
            </td>
        </tr>
    </table>
</div>
</asp:Content>

