<!--#include file="User_Fun.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<%=sitepath%>css/bootstrap.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/font-awesome.min.css" rel="stylesheet">
<link href="<%=sitepath%>plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/animate.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/style.min.css" rel="stylesheet">
<link href="<%=sitepath&adminPath%>css/adminstyle.css" rel="stylesheet">
<script src="<%=sitepath%>js/jquery.min.js"></script>
<script src="<%=sitepath&adminPath%>js/adminjs.js"></script>
<!--[if lte IE 9]>
<script src="<%=sitepath%>js/respond.min.js"></script>
<script src="<%=sitepath%>js/html5.js"></script>
<![endif]-->
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
  <div class="ibox float-e-margins">

      <div class="row row-lg">
<div class="col-md-6">
							<div class="panel">
								<div class="panel-heading">
									<h3 class="panel-title">会员管理</h3>
									<div class="panel-aj">
										<button type="button" class="btn-toggle-collapse"><i class="fa fa-chevron-down"></i></button>
										<button type="button" class="btn-remove"><i class="fa fa-times"></i></button>
									</div>
								</div>
<div class="panel-body">
<div class="panel-body no-padding">		
<div class="ibox-content">

<div class="col-sm-12">
          <div class="col-sm-7">
            <button id="add" class="btn  btn-primary" type="button" onClick="opennew('user_add.asp')"><i class="fa fa-plus">　</i>添加会员</button>
             <button onClick="location.reload()" class="btn btn-primary1" type="button"><i class="fa fa-refresh"></i> 刷新</button>
             <!--<button onClick="closetab()" class="btn" type="button"><i class="fa fa-reply">　</i>关闭</button>-->
			 </div>
               <div class="col-sm-2">
         	  <select name='U_GID' id='U_GID' class="form-controll input-sm"  onchange="javascript:location.href='?gid='+this.value">
                <option value="0">全部会员</option>
				<%echo getGroupOption(gid,2)%>
              </select>
              </div>
             <div class="col-sm-3">
            <div class="input-group">
              <input type="text" placeholder="支持搜索：登录名/会员名/手机/邮箱/qq" id="keys" value="<%=keyword%>" class="input-sm">
              <span class="input-group-btn">
              <button type="button" id="search"  class="btn btn-primary"> 搜索会员</button>
              <button onClick="location.href='?'" class="btn btn-primary" type="button"><i class="fa fa-reply"> </i>全部</button>
              </span> </div>
          </div></div>
		  <table class="table table-striped">
            <thead>
              <tr>
                <th class="orderby" id="byuid" order="uid" desc='<%=ordsc%>'>ID</th>
                <th class="orderby" id="byusername" order="username" desc='<%=ordsc%>'>登录名</th>
                <th class="orderby" id="bytruename" order="truename" desc='<%=ordsc%>'>会员姓名</th>
                <th class="tablename" data-field="Gid">会员分组</th>
                <th class="orderby" id="bymobile" order="mobile" desc='<%=ordsc%>'>会员手机</th>
                <th class="tablename" data-field="Email">会员邮箱</th>
                <th class="orderby" id="byLastLoginTime"  order="LastLoginTime" desc='<%=ordsc%>'>最后登录</th>
                <th class="orderby" id="byU_order"  order="U_order" desc='<%=ordsc%>'>排序</th>
                 <th>开关</th>
                <th class="tablename" data-field="edit" >编辑</th>
              </tr>
            </thead>
           <% call listuser%>
          </table>

</div>
</div>
</div>

							</div>
						</div>
        </div>

    </div>
  </div>
</div>
<!-- End Panel Other -->
</div>
<script src="<%=sitepath%>plugins/layer/layer.min.js"></script>
<script>
layer.config({extend: 'extend/layer.ext.js'});
$(".table").on("blur", "input,select", function() {
    var colval = $(this).val();
    var colplace = $(this).attr('placeholder')
    var colid = $(this).attr('id').split("-")[1];
    var colname = $(this).attr('id').split("-")[0];
    if (colval != colplace) {
        $(this).attr('placeholder', colval);
        $.post("user_Fun.asp?act=saveid&colval="+colval+"&colid="+colid+"&colname="+colname,function(data){layer.msg('保存成功');});
    }
});
$(function(){
	$("#by<%=orderby%>").addClass("order<%=ordsc%>")		
})
$(".orderby").click(function(){
	var orderby=$(this).attr("order")
	var desc=$(this).attr("desc")
	if (desc=="1"){desc="0"}else{desc="1"} 
	location.href="?Stype=<%=Stype%>&keyword=<%=keyword%>&page=<%=page%>&psize=<%=psize%>&orderby="+orderby+"&ordsc="+desc	
});
$("#search").click(function(){
	keys=$("#keys").val()
	location.href="?keyword="+keys
	});
function smssend(mobile) {
    layer.prompt({
        formType: 0,
        value: '',
        title: '发送短信，请确认手机号为:'+mobile
    }, function(value, index, elem) {
        $.post("User_Fun.asp?act=smssend&idval=" + value+"&colval="+mobile, function(data) {
          if (data=="1") {alert("发送成功")}else{alert(data); }//得到value
        });       
        layer.close(index);
    });
}
</script> 
<script src="<%=sitepath%>js/klorofil-common.js"></script>
<script src="<%=sitepath%>js/bootstrap.min.js"></script> 
<script src="<%=sitepath%>plugins/bootstrap-table/bootstrap-table.min.js"></script> 
<script src="<%=sitepath%>plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> 

</body>
</html>
