<%@ page language="C#" masterpagefile="~/MasterPage/UserMasterPage.master" autoeventwireup="true" inherits="Rest_Member_RestManage_Member, DoodiiShop" title="Untitled Page" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript" src="/js/thickbox/thickbox.js"></script>

    <link href="/js/thickbox/thickbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
.UserIntegral_01{float:left;height:24px;line-height:24px;clear:both;width:100%;}
.UserIntegral_01 .span01{float:left;padding-right:5px; display:block; }
.UserIntegral_02{float:left;background-image:url(/images/User/JifenBg_01.gif); padding:10px 0 0 10px; width:347px; height:40px; margin-top:10px; clear:left;}
.UserIntegral_03{float:left;clear:both;}
.UserIntegral_03 .span03{float:left;padding-right:5px; height:24px;line-height:24px;display:block; }

.PicBtn li{ float:left; padding-left:15px;}
</style>
    <div id="divDemo" runat="server" style="color: red; font-size: 24px; margin: 0px;
        padding: 0px;">
        <strong>如果您需要申请试用或购买本模块请<a href='http://www.doulaiding.com/buy/' target="_blank">联系我们</a>！</strong><br />
    </div>
    <div id="divContent" runat="server">
        <div class="mt10 UserIntegral_03 wh100">
            会员ID：<input type="text" id="tbUserID" value="" />
            会员邮箱：<input type="text" id="tbEmail" value="" />
            会员昵称：<input type="text" id="tbNickname" value="" /><br />
            <br />
            注册时间：<input type="text" id="tbStartDate" value="" />
            至
            <input type="text" id="tbEndDate" value="" />
            <a class="btnQuery" href="javascript:GetList(1)">查询</a>
            <br />
            <br />
        </div>
        <div id="divList">
        </div>
        <style type="text/css">@import url(/js/jquery-calendar/jquery-calendar.css);</style>

        <script type="text/javascript" src="/js/jquery-calendar/jquery-calendar.js"></script>

        <script type="text/javascript">
function Loading()
{
    var divList = document.getElementById("divList");
    divList.innerHTML = "<img src='/images/System/loading.gif' alt='正在载入...'/>";
}
var page = 1;
function GetList(pageNo)
{    
   if (pageNo==null)
        pageNo = page;page = pageNo;
   var divList = document.getElementById("divList");   
   var startDate = document.getElementById("tbStartDate").value;
   var endDate = document.getElementById("tbEndDate").value;
   var url = "RestManage_MemberTemplate.aspx" + "?pageno="+pageNo;
  
   if (startDate!="" && endDate=="")
   {
        alert("请选择结束日期！");document.getElementById("tbEndDate").focus();return ;
   }
   if (startDate=="" && endDate!="")
   {
        alert("请选择开始日期！");document.getElementById("tbStartDate").focus();return;
   }   
   if (startDate!="" && endDate!="")
   {
        if (date_compare(startDate,endDate)<0)
        {
            alert("开始时间不能大于结束日期！");document.getElementById("tbStartDate").focus();return;
        }
        url += "&startDate="+startDate+"&endDate="+endDate;   
   }    
   if ($("#tbUserID").val()!="")
        url += "&id="+$("#tbUserID").val();
   if ($("#tbEmail").val()!="")
        url += "&Email="+$("#tbEmail").val();   
   if ($("#tbNickname").val()!="")
        url += "&Nickname="+ encodeURIComponent( $("#tbNickname").val()); 
   Loading(); 
   var html = $.ajax({ url: url, async: false,ifModified:true}).responseText;
  
   document.getElementById("divList").innerHTML = html;
}
function pageChange(obj,pageNo)
{
     GetList(pageNo);
}
var loadPage = function() 
{    
    $("#tbStartDate").calendar(); 
    $("#tbEndDate").calendar();  
    GetList(1);    
}
function resetPassword(userID)
{    
    if (confirm("您确定要初始化用户登录密码吗？")==false) return;
    var ret = Rest_Member_RestManage_Member.ResetPassword(userID,'123456').value;
    if (ret == "1")
        alert("密码已初始化为：123456");
    else
        alert("操作失败！"+ret);
}
function delUser(userID)
{
    if (confirm("您确定要删除此注册用户吗？")==false) return;
    var ret = Rest_Member_RestManage_Member.DelUser(userID).value;
    if (ret == "1")
     {   alert("删除注册用户成功！");GetList()}
    else
        alert("操作失败！"+ret);
}
function GetUserInfo(id)
{
    tb_show("会员详细资料","MemberSimpleInfo.aspx?IDs="+id+"&TB_iframe=true&height=225&width=360&top=150");
}
$(document).ready( function(){ loadPage() });
        </script>

    </div>
</asp:Content>
