<%@ Page Language="C#" MasterPageFile="../Global.Master" AutoEventWireup="true" CodeBehind="Member.aspx.cs" Inherits="Web.AdminManager.Setting.Member" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Common/js/Common_RegexString.js"></script>
    <script src="../js/Setting.Member.js"></script>
    <script src="/Common/js/Common_Class.js" type="text/javascript"></script>
    <%=Web.Lib.CityHelper.GetCTScript("CT")%>
    <script src="/Common/UEditor/editor_config.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_all_min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Common/UEditor/themes/default/ueditor.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="UI_Edit" runat="server" visible="false">

        <form action="" method="post" class="ui-form ui-form-vertical">
            <fieldset>
                <legend>会员资料</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">帐号名</label><div class="ui-form-ctrls">
                        <input type="text" name="UserName" id="UserName"
                            class="ui-input-small" value="<%=mm.UserName %>" /><span
                                class="UserName ui-help-inline">帐号名称</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">Email</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mm.Email %>" name="Email"
                            id="Email" class="ui-input-small" /><span class="Email ui-help-inline">电子信箱</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">帐号密码</label><div class="ui-form-ctrls">
                        <input type="text" value="" name="PassWord" id="PassWord"
                            class="ui-input-small" /><span class="PassWord ui-help-inline"><%=Action == "Edit" ? "不修改请留空" : "帐号密码"%></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">会员级别</label><div class="ui-form-ctrls">
                        <select size="1" name="UserGrade" id="UserGrade">
                            <option value="0">普通会员</option>
                            <%=UserGroupString%>
                        </select><span class="UserGrade ui-help-inline">当前的会员级别，<a href="Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>">点这里设置会员级别</a></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">代理权限</label><div class="ui-form-ctrls">
                        <select size="1" name="IsAgent" id="IsAgent">
                            <option value="false" <%=mm.IsAgent?"":"selected"%>>无</option>
                            <option value="true" <%=mm.IsAgent?"selected":""%>>有</option>
                        </select><span class="UserGrade ui-help-inline">是否拥有代理权限</span>
                    </div>
                </div>
                <div class="ui-form-group" id="uiBindDomain">
                    <label class="ui-form-label">绑定域名</label><div class="ui-form-ctrls">
                        <input class="ui-input-small" type="text" name="BindDomain" id="BindDomain" value="<%=ms.BindDomain %>" />
                        <span class="BindDomain ui-help-inline">代理的访问域名，多个域名以英文字符“|”隔开</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">持有者</label><div class="ui-form-ctrls">
                        <select size="1" name="IsCompany" id="IsCompany">
                            <option value="false" <%=mm.IsCompany?"":"selected"%>>个人</option>
                            <option value="true" <%=mm.IsCompany?"selected":""%>>企业</option>
                        </select><input type="text" value="<%=mm.Name %>" name="Name" id="Name" class="ui-input-small" />
                        <span
                            class="Name ui-help-inline">帐号持有人，可以是单位名称或者姓名</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">固定电话</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mm.Tel %>" name="Tel"
                            id="Tel" class="ui-input-small" />
                        <span class="Tel ui-help-inline">固定电话与手机两者必填一项</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">手机</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mm.Mobile %>" name="Mobile"
                            id="Mobile" class="ui-input-small" />
                        <span class="Mobile ui-help-inline">固定电话与手机两者必填一项</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">QQ</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mm.QQ %>" name="QQ"
                            id="QQ" class="ui-input-small" /><span class="QQ ui-help-inline">选填</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">所在地区</label><div class="ui-form-ctrls">
                        <span id="cts"><%=Web.Lib.CityHelper.GetCTSelect("CT","CT",mm.CTCode)%></span>
                        <span class="CTCode ui-help-inline">选填</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">联系地址</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mm.Address %>" name="Address"
                            id="Address" />
                        <span class="Address ui-help-inline">选填</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">邮政编码</label><div class="ui-form-ctrls">
                        <input type="text" value="<%=mm.Zip %>" name="Zip"
                            id="Zip" class="ui-input-small" />
                        <span class="Zip ui-help-inline">选填</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">激活状态</label><div class="ui-form-ctrls">
                        <select size="1" name="Activation" id="Activation">
                            <option value="false" <%=mm.Activation?"":"selected"%>>未激活</option>
                            <option value="true" <%=mm.Activation?"selected":""%>>已激活</option>
                        </select><span class="Activation ui-help-inline">帐号是否已激活</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">用户状态</label><div class="ui-form-ctrls">
                        <select size="1" name="Enabled" id="Enabled">
                            <option value="true" <%=mm.Enabled?"selected":""%>>启用</option>
                            <option value="false" <%=mm.Enabled?"":"selected"%>>禁用</option>
                        </select><span class="Enabled ui-help-inline">帐号是否禁用</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                        <button type="submit" class="ui-btn ui-btn-primary">保存设置</button>
                        &nbsp;
                        <button class="ui-btn" onclick="history.back();" type="button">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    
    <div id="UI_List" runat="server" visible="false">
        <table class="ui-table ui-table-bordered">
            <thead>
                <tr>
                    <td colspan="6">会员名：<input type="text" name="sUserName" id="sUserName" value="<%=sUserName %>" size="10" class="ui-input-small" />
                        注册Mail：<input type="text" name="sMail" id="sMail" size="10" value="<%=sMail %>" class="ui-input-small" />
                        会员级别：<%=Web.Lib.ClassHelper.GetStepSelect(CommonLib.Enums.ClassType.会员级别.GetHashCode(),AgentUserId, int.Parse(sUserGrade), "sUserGrade")%>&nbsp;
                    <button id="btn_search" class="ui-btn ui-btn-primary" type="button">
                        查找</button>
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        <a href="?Action=Add" class="ui-btn ui-btn-primary">添加会员</a>
                    </td>
                </tr>
                <tr>
                    <th>会员帐号
                    </th>
                    <th>QQ
                    </th>
                    <th>帐号余额
                    </th>
                    <th>会员级别
                    </th>
                    <th>代理权限
                    </th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <%=ShowList%>
            <tr>
                <td colspan="6" id="Pager" class="Pager" runat="server"></td>
            </tr>
        </table>

    </div>
</asp:Content>
