<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/user_manage.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/user_manage.js"></script>
</head>
<body data-type="generalComponents">
    {% include 'component_header.tpl' %}
    <div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
        {% include 'component_left.tpl' %}
        <div class="tpl-content-wrapper">
            <div class="tpl-content-page-title">
                会员管理
            </div>
            <ol class="am-breadcrumb">
                <li><a href="./" class="am-icon-home">首页</a></li>
                <li class="am-active">会员管理</li>
            </ol>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span>&nbsp;会员管理
                    </div>
					<ul class="list-inline ngsty-boxR">
						<li>
							<div class="ng-width-box am-no-marginbtm am-no-outline" >
							    <select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{searchBox: 1}" name="menu" class="" style="display: none;" id="selected-searcho">
							        <option value="user_manage?level=0">全部会员</option>
							        {% for row in rank %}
							        <option {% if level==row['id'] %}selected="selected" {% endif %} value="user_manage?{{url['level']}}level={{row['id']}}">{{row['rankname']}}</option>
							        {% endfor %}
							    </select>
							</div>
						</li>
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline" >
							    <select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{sbtnSize: 'sm'}">
							        <option {% if sort==0 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=0">内容ID降序</option>
							        <option {% if sort==1 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=1">内容ID升序</option>
							        <option {% if sort==2 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=2">帐户金钱升序</option>
							        <option {% if sort==3 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=3">帐户金钱降序</option>
							        <option {% if sort==4 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=4">帐户积分降序</option>
							        <option {% if sort==5 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=5">帐户积分升序</option>
							        <option {% if sort==6 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=6">已消费金钱降序</option>
							        <option {% if sort==7 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=7">已消费金钱升序</option>
							        <option {% if sort==8 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=8">登录次数降序</option>
							        <option {% if sort==9 %} selected="selected" {% endif %} value="user_manage?{{url['sort']}}sort=9">登录次数升序</option>
							    </select>
							</div>
						</li>
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline" >
							    <select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
							        <option {% if filter==0 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=0">数据筛选</option>
							        <option {% if filter==1 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=1">个人会员</option>
							        <option {% if filter==2 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=2">企业会员</option>
							        <option {% if filter==3 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=3">已通过验证</option>
							        <option {% if filter==4 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=4">未通过验证</option>
							        <option {% if filter==5 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=5">允许登录</option>
							        <option {% if filter==6 %} selected="selected" {% endif %} value="user_manage?{{url['filter']}}filter=6">禁止登录</option>
							    </select>
							</div>
						</li>
						<li>
							<div class="portlet-input input-small input-inline">
							    <form action="#" method="get" id="search">
							        <div class="input-icon right">
							            <i class="am-icon-search log-search"></i>
							            <input type="text" class="ngar-Vxiugai-radius form-control am-hover form-control-solid ngco-Alo-Noborder" placeholder="搜索..." name="word" value="{{word}}" id="word">
							        </div>
							    </form>
							</div>
						</li>
						<li>
							<div class="am-btn-group am-btn-group-xs">
							    <a href="user_manage?{{ kg['run_start_time'][1] }}" class="am-btn am-btn-secondary ng-add-hightB"><span class="am-icon-search"></span>&nbsp;刷新</a>
							    <a class="am-btn am-btn-default am-btn-warning" href="user_update"><span class="am-icon-plus"></span>&nbsp;创建会员</a>
							</div>
						</li>
					</ul>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 ngALL-AFenyeFu-marginT ngco-No-paddingR">
                        <form class="am-form" id="id-form" action="#" method="post">
                            <input type="hidden" name="action" value="" id='action'>
                            <table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
                                <thead>
                                    <tr>
                                        <th class="table-check"><input type="checkbox" name="all" id="all" onclick="kg.select_all(this.form);" class="tpl-table-fz-check checkbox-middle"></th>
                                        <th class="table-id">ID</th>
                                        <th class="table-title">登录用户名</th>
                                        <th class="table-type">余额(已消费余额)</th>
                                        <th class="table-author am-hide-sm-only">积分</th>
                                        <th class="table-date am-hide-sm-only">最后登录地址</th>
                                        <th class="table-set">注册时间</th>
                                        <th class="table-set">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for row in data %}
                                    <tr>
                                        <td><input type="checkbox" name="id" class='uid checkbox-middle' value="{{row['id']}}"></td>
                                        <td>{{row['id']}}</td>
                                        <td><a href="user_update?id={{row['id']}}" class="am-username">{{row['username']}}</a></td>
                                        <td>{{row['money']}}({{row['usemoney']}})</td>
                                        <td class="am-hide-sm-only">{{row['scores']}}</td>
                                        <td class="am-hide-sm-only">{{row['loginip'][0]}}</td>
                                        <td class="am-hide-sm-only">{{row['jointime']}}</td>
                                        <td>
                                            <div class="am-btn-toolbar">
                                                <div class="am-btn-group am-btn-group-xs">
                                                    <a href="user_update?id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only">
                                                        <span class="am-icon-pencil-square-o"></span>&nbsp;编辑
                                                    </a>
                                                    {% if row['audit'] == 0 %}
                                                    <a href="user_manage?action=unaudit&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only"><span class="am-icon-user"></span>&nbsp;取消</a>
                                                    {% else %}
                                                    <a href="user_manage?action=audit&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only"><span class="am-icon-user"></span>&nbsp;验证</a>
                                                    {% endif %}
                                                    {% if row['effective'] %}
                                                    <a href="user_manage?action=unlogin&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only"><span class="am-icon-check"></span>&nbsp;禁止登录</a>
                                                    {% else %}
                                                    <a href="user_manage?action=login&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only"><span class="am-icon-check"></span>&nbsp;允许登录</a>
                                                    {% endif %}
                                                    <a href="user_manage?action=del&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi">
                                                        <span class="am-icon-trash-o"></span>&nbsp;删除
                                                    </a>
                                                    <a class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only doc-prompt-toggle">
                                                        <span class="am-icon-money"></span>&nbsp;在线充值
                                                    </a>
                                                    <a href="user_transactions?word={{row['username']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only">
                                                        <span class="am-icon-shopping-cart"></span>&nbsp;交易日志
                                                    </a>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    {% endfor %}
                                </tbody>
                            </table>
                            {% if not data %}<div class="no-data">
                                <ul>没有相关数据</ul>
                            </div>{% endif %}
                            {% if page_data['total_rows'] %}
                            <div class="am-u-sm-12 am-u-md-6">
                                <div class="am-btn-toolbar ng-xno-borderL" id="select-handle">
                                    <span class="am-input-group-btn add-span">
                                        <a class="add am-btn am-btn-default am-select am-back ngco-Ono-radiusR" href="javascript:;">全选</a>
                                    </span>
                                    <select class="am-select-hover" data-am-selected="{btnSize: 'sm'}" id="all2" style="display: none;">
                                        <option selected="selected" value='0'>将选中项：</option>
                                        <option value="audit">验证</option>
                                        <option value="unaudit">取消验证</option>
                                        <option value="login">允许登录</option>
                                        <option value="unlogin">禁止登录</option>
                                        <option value="del">删除</option>
                                    </select>
                                </div>
                            </div>
                            {% endif %}
                            {% if page_data['total_page'] > 1 %}
                            {{pagehtml}}
                            {% endif %}
                        </form>
                    </div>
                    <div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
                        <div class="am-modal-dialog">
                            <div class="am-modal-hd">会员在线充值</div>
                            <div class="am-modal-bd ">
                                <span id="am-title"></span>
                                <form action="#" method="post" id="ty-form">
                                    <input type="text" name="money" class="am-modal-prompt-input" placeholder="充值金额(元)，允许负数(扣款或借贷)">
                                    <input type="text" name="msg" class="am-modal-prompt-input" placeholder="请在这里填写充值或扣款原因">
                                    <input type="hidden" name="uid" value="" id="username" />
                                    <input type="hidden" name="action" value="recharge" />
                                </form>
                            </div>
                            <div class="am-modal-footer">
                                <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                                <span class="am-modal-btn" data-am-modal-confirm>提交</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {% include 'component_footer.tpl' %}
        </div>
				</div><!-- /.scrollbar-wrap -->
    </div>
</body>
</html>