<!--
<?php
print <<<EOT
--> 
<SCRIPT LANGUAGE="JavaScript">
<!--
function CheckAll(va){
	form=document.form_work
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if(va=='all'){
			e.checked = true;
		}else{
			e.checked == true ? e.checked = false : e.checked = true;
		}
	}
}
function ckdel(){
	msg=confirm('你确认要批量删除选中用户吗？你慎重考虑，不可恢复！');
	if(!msg){
		return false;
	}
}

function check_wx_attention(uid){
	if ('$webdb[wx_type]'!='1'){	
		return ;
	}

	var checkhtml="";
	$.get("index.php?lfj=$lfj&job=check_wx&uid="+uid+"&"+Math.random(),function(d){
		if(d=='yes'){
			checkhtml="<img src='../member/images/default/wx1.png'>";
		}else{
			checkhtml="<img src='../member/images/default/wx0.png'>";
		}	
		$('.wx_attention'+uid).html(checkhtml);
	});
}

//-->
</SCRIPT>
<div class="MainContainers">
  <div class="Header"><span class="tag">用户资料管理</span><span class="more">&gt;&gt;</span></div>
  <div class="Conter">
	<form name="form1" method="post" action="index.php?lfj=$lfj&job=$job">
		<table width="100%" style="margin-bottom:15px;">
		  <tr>
		  	 <td style="width:400px;">只列出指定用户组的用户{$select_group}</td>
			 <td>
			 	搜索&gt;&gt; 关键字
				<input type="text" name="keywords" value="$keywords">
				<select name="type">
<!--
EOT;
foreach($field_title AS $t=>$v){
$ck=$type==$t?' selected  style="color:red;"':'';
print <<<EOT
-->
					<option value="$t" $ck>$v</option>
<!--
EOT;
}
print <<<EOT
-->    
				 </select>
				 <input type="submit" name="Submit" value="搜 索" class='btn'>
				 [<a href="index.php?lfj=$lfj&job=$job">查看全部用户</a>]
			 </td>
		  </tr>
		</table>
	</form>
<form name="form_work" id="form_work" method="post" action="?lfj=$lfj&action=delete" onsubmit="return ckdel();">
<table class="ListTable">
  <tr> 
    <th width="7%">UID</th>
    <th width="14%">用户名</th>
    <th width="18%">日期</th>
    <th>IP</th>
    <th width="11%">积分 </th>
    <th width="18%">余额</th>
    <th width="9%">修改/删除</th>
	<th width="8%">关注公众号</th>
    <th width="8%">审核与否</th>
  </tr>
  <!--
EOT;
foreach($listdb AS $key=>$rs){
print <<<EOT
-->
  <tr> 
    <td class="txL"><input type="checkbox" name="uid_db[]" value="$rs[uid]"> $rs[uid]</td>
    <td><img src="$rs[icon]" onerror="this.src='../images/default/noface.gif'" width=60 height="60"><br />
 <a href="$webdb[www_url]/member/userinfo.php?uid=$rs[uid]" title="所在城市: " onclick="$rs[alert]" target="_blank">$rs[username]</a> 
      </td>
      <td>注册:$rs[regdate]<br>访问:$rs[lastvist]</td>
    <td tilte="$rs[regip_area] $rs[lastip_area]">注册:$rs[regip]<br/> 访问:$rs[lastip]</td>
    <td>{$rs[money]} 个 </td>
    <td><span class="red">{$rs[rmb]}元</span> <a href="index.php?lfj=$lfj&job=rmbconsume&uid=$rs[uid]">明细</a></td>
    <td> 
<!--
EOT;
if($rs[groupid]||$rs[regdate]){
print <<<EOT
-->
      <a href="index.php?lfj=$lfj&job=editmember&uid=$rs[uid]" onclick="$rs[alert]" title="修改会员资料" class='edit'></a>	  
      <a href="index.php?lfj=$lfj&action=delete&uid=$rs[uid]" onclick="{$rs[alert]};return confirm('你确实要删除此会员吗?不可恢复,请慎重!')" title="删除当前会员" class='del'></a> 
	  $rs[editqy]
<!--
EOT;
}
print <<<EOT
-->
    </td>
	<td ><span class="wx_attention$rs[uid]">$rs[ifattention]</span><script type="text/javascript">
check_wx_attention($rs[uid]);
</script></td>

    <td >$rs[yz] $rs[yzHy] $rs[downqy]</td>
  </tr>
  <!--
EOT;
}
print <<<EOT
-->
  </table>
      <div class="ShowPage">$showpage</div>
      <div class="AtcCont">
        <div class="submits">
          <input type="button" onclick="CheckAll('all')" name="Submit2" value="全选" />
          <input type="button" onClick='CheckAll()' name="Submit2" value="反选" /> 
          <input type="submit" name="Submit2" value="批量删除" /> 
        </div>
      </div>
</form>
</div>
</div>

<div class="MainContainers">
  <div class="Header"><span class="tag">说明</span></div>
  <div class="Conter">
    <ul class="notes">
      <li>1、用户退出关注，系统不会删除他的用户资料，下次再关注，还会对应到之前的资料。</li>

	    <li>2、如果不是认证服务号的话，上面检测是否有关注公众号，不会百分百准确。因为只有认证服务号才有检测接口</li>
    </ul>
  </div>
</div>
<br />
<!--
EOT;
?>
