<?php include(pe_tpl('header.html'));?>
<div class="right fr">
	<div class="now">
		<div class="fl now1"></div>
		<div class="fl now2">会员列表</div>
		<div class="fl now3"></div>
		<div class="clear"></div>
	</div>
	<div class="spqh mat8">
		<div class="fr searbox mat3">
			<form method="get">
				<input type="hidden" name="mod" value="<?php echo $_g_mod ?>" />
				<input type="hidden" name="act" value="<?php echo $_g_act ?>" />
				<span class="fl">用户名：<input type="text" name="name" value="<?php echo $_g_name ?>" class="inputtext inputtext_100" /></span>
				<select name="level" class="inputselect fl mal5 mar5">
					<option value="">不限级别</option>
					<?php foreach($user_level as $k => $v):?>
					<option value="<?php echo $k ?>" <?php if($_g_level==$k):?>selected="selected"<?php endif;?>><?php echo $v ?></option>
					<?php endforeach;?>
				</select>
				<select name="emailget" class="inputselect fl mal5 mar5">
					<option value="">不限订阅</option>
					<?php foreach(array(1=>'正常订阅', 2=>'取消订阅') as $k => $v):?>
					<option value="<?php echo $k ?>" <?php if($_g_emailget==$k):?>selected="selected"<?php endif;?>><?php echo $v ?></option>
					<?php endforeach;?>
				</select>
				<select name="pagenum" class="inputselect fl mal5 mar5">
					<option value="">默认条数</option>
					<?php foreach(array(50=>'50条', 100=>'100条', 200=>'200条') as $k => $v):?>
					<option value="<?php echo $k ?>" <?php if($_g_pagenum==$k):?>selected="selected"<?php endif;?>><?php echo $v ?></option>
					<?php endforeach;?>
				</select>
				<span class="fl">注册时间：<input type="text" name="atime1" value="<?php echo $_g_atime1 ?>" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate" size="12" /></span>
				<span class="fl">至<input type="text" name="atime2" value="<?php echo $_g_atime2 ?>" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate" size="12" /></span>
				<input type="submit" value="搜索" class="input2 fl" />
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<form method="post" id="form">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list mat5">
	<tr>
		<td class="bgtt" align="center" width="10"><input type="checkbox" name="checkall" onclick="pe_checkall(this, 'user_id')" /></td>
		<td class="bgtt" align="center" width="40">ID号</td>
		<td class="bgtt" align="center">用户名</td>
		<td class="bgtt" align="center" width="80">会员等级</td>
		<td class="bgtt" align="center" width="150">Email</td>
		<td class="bgtt" align="center" width="60">注册时间</td>
		<td class="bgtt" align="center" width="50">佣金</td>
		<td class="bgtt" align="center" width="30">积分</td>
		<td class="bgtt" align="center" width="30">人数</td>
		<td class="bgtt" align="center" width="70">操作</td>
	</tr>
	<?php foreach($info_list as $v):?>
	<tr>
		<td align="center"><input type="checkbox" name="user_id[]" value="<?php echo $v['user_id'] ?>"></td>
		<td align="center"><?php echo $v['user_id'] ?></td>
		<td align="center"><?php echo $v['user_name'] ?></td>
		<td align="center"><?php echo $user_level[$v['user_level']] ?></td>
		<td align="center"><?php echo $v['user_email'] ?></td>
		<td align="center"><?php echo pe_date($v['user_atime'], 'Y-m-d') ?></td>
		<td align="center"><?php echo $v['user_money'] ?></td>
		<td align="center"><?php echo $v['user_tjnum'] ?></td>
		<td align="center"><?php echo $v['tj_user_num'] ?></td>
		<td align="center">
			<a href="admin.php?mod=user&act=edit&id=<?php echo $v['user_id'] ?>" class="admin_edit">修改</a>
			<a href="admin.php?mod=user&act=delsql&id=<?php echo $v['user_id'] ?>" class="admin_del" onclick="return pe_cfone('删除')">删除</a>
		</td>
	</tr>
	<?php endforeach;?>
	<tr>
		<td class="bgtt"><input type="checkbox" name="checkall" onclick="pe_checkall(this, 'user_id')" /></td>
		<td class="bgtt" colspan="9">
			<span class="fl">
				<button href="admin.php?mod=qunfa&act=allnotice&t=all" onclick="return pe_cfqunfa(this,'all', 'form', '全发通知')">全部通知</button>
				<button href="admin.php?mod=qunfa&act=allnotice" onclick="return pe_cfqunfa(this,'user_id', 'form', '批量通知')">部分通知</button>
				<button href="admin.php?mod=qunfa&act=useradd&type=user" onclick="return pe_cfqunfa(this, 'user_id', 'form', '批量群发')">批量群发</button>
				<button href="admin.php?mod=user&act=delsql" onclick="return pe_cfall(this, 'user_id', 'form', '批量删除')">批量删除</button>	
			</span>
			<span class="fenye"><?php echo $db->page->html ?></span>
		</td>
	</tr>
	</table>
	</form>
</div>
<script type="text/javascript" src="<?php echo $pe['host_root'] ?>include/plugin/my97/WdatePicker.js"></script>
<script charset="utf-8" src="<?php echo $pe['host_root'] ?>include/plugin/artdialog/jquery.artDialog.js?skin=chrome"></script>
<script charset="utf-8" src="<?php echo $pe['host_root'] ?>include/plugin/artdialog/plugins/iframeTools.js"></script>
<script type="text/javascript">
function pe_cfqunfa(_this, inputname, formid, show) {
  if(inputname=='all'){
	art.dialog.open($(_this).attr("href"), {title:show, width: 790, height: 530});
  }
  else{
  	if ($("input[name='"+inputname+"[]']").filter(":checked").length == 0) {
		alert('请先勾选需要'+show+'的信息!');
		return false;
	}
	var user_id = '';
	$("input[name='"+inputname+"[]']").filter(":checked").each(function(){
		user_id += ',' + $(this).val();
	})
	art.dialog.open($(_this).attr("href") + '&user_id=' + user_id, {title:show, width: 790, height: 530});
  }
return false;
}
</script>
<?php include(pe_tpl('footer.html'));?>