<?php if (!defined('THINK_PATH')) exit(); $JSARR['min12']=THEME_PATH."/common/js/goods/export.js"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="HANCHAO"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<?php $csscommon="/Public/bootstrap/css/bootstrap.min.css" ?>
<?php $csscommon.="|/Public/HanChaoUI/css/hanchaoui.css" ?>
<?php $CSSARR[]=THEME_PATH."/common/css/main.css" ?>
<?php $CSSARR[]="/Public/HanChaoUI/css/weebox.css" ?>
<link rel="stylesheet" href="<?php echo min_css($CSSARR,$csscommon);?>" media="all"/>
<?php $jscommon="/Public/script/jquery.min.js" ?>
<?php $jscommon.="|/Public/bootstrap/js/bootstrap.min.js" ?>
<?php $JSARR['min2']=THEME_PATH."/common/js/common.js" ?>
<?php $JSARR['min3']="/Public/HanChaoUI/js/weebox.js" ?>
<script language="javascript">var URL = '/admin.php?s=/member/';var THEME_COLOR = '';var ROOT_PATH = '/';var APP   =   '/admin.php?s=/';var CONTROLLER_NAME   =   '<?php echo (CONTROLLER_NAME); ?>';var THEME_PATH   =   '<?php echo (TPL_PATH); ?>/';</script>
<script type="text/javascript" src="<?php echo min_js($JSARR,$jscommon);?>"></script><!--[if IE]>
<link href="/Public/bootstrap/css/bootstrap.ie.css" rel="stylesheet" type="text/css"/>
 <script src="/Public/bootstrap/js/html5shiv.js"></script>
<![endif]-->
<script language="javascript">
$(function($){
    $(window.parent.document).find('#loading').hide();
    var topid='<?php echo ($_GET['topid']); ?>';
    var leftid='<?php echo ($_GET['leftid']); ?>';
    changemenu(topid,leftid);
});
function changemenu(topid,leftid){
    if(!topid && !leftid)return false;
    if(topid)parent._OPENleft(topid);
    if(leftid){
        $(window.parent.document).find('#_OPENright'+leftid).parent().prev().click();
        $(window.parent.document).find('#_OPENright'+leftid+' a').click();
    }
}
</script>
<title><?php echo (L("website_manage")); ?>Powered by hanchao</title>
</head>
<body><?php if(!empty($big_menu)): ?><div class="pad-lr-10 col-sm-12">
    <div class="btn-handle mt15">
   <?php if(is_array($big_menu)): foreach($big_menu as $k=>$vo): ?><a class="btn <?php if(!empty($menu_hover)): if(in_array(($k), is_array($menu_hover)?$menu_hover:explode(',',$menu_hover))): ?>btn-primary<?php else: ?>btn-default<?php endif; ?>                
   <?php else: ?>btn-primary<?php endif; ?>" href="<?php echo (isset($vo)?$vo:''); ?>"><?php echo (isset($k)?$k:''); ?></a>&nbsp;&nbsp;<?php endforeach; endif; ?>
    </div>
