<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true" CodeBehind="MemberList.aspx.cs" Inherits="PPFOR.Admin.UserInfo.MemberList" Title="会员列表" %>
<%@ Register Src="~/Admin/Ascx/PageBar.ascx" TagName="PageBar" TagPrefix="page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">
<script src="../JS/gridview.js" type="text/javascript"></script>  
<script src="../JS/popupWindow.js" type="text/javascript"></script>  
<script src="../JS/opopup.js" type="text/javascript"></script>  
<script src="/ckeditor/ckeditor.js" type="text/javascript" ></script>
<script language="javascript" type="text/javascript">
function openMemberDetail(id)
{
    popupWindow("/Admin/UserInfo/MemberDetail/MemberIndex.aspx?id=" + id,'90%','80%');
}
function sendMessage()
{
    var formName='<%=form1.ClientID %>';
    if(checkSelectedAny(formName,'请先选择至少一位会员')){
        showDiv('divMessage','群发消息',400,300);
    }
}
function sendEmail()
{
    var formName='<%=form1.ClientID %>';
    if(checkSelectedAny(formName,'请先选择至少一位会员')){
        showDiv('divEmail','群发邮件',600,380);
    }
}
function showDiv(id,title,width,height)
{
    popup_show(title,id,width,height);
}
function closePopup()
{
    popup_close();
}
</script>
<form id="form1" action="MemberList.aspx" method="post" runat="server">
    <div class="table-ppfor">
		<i></i><u></u>
		<ul>
		  <li><span><b></b><a href="MemberAdd.aspx">添加会员</a><s></s></span><input value="群发消息" class="blueinput" type="button" onclick="sendMessage();" />&nbsp;<input value="群发邮件" class="blueinput" type="button" onclick="sendEmail();" /></li>
		</ul>
	</div>
    <asp:GridView ID="PPFOR_showMemberList" CssClass="forgridview" runat="server" OnRowDataBound="PPFOR_gridViewRowDataBound" AllowPaging="false" AutoGenerateColumns="False"  DataKeyNames="ID"  Width="100%" CellPadding="0" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="0px" EmptyDataText="还没有添加会员">
           <Columns>                
             <asp:TemplateField ShowHeader="False" HeaderText="" HeaderStyle-HorizontalAlign="Center">
                 <ItemStyle Wrap="False" HorizontalAlign="Center" />
                 <HeaderTemplate>
                     <asp:CheckBox ID="PPFOR_selectMember" runat="server"></asp:CheckBox>
                 </HeaderTemplate>
                 <ItemTemplate>
                     <asp:CheckBox ID="PPFOR_selectMember" runat="server"></asp:CheckBox>
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField HeaderText="ID" DataField="ID" HeaderStyle-Font-Bold="false"/>
             <asp:BoundField HeaderText="会员账号" DataField="MemberName" HeaderStyle-Font-Bold="false"/>             
             <asp:BoundField HeaderText="会员等级" DataField="MemberDegree" HeaderStyle-Font-Bold="false"/>  
             <asp:BoundField HeaderText="电子邮箱" DataField="MemberEmail" HeaderStyle-Font-Bold="false"/>  
             <asp:BoundField HeaderText="最后登录IP" DataField="LoginIP" HeaderStyle-Font-Bold="false"/> 
             <asp:BoundField HeaderText="最后登录时间" DataField="LoginTime" HeaderStyle-Font-Bold="false"/>   
             <asp:BoundField HeaderText="登录次数" DataField="LoginNumber" HeaderStyle-Font-Bold="false"/> 
             <asp:TemplateField HeaderText="会员操作" HeaderStyle-Font-Bold="false">
                <ItemTemplate><%# PPFOR_getActionLinks(Eval("ID"),Eval("IsLocked"))%></ItemTemplate>
             </asp:TemplateField>
            </Columns>            
             <FooterStyle BackColor="#990000" ForeColor="White" /> 
             <RowStyle Wrap="False" HorizontalAlign="Center" Font-Bold="false" BackColor="#ffffff"/> 
             <HeaderStyle HorizontalAlign="Center" BackColor="#F5F5F5" Font-Bold="false" ForeColor="#000000" />
             <AlternatingRowStyle BackColor="#F5F5F5" />
        </asp:GridView>
      <br />
        <page:PageBar ID="PPFOR_pageBar" runat="server" />
      <br />
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none;">
        <tr>
          <td>
              <asp:Button ID="PPFOR_deleteMember" CssClass="inputbutton" runat="server" Text="删除" OnClick="PPFOR_deleteMemberClick" />
              <input name="reset" type="reset" id="reset1" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" onclick="SelectAllRows('<%=form1.ClientID%>',false)"/>
                <script type="text/javascript">
                    if("<%=PPFOR_displayRecordOption %>"!='none'){
                        addButtonArray("<%= PPFOR_deleteMember.ClientID %>","reset1");
                    }
                </script>  
        </td>
        </tr>
      </table>
      <br />
