<form id="form1" action="system_power.manage.php" method="post">
<input type="hidden" name="action" value="update_member" />
<table border="0" cellpadding="0" cellspacing="0" class="from_table">
	<tr>
	  <th width="120"><tpl> $langSystemPAdminUserName </tpl></th>
		<td align="left" class="td rowform"><tpl> $member_array.sys_login_name </tpl>
	  <input name="sys_login_name" id="sys_login_name" type="hidden" value="<tpl> $member_array.sys_login_name </tpl>" /></td>
		<td width="300" class="vtop tips2"><tpl> $langSystemPAccounts </tpl><label style="display:none" for="sys_login_name" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
	  <th width="120"><tpl> $langSystemPPassword </tpl></th>
	  <td align="left" valign="top" class="td rowform"><input name="sys_password" type="password" id="sys_password" class="txtinput" maxlength="16" /></td>
		<td width="300" class="vtop tips2"><tpl> $langSystemPPass5To16 </tpl>	<tpl> $langSystemPPassOneTimeNull </tpl>
	  <label style="display:none" for="sys_password" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
	  <th width="120"><tpl> $langSystemPAgainInputPass </tpl></th>
	  <td align="left" class="td rowform"><input name="sys_password_two" type="password" id="sys_password_two" class="txtinput" maxlength="16" /></td>
		<td width="300" class="vtop tips2"> <label style="display:none" for="sys_password_two" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
	  <th width="120"><tpl> $langSystemPEmail </tpl></th>
	  <td align="left" class="td rowform"><input name="sys_email" type="text" id="sys_email" maxlength="100"class="txtinput" value="<tpl> $member_array.sys_email </tpl>" /></td>
		<td width="300" class="vtop tips2"> <label style="display:none" for="sys_email" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
	  <th width="120"><tpl> $langSystemPowerGroup </tpl></th>
		<td colspan="2" align="left" class="td rowform">
			<select name="sys_group_id">
				<tpl> section name=loop loop=$sys_group_list </tpl>
					<option
					<tpl> if $sys_group_list[loop].sys_group_id eq $member_array.sys_group_id </tpl>
					 selected="selected"
					<tpl> /if </tpl>
					 value="<tpl> $sys_group_list[loop].sys_group_id </tpl>"><tpl> $sys_group_list[loop].sys_group_name </tpl></option>
				<tpl> /section </tpl>
	  </select></td>
	</tr>

</table>
<div class="table-5-bottom">

<div class="btn_marginleft_1">
<span class="btn_left">
		<input type="submit" value="<tpl> $langSystemPSave </tpl>" class="btn_submit"/>  
		</span>
		<span class="btn_left">
		<input id="butt_listmember" type="button" value="<tpl> $langSystemPReturnAdminList </tpl>" class="btn_submit">
		</span>
  	  <input type="hidden" name="sys_member_id" value="<tpl> $member_array.sys_member_id </tpl>" />
	  </div>
	 </div>
</form>

<script>
$(document).ready(function() {
	//载入新增界面
	$('#butt_listmember').click(function(){
		//载入列表页面	
		ShowDiv = "result_content";
		getPageContent("system_power.manage.php?action=ajax_member&curpage=<tpl> $curpage </tpl>");
	});
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == 1){
								ShowDiv = "result_content";	
								getPageContent("system_power.manage.php?action=ajax_member&curpage=<tpl> $curpage </tpl>");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form1").validate({
		errorClass: "wrong",
		rules: {
			sys_password: {minlength:5,maxlength:16},
			sys_password_two: {minlength:5,maxlength:16,equalTo:'#sys_password'},
			sys_email: {required:true,email:true}
		},
		messages: {
			sys_password: {minlength:"<tpl> $langSystemPPassLengthNo5 </tpl>",maxlength:"<tpl> $langSystemPPassLengthNo16 </tpl>"},
			sys_password_two: {minlength:"<tpl> $langSystemPPassLengthNo5 </tpl>",maxlength:"<tpl> $langSystemPPassLengthNo16 </tpl>",equalTo:"<tpl> $langSystemPTwicePassNoAccord </tpl>"},
			sys_email: {required:"<tpl> $langSystemPEmailNotNull </tpl>",email:"<tpl> $langSystemPEmailFormatErr </tpl>"}
		},
		submitHandler: function() {
			$('#form1').ajaxSubmit(options);
		}
	});
});
</script>