{include file="page_header.htm"}
{insert_scripts files="../js/utils.js"}

<form enctype="multipart/form-data" name="theForm" action="customer.php" method="post" onsubmit="return validate()">
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="table_form1">

	<tr>
	<td class="label" width="120">用户名:</td>
	<td><input name="user_name" type="text" value="{$customer.user_name}" size="40" class="FormSmall" /><span class="required">&nbsp;</span></td>
	</tr>

	<tr>
	<td class="label" width="120">密码:</td>
	<td><input name="password" type="text" value="" size="40" class="FormSmall" /></td>
	</tr>

	<tr>
	<td class="label" width="120">姓名:</td>
	<td><input name="name" type="text" value="{$customer.name}" size="40" class="FormSmall" /></td>
	</tr>	
	
	<tr>
	<td class="label" width="120">所属分组:</td>
	<td>
	<select name="customer_group_id" class="select_input">
	<option value="0">--请选择--</option>
	{foreach from=$customer_group item=list}
	<option value="{$list.customer_group_id}"{if $list.customer_group_id == $customer.customer_group_id} selected{/if}>{$list.name}({$list.discount})</option>
	{/foreach}
	</select>
	</td>
	</tr>		
			
	<tr>
	<td class="label" width="120">邮箱:</td>
	<td><input name="email" type="text" value="{$customer.email}" size="40" class="FormSmall" /></td>
	</tr>			
	
	<tr>
	<td class="label" width="120">电话:</td>
	<td><input name="telephone" type="text" value="{$customer.telephone}" size="40" class="FormSmall" /></td>
	</tr>	
	
	<tr>
	<td class="label" width="120">手机:</td>
	<td><input name="mobile" type="text" value="{$customer.mobile}" size="40" class="FormSmall" /></td>
	</tr>			
	
	<tr>
	<td class="label" width="120">传真:</td>
	<td><input name="fax" type="text" value="{$customer.fax}" size="40" class="FormSmall" /></td>
	</tr>					
	

	<tr>
	<td class="label">状态:</td>
	<td>
	<select name="status" class="select_input">
	<option value="1" {if 1 == $customer.status} selected{/if}>启用</option>
	<option value="0" {if 0 == $customer.status} selected{/if}>禁用</option>
	</select>
	</td>
	</tr>		
	
	<tr>
	<td style="border:none;" class="label">&nbsp;</td>
	<td style="border:none;">
		<input type="hidden" name="id" value="{$customer.customer_id}" />
		<input type="hidden" name="act" value="{$form_act}" />
		<input type="submit" value="提交" class="bginput" />
		<input type="reset" value="重置" class="bginput" />
	</td>
	</tr> 	
	</table>
</form>

{literal}
<script type="text/javascript">
function validate(){
    validator = new Validator("theForm");
	validator.required("user_name",'用户名不能为空!');
    return validator.passed();
}
</script>
{/literal}
{insert_scripts files="tab.js,validator.js"}
{include file="page_footer.htm"}