{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<div class="form-div">
  <form action="javascript:searchMember()" name="searchForm" method="get">
	<table cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td><img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" /></td>
		<td>
		<input type="text" name="keyword" size="25" />
		</td>
		<td><input type="submit" value="搜索" class="button" /></td>
	</tr>
	</table>
  </form>
</div>
{literal}
<script language="JavaScript">
    function searchMember(){
        listTable.filter['keyword']     = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
        listTable.loadList();
    }
</script>
{/literal}

<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
<div class="tab-div">
<div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr >
    <th align="left" width="7%" ><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="javascript:listTable.sort('user_id'); "><font color="#FFFFFF">编号</font></a>{$sort_user_id}
    </th>
	<th width="10%"><a href="javascript:listTable.sort('user_name'); "><font color="#FFFFFF">会员名</font></a>{$sort_user_name}</th>
	<th width="10%"><a href="javascript:listTable.sort('name'); "><font color="#FFFFFF">姓名</font></a>{$sort_name}</th>
	<th width="20%"><a href="javascript:listTable.sort('email'); "><font color="#FFFFFF">邮箱</font></a>{$sort_email}</th>
	<th width="20%"><a href="javascript:listTable.sort('mobile'); "><font color="#FFFFFF">手机</font></a>{$sort_mobile}</th>
	<th width="15%"><a href="javascript:listTable.sort('reg_time'); "><font color="#FFFFFF">注册时间</font></a>{$sort_reg_time}</th>
	<th width="15%">操作</th>
  </tr>
  {foreach from=$user_list item=list}
  <tr>
    <td><input type="checkbox" name="checkboxes[]" value="{$list.user_id}" />{$list.user_id}</td>
	<td class="first-cell"><span>{$list.user_name|escape:html}</span></td>
	<td align="left"><span>{$list.name}</span></td>
	<td align="left"><span>{$list.email}</span></td>
	<td align="left"><span>{$list.mobile}</span></td>
	<td align="center"><span>{$list.reg_time}</span></td>
	<td align="center">
	<a href="member.php?act=edit&id={$list.user_id}">编辑</a> | 
	<a href="order.php?act=list&user_id={$list.user_id}">订单</a> | 
	<a href="javascript:;" onclick="listTable.remove({$list.user_id}, '您确实要删除该会员吗？')">删除</a>
	</td>
  </tr>
  {foreachelse}
  <tr><td class="no-records" colspan="16">没有会员信息。</td></tr>
  {/foreach}
</table>

<table width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <th align="left" style="padding-left:3px;">
      <input type="hidden" name="act" value="batch" />
      <select name="type" id="selAction" onchange="changeAction()">
        <option value="">请选择...</option>
        <option value="drop">删除</option>
      </select>
      <div style="display:none;">
	  <input type="submit" value="确定" id="btnSubmit" name="btnSubmit" class="button" disabled="true" />
	  </div>
    </th>
    <th align="right" nowrap="true">
    {include file="page.htm"}    
	</th>
  </tr>
</table>
{if $full_page}
</div>
<script type="text/javascript">
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};
 
  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}
  
  {literal}
  function confirmSubmit(frm, ext)
  {
      if (frm.elements['type'].value == 'drop'){
          return confirm('您确实要把选中的会员删除吗?');
      }
     else if (frm.elements['type'].value == 'move_to')
      {
          ext = (ext == undefined) ? true : ext;
          return ext && frm.elements['target_cat'].value != 0;
      }
      else if (frm.elements['type'].value == '')
      {
          return false;
      }
      else
      {
          return true;
      }
  }
  
    function changeAction(){
      var frm = document.forms['listForm'];
      if (!document.getElementById('btnSubmit').disabled && confirmSubmit(frm, false)){
          frm.submit();
      }
  }
  
  
{/literal}
</script>
</div>
</form>

{insert_scripts files="tab.js"}
{include file="page_footer.htm"}
{/if}