{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="customer.php" name="list_form" id="list_form">
<div class="list-div" id="listDiv">
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
<tr>
<td height="36" class="BotNavBg">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td width="50" align="left" style="padding-left:10px;">
	<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label></td>
	<td style="padding-left:5px;">
		<select name="type_up" id="sel_action_up" onchange="change_action(this)">
		<option value="">请选择...</option>
		<option value="drop">删除</option>
		<option value="status">启用</option>
		<option value="not_status">禁用</option>
		</select>
	</td>
	<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
	</tr>
	</table>
</td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" class="list-table">
		<tr class="thead">
		<th align="left" width="2%" ><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" /> </th>
		<th width="10%" align="left">用户名</th>
		<th width="10%" align="left">姓名</th>
		<th width="15%" align="left">邮箱</th>
		<th width="10%" align="left">电话</th>
		<th width="12%" align="left">手机</th>
		<th width="10%" align="center">状态</th>
		<th width="18%" align="center"><a href="javascript:listTable.sort('date_added'); "><font color="#FFFFFF">日期</font></a>{$sort_date_added}</th>
		<th width="15%" align="left">操作</th>
		</tr>
		{foreach from=$customer_list item=list}
		<tr>
		<td><input type="checkbox" name="checkboxes[]" value="{$list.customer_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.telephone}</span></td>
		<td align="left"><span>{$list.mobile}</span></td>
		<td align="center"><img src="images/{if $list.status}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_status', {$list.customer_id})" /></td>
		<td align="center"><span>{$list.date_added}</span></td>
		<td align="right" nowrap="true" class="operation">
		<a href="customer.php?act=edit&id={$list.customer_id}{$strpass}" title="编辑" class="op_edit"></a>
		<a href="customer_address.php?act=list&customer_id={$list.customer_id}{$strpass}" title="地址管理" class="op_column"></a>
		<a href="javascript:;" onclick="listTable.remove({$list.customer_id}, '您确实要删除该会员吗?')" title="删除" class="op_del"></a>
		</td>
		</tr>
		{foreachelse}
		<tr><td class="no-records" colspan="16">没有记录</td></tr>
		{/foreach}
	</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td height="36" class="BotNavBg">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="50" align="left" style="padding-left:10px;">
			<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label>
			</td>
			<td style="padding-left:5px;">
				<input type="hidden" name="act" id="act" value="batch" />
				<input type="hidden" name="type" value="" id="type" />
				<select name="type_down" id="sel_action_down"  onchange="change_action(this)">
				<option value="">请选择...</option>
				<option value="drop">删除</option>
				<option value="status">启用</option>
				<option value="not_status">禁用</option>
				</select>
			</td>
			<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
		</tr>
		</table>
	</td>
  </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 export_member(){
		$('#act').val('export');
		$("#list_form").submit();
	}
	
	function change_action(obj){
		var sel_val = $(obj).val();	
		$('#type').val(sel_val);

		if(sel_val == 'drop' && confirm("确认删除?")){
			$("#list_form").submit();	
		}else if(sel_val == 'not_status' && confirm("确认禁用?")){
			$("#list_form").submit();	
		}else if(sel_val == 'status' && confirm("确认启用?")){
			$("#list_form").submit();	
		}
		return false;
	}

	function select_all(obj){
		$('.list-table :checkbox').prop("checked",$(obj).prop('checked'));
	}
{/literal}
</script>
</form>
{insert_scripts files="tab.js"}
{include file="page_footer.htm"}
{/if}