<!--#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('admin_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> 
          <FORM name="" action="" id="sortlist" method="post">
            <table id="table"
           data-toggle="table"
           data-pagination="true"
                     data-show-toggle="true"
           data-show-columns="true"
           data-id-field="id"       
           data-id-table="advancedTable"
           data-page-size="20"
           data-page-list="[20,50,100]">
              <thead>
                <tr>
                  <th class="tableid" data-field="id" data-sortable="true">ID</th>
                  <th class="tablename" data-field="userName">登录名</th>
                  <th class="tablename" data-field="truename">会员姓名</th>
                  <th class="tablename" data-field="Gid">会员分组</th>
                  <th class="tablename" data-field="Mobile">会员手机</th>
                  <th class="tablename" data-field="Email">会员邮箱</th>
                  <th class="tabletype" data-field="LastLoginTime">最后登录</th>
                   <th class="tableonoff" data-field="onoff">开关</th>       
                  <th class="tableorder" data-field="order" data-sortable="true">排序</th>
                  <th class="tabletype" data-field="edit" class="text-right">编辑</th>
                </tr>
              </thead>
              <%
			    dim rs,GroupSelect
			  sql="select * from [dbpre]User,[dbpre]User_Group where U_GID=GID and IsAdmin=1 and G_Mark<="&getsession("adminmark")&" order by U_order asc, UID desc"
			    set rs=dbsqlr1(sql)
			  do while not rs.eof 
			   GroupSelect="<select placeholder='"&rs("U_GID")&"' id='U_GID-"&rs("UID")&"'>"	 
				GroupSelect=GroupSelect&getGroupOption(rs("U_GID"),1)	
				 GroupSelect=GroupSelect&"</select>"
			echo"<tr>"&vbcrlf& _	
				"<td>"&rs("UID")&"</td>"&vbcrlf& _	
				"<td><input type='text' id='userName-"&rs("UID")&"' placeholder='"&rs("userName")&"' value='"&rs("userName")&"'></td>"&vbcrlf& _	
				"<td><input type='text' id='truename-"&rs("UID")&"' placeholder='"&rs("truename")&"' value='"&rs("truename")&"'></td>"&vbcrlf& _	
				"<td>"&GroupSelect&"</td>"&vbcrlf& _	
				"<td><input type='text' class='title' id='Mobile-"&rs("UID")&"' placeholder='"&rs("Mobile")&"' value='"&rs("Mobile")&"'></td>"&vbcrlf& _	
				"<td><input type='text' class='title' id='Email-"&rs("UID")&"'  placeholder='"&rs("Email")&"' value='"&rs("Email")&"'></td>"&vbcrlf& _	
				"<td>"&rs("LastLoginTime")&"</td>"&vbcrlf& _
				"<td><button type='button'  onclick=setuser('U_OnOff','"&rs("UID")&"') class='btnaj btn-"&rs("U_OnOff")&" dim'><i class='fa fa-toggle-on'></i></button></td>"&vbcrlf& _
				"<td><input type='number' class='order'  min='0' max='99' id='U_order-"&rs("UID")&"'  placeholder='"&rs("U_order")&"' value="&rs("U_order")&"></td>"&vbcrlf& _	
			   	"<td><button type='button' class='btn btn-info dim' onclick=opennew('admin_edit.asp?UID="&rs("UID")&"')><i class='fa fa-pencil'></i></button> <button type='button'  onclick=deluser('"&rs("UID")&"')  class='btn btn-danger dim'><i class='fa fa-times'></i></button></td>"&vbcrlf& _
			"</tr>"&vbcrlf  	
	rs.movenext	
	Loop
closers rs
			  
			  %>
            </table>
          </FORM>
        </div>
            </div>
</div>
</div>

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

  </div>
</div>
<!-- End Panel Other -->
</div>
<script>
$("#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('保存成功');});
    }
});
</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> 
<script src="<%=sitepath%>plugins/layer/layer.min.js"></script>
</body>
</html>