</div><?php endif; ?>
<script type="text/javascript" src="/Public/script/MyDate/WdatePicker.js"></script><link rel="stylesheet" type="text/css" href="/Application/Runtime/statics/8999a4c51e95f631f78fa62c32848b0f.css" /><script type="text/javascript" src="/Application/Runtime/statics/da4547ebabb36936d20998af40fc53ce.js"></script><script type="text/javascript">$(function(){$("#myform").Validform({tiptype:3});})</script>
<div class="pad-lr-10 w_auto col-sm-12">
	<div class="col-lg-12">
		<div class="mt15">
			<ul class="nav nav-tabs" role="tablist">
				<li role="presentation"<?php if(empty($type)): ?>class="active"<?php endif; ?> >
					<a href="<?php echo U('Member/index');?>">会员</a>
				</li>
				 <!--<li role="presentation" <?php if(!empty($type)): ?>class="active"<?php endif; ?>>
					 <a href="<?php echo U('Member/index',array('type'=>1));?>">顾客</a>
				 </li>-->
                <!--仓库权限-->
                <?php if(($auth_group_id) != "2"): ?><li role="presentation">
					<a href="<?php echo U('Member/fans',array('type'=>1));?>">粉丝</a>
				</li><?php endif; ?>
				<!-- <li role="presentation"> -->
					<!-- <a href="<?php echo U('Config/sitting7',array('type'=>7));?>">奖励配置</a> -->
				<!-- </li> -->
				<!-- <li role="presentation"><a href="<?php echo U('Config/sitting1',array('type'=>1));?>">会员配置</a></li> -->
			</ul>
			<div class="cont_hanchao pd15 tab-content" id="myTabContent">
				<div class="prompt_div bg-info" id="explanation">
					<p class="text-primary" id="checkZoom" >
						<i class="glyphicon glyphicon-bell mr5"></i>
						温馨提示
						<span id="explanationZoom" title="收起提示"></span>
					</p>
					<ul>
						<li>
							<i>·</i>
							身份说明：会员为领取会员卡的用户，粉丝为关注了公众号，顾客为未关注公众账号的会员或潜在会员。
						</li>
						<li>
							<i>·</i>会员编辑功能可对会员的基本信息，会员收货地址，会员收藏的商品，进行修改删除的操作。
						</li>
						<li>
							<i>·</i>
							你可以根据条件搜索会员，然后选择相应的操作。
						</li>
					</ul>
				</div>
				<div class="present  tab-pane fade active in" id="group_common">
					<form name="searchform" action="/admin.php?s=/member/index" method="POST" id="myform" >
						<div class="toolbars-hanchao mt15 clearfix">
							<div>
								<?php if(($type) == "1"): ?>顾客：<?php else: echo L('MEMBER');?>：<?php endif; ?>
								<input name="keyword" type="text" class="form-control width1" placeholder="<?php echo L('ID');?>/<?php echo L('NAME');?>/卡号" size="25" value="<?php echo I('keyword');?>" />
								<?php echo L('MOBILE');?>：
								<input name="mobile" type="text" class="form-control width1" placeholder="<?php echo L('MOBILE');?>号" size="25" value="<?php echo I('mobile');?>" />
								<?php if(($type) != "1"): echo L('MEMBER_RANK');?> ：
								<select name="rank_id" class="form-control width2">
                                    <option value="0"><?php echo L('PLEASE_SELECT_RANK');?></option>
                                        <?php if(is_array($groupData)): $i = 0; $__LIST__ = $groupData;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo (isset($key)?$key:''); ?>" <?php if(isset($_REQUEST['rank_id']) && ($key) == $_REQUEST['rank_id']): ?>selected="selected"<?php endif; ?>
                                            ><?php echo (isset($vo)?$vo:''); ?>
                                        </option><?php endforeach; endif; else: echo "" ;endif; ?>
                                </select><?php endif; ?>
							<?php if(empty($type)): echo L('REG_TIME');?> ：<?php else: ?>上次购买时间：<?php endif; ?>
							 <input class="form-control w110" name="reg_from" type="text" id="reg_from" size="20" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{ $dp.$D(\'reg_to\')}'})" value="<?php echo (isset($reg_from)?$reg_from:''); ?>" /> - <input class="form-control w110" name="reg_to" type="text" id="reg_to" size="20" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'reg_from\')}'})" value="<?php echo (isset($reg_to)?$reg_to:''); ?>" /></div>
							<div>
								<input type="hidden" name="type" value="<?php echo (isset($type)?$type:''); ?>">
								<button class="btn btn-primary" type="submit"><?php echo L('SEARCH');?></button>
							</div>
							<?php if(($type) != "1"): ?><div>
								<button class="btn btn-primary" type="button" onclick="do_user_export()"><?php echo L('EXPORT');?></button>
							</div>
                            <!--仓库权限-->
                            <?php if(($auth_group_id) != "2"): ?><div>
								<button class="btn btn-primary" type="button" onclick="$.openUrl('<?php echo U('Member/import');?>');">导入</button>
							</div><?php endif; ?>
							<div>
								<button class="btn btn-primary" type="button" onclick="$.openUrl('<?php echo U('Member/clearpoints');?>','积分清零设置');">积分清零</button>
							</div><?php endif; ?>
                            <!--仓库权限结束-->
							<!-- <?php if(empty($type)): ?><div>
									<a href="<?php echo U('add');?>" class="btn btn-primary"><?php echo L('ADD'); echo L('MEMBER');?></a>
								</div><?php endif; ?> -->
						</div>
					</form>
					<form id="myform1" name="myform" action="<?php echo U('delete');?>" method="post">
						<table class="table table-hover table-striped table-hanchao mt15 table-bordered">
							<thead>
								<tr>
									<th width="35">
										<input onclick="selectall('id[]');" class="check_box_c" type="checkbox" id="check_box" >
									</th>
									<th width="60" align="center"><?php echo orderurl('LAN_ID','id');;?></th><!--glyphicon glyphicon-open升序-->
									<th width="100"><?php echo L('HEAD_IMG');?></th>
									<th width="120"><?php echo orderurl('会员名称','username');;?></th>
									<th width="120"><?php echo orderurl('LAN_MEMBER_CARDSN','username');;?></th>
									<th width="90"><?php echo orderurl('LAN_MEMBER_RANK','rank_id');;?></th>
									<th width="70"><?php echo orderurl('LAN_FUNDS','money');;?></th>
									<!-- <th width="90"><?php echo orderurl('LAN_FROZEN_MONEY','frozen_money');;?></th> -->
									<th width="90"><?php echo orderurl(C('SELL_INTEGRAL_NAME'),'usepoints');;?></th>
									<th width="90"><?php echo orderurl('盈利账户','comm_money');;?></th>
									<th width="90"><?php echo orderurl('LAN_ACCUMULATED_MONEY','points');;?></th>
									<th width="90"><?php echo orderurl('累计充值','recharge_points');;?></th>
									<th width="155"><?php if(empty($type)): echo orderurl('LAN_REG_TIME','reg_time');; else: ?>上次购买时间<?php endif; ?></th>
									<!-- <th width="155"><?php echo orderurl('LAN_ENDBUY_TIME','last_login');;?></th> -->

									<th width="70"><?php echo orderurl('LAN_STATUS','status');;?></th>
                                    <?php if(($auth_group_id) != "2"): ?><th width="230"><?php echo L('MANAGE');?></th><?php endif; ?>
								</tr>
							</thead>
							<tbody>
								<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><tr>
										<td><input value="<?php echo (isset($val["id"])?$val["id"]:''); ?>" name="id[]" type="checkbox" >   </td>
										<td title="<?php echo (isset($val["id"])?$val["id"]:''); ?>"><?php echo (isset($val["id"])?$val["id"]:''); ?></td>
										<td title="">
										<?php if($val['header_img']): ?><img src="<?php echo (isset($val["header_img"])?$val["header_img"]:''); ?>" style="width:41.5px;height:41.5px;" />
										<?php else: ?><img src="/Public/images/user-header.png" style="width:50%;" /><?php endif; ?>
										</td>
										<td title="<?php echo (show_user_name($val["id"])); ?>"><?php echo (show_user_name($val["id"])); ?></td>
										<td title="<?php echo (isset($val["card_sn"])?$val["card_sn"]:''); ?>"><?php echo (isset($val["card_sn"])?$val["card_sn"]:''); ?></td>
										<td title="<?php echo (idtoname($val["rank_id"],'MemberRank')); ?>"><?php echo (idtoname($val["rank_id"],'MemberRank')); ?></td>
										<td title="<?php echo (isset($val["money"])?$val["money"]:''); ?>"><a href="<?php echo U('MarketingForm/index',array('uid'=>$val['id'],'type'=>1));?>"><?php echo (isset($val["money"])?$val["money"]:''); ?></a></td>
										<!-- <td title="<?php echo (isset($val["frozen_money"])?$val["frozen_money"]:''); ?>"><a href="<?php echo U('AccountLog/index',array('uid'=>$val['id'],'type'=>2));?>"><?php echo (isset($val["frozen_money"])?$val["frozen_money"]:''); ?></a></td> -->
										<td title="<?php echo (isset($val["usepoints"])?$val["usepoints"]:''); ?>"><a href="<?php echo U('MarketingForm/points',array('uid'=>$val['id'],'type'=>4));?>"><?php echo (isset($val["usepoints"])?$val["usepoints"]:''); ?></a></td>
										<td title="<?php echo (isset($val["comm_money"])?$val["comm_money"]:''); ?>"><a href="<?php echo U('MarketingForm/index',array('uid'=>$val['id'],'type'=>8));?>"><?php echo (isset($val["comm_money"])?$val["comm_money"]:''); ?></a></td>
										<td title="<?php echo (isset($val["points"])?$val["points"]:''); ?>"><?php echo (isset($val["points"])?$val["points"]:''); ?></td>
										<td title="<?php echo (isset($val["recharge_points"])?$val["recharge_points"]:''); ?>"><?php echo (isset($val["recharge_points"])?$val["recharge_points"]:''); ?></td>
										<?php if(empty($type)): ?><td title="<?php echo (time_format($val["reg_time"])); ?>"><?php echo (time_format($val["reg_time"])); ?></td>
										<?php else: ?><td><?php echo (time_format(idtoname($val["id"],"ShopsCustomer","add_time","user_id"))); ?></td><?php endif; ?>
										<!-- <td title="<?php echo (time_format($val["last_login"])); ?>"><?php echo (time_format($val["last_login"])); ?></td> -->
										<td onclick="status(<?php echo (isset($val["id"])?$val["id"]:''); ?>,'status')" id="status_<?php echo (isset($val["id"])?$val["id"]:''); ?>"><img src="/Public/images/status_<?php echo (isset($val["status"])?$val["status"]:''); ?>.gif" /></td>
                                        <?php if(($auth_group_id) != "2"): ?><td title="<?php echo L('ACCOUNT_CHANGE');?> <?php echo L('EDIT');?> <?php echo L('DELETE');?>">
											 <a href="<?php echo U('huaxiang',array('uid'=>$val['id']));?>">会员画像</a>
											<a href="<?php echo U('edit',array('id'=>$val['id']));?>"><?php echo L('EDIT');?></a>
											<!--<a href="<?php echo U('MarketingForm/hx',array('uid'=>$val['id']));?>">核销记录</a> -->
											<a href="javascript:;" onclick="$.showConfirm('<?php echo L('SURE_DELETE');?>',function(){window.location.href='<?php echo U('delete',array('id'=>$val['id']));?>'},'hc')"><?php echo L('DELETE');?></a>
											<!-- <?php if($val['customer_id']): ?><a href="<?php echo U('MemberCustomerVisitor/index',array('id'=>$val['customer_id']));?>">店铺到访记录</a><?php endif; ?> -->
										</td><?php endif; ?>
									</tr><?php endforeach; endif; else: echo "" ;endif; ?>
							</tbody>
						</table>
						<div class="btn_party mt15">

							<label for="check_box" class="btn btn-default f_l"><?php echo (L("select_all")); ?>/<?php echo (L("cancel")); ?></label>
							<button type="button" class="btn btn-danger" onclick="$.showConfirm('<?php echo L('SURE_DELETE');?>',function(){$('#myform1').submit();},'hc')"><?php echo L('ALL_DEL');?></button>
						</div>
					</form>
					<nav class="pages_hanchao" id="pages">
						<?php echo (isset($_page)?$_page:''); ?>
					</nav>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="blank10"></div>
</body>
</html>