<%@ Page Title="进入会员中心" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeBehind="ChangeUser.aspx.cs" Inherits="PowerEasy.Module.General.WebSite.Admin.User.ChangeUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="server">
<pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="server">
<asp:ScriptManager ID="SmgeRegion" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
        <script type="text/javascript">
        function DoPostBack(username)
        {
            document.getElementById("<%= TxtUserName.ClientID %>").value = username;
        }
        
    </script>
    
    <div>
<table border="0" cellpadding="2" style="text-align: center" cellspacing="1" width="100%"
        class="border">
<tr align="center">
<td class="spacingtitle" colspan="2">
进入会员中心
</td>
</tr>
<tr class="tdbg">
<td class="tdbgleft" style="width:45%" align="right">会员账号：
</td><td align="left">
<asp:TextBox ID="TxtUserName" runat="server" CssClass="inputtext"></asp:TextBox>
                <pec:FloatingDialog ID="FdSelectUser" runat="server" Width="670" Height="400" Name="会员列表" BeginString="&lt;=【" EndString="】"
                Skin="floatingDialogFontSkin" Title="会员列表"  />
</td>
</tr>
<tr class="tdbgbottom">
<td align="center" colspan="2">
    <input type="button" name="changeuser" value="进入会员中心" onclick="javascript:checkuser()" />
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" name="changeuser2" value="进入自己的会员中心" onclick="javascript:checkuser2('<%=username%>')" />
</td>
</tr>
</table>
<br />
    <div id="prompt-note">
        <dl>
        <dt class="prompt-note-tit">
        <span>提示说明</span>

        <a>进入会员中心说明</a>
        <span class="right-line"></span></dt>  
        <dd class="prompt-note-con">
            <ul>
                <li>进入会员中心</li>
                <li><span style="color: blue">进入会员中心操作说明：</span>输入会员账号或从会员列表中选择相应会员，点击进入即可从新窗口中打开对应会员的会员中心进行操作。</li>
                <li>点击进入自己的会员中心，即可切换回自己的对应会员身份，并进入自己的会员中心。</li>
            </ul>
        </dd>
        <div class="clearbox"></div>
        </dl>
    </div>

</div>
 <script type="text/javascript">
     function checkuser() {
         if (jQuery("#ctl00_CphContent_TxtUserName")[0].value == '') {
             alert('会员账号不能为空!!');
             return false;
         }
         jQuery.post('../Profile/WidSeting.aspx', "<?xml version='1.0' encoding='utf-8'?><root><type>ChangeUser</type><username>" + jQuery("#ctl00_CphContent_TxtUserName")[0].value + "</username></root>", function(s) {
             if (jQuery("status", s).text() == "ok") {
                 window.open('../../user/default.aspx');
             }
             else {
                alert(jQuery("body", s).text());
             }
         });
     }
     function checkuser2(name) {
         if (name == '') {
             alert('会员账号不能为空!!');
             return false;
         }
         jQuery.post('../Profile/WidSeting.aspx', "<?xml version='1.0' encoding='utf-8'?><root><type>ChangeUser</type><username>" + name + "</username></root>", function(s) {
             if (jQuery("status", s).text() == "ok") {
                 window.open('../../user/default.aspx');
             }
             else {
                 alert(jQuery("body", s).text());
             }
         });
     }        
    </script>
</asp:Content>