<div id="popupClass" class="popup_class" style="visibility: hidden; display: none;">
   <iframe id="popupIFrame" class="iframe_for_hide" frameborder="0"></iframe>
   <div class="menu_form_header" id="popupDrag">
		<img alt="" class="menu_form_exit" id="popupExit" src="../Images/close.png" />
		<label id="popupTitle">标题</label>
	</div>
   <div id="divMessage" class="menu_form_body" style="display:none;">
       <table width="100%" cellpadding="0" cellspacing="0" border="0" class="fortable">
       <thead>
            <tr>
                <td colspan="2">编辑消息</td>
            </tr>
       </thead>
       <tr>
        <td style="width: 15%" align="right">消息标题：</td>
        <td><asp:TextBox ID="PPFOR_messageTitle" runat="server" Width="200px"></asp:TextBox></td>
       </tr>
       <tr>
        <td align="right">消息内容：</td>
        <td><asp:TextBox ID="PPFOR_messageContent" runat="server" Width="300px" Height="200px" TextMode="MultiLine"></asp:TextBox></td>
       </tr>
       <tr>
        <td colspan="2" align="center" style="height:30px">
            <asp:Button ID="PPFOR_sendMemberMessage" OnClick="PPFOR_sendMemberMessageClick" runat="server" CssClass="blueinput" Text="群发消息" />
            <input type="button" value="取消" class="blueinput" onclick="closePopup();" /><br />
        </td>
       </tr> 
       </table>
   </div>    
   <div id="divEmail" class="menu_form_body" style="display:none;">
       <table width="100%" cellpadding="0" cellspacing="0" border="0" class="fortable">
       <thead>
            <tr>
                <td colspan="2">编辑邮件</td>
            </tr>
       </thead>
       <tr>
        <td style="width: 15%" align="right">邮件主题：</td>
        <td style="width: 85%"><asp:TextBox ID="PPFOR_emailSubject" runat="server" Width="200px"></asp:TextBox></td>
       </tr>
       <tr>
        <td align="right">邮件内容：</td>
        <td style="width: 85%"><asp:TextBox ID="PPFOR_emailContent" runat="server" Width="98%" Height="300px" TextMode="MultiLine"></asp:TextBox>
             <script type="text/javascript">
                 var ckEditor=CKEDITOR.replace("<%=PPFOR_emailContent.ClientID%>", {
                     customConfig:'/ckeditor/email_config.js',
                     width:480,
                     height:200
                    });
             </script>
        </td>
       </tr>
       <tr>
        <td colspan="2" align="center" style="height:30px">
            <asp:Button ID="PPFOR_sendEmail" OnClick="PPFOR_sendEmailClick" runat="server" CssClass="blueinput" Text="群发邮件" />
            <input type="button" value="取消" class="blueinput" onclick="closePopup();" /><br />
        </td>
       </tr> 
       </table>
   </div>     
</div>      
</form>        
</asp:Content>
