<form action="member_personal_certify.manage.php?action=update" id="form_update" name="form_update" method="post">
<input type="hidden" name="member_id" id="member_id" value="<tpl> $member_array.member_id </tpl>" />
<table class="from_table">
	<tr>
		<th class="th2"><tpl> $langSysPersonalCertifyMemberName </tpl>：</th>
		<td class="td1">
			<tpl> $member_array.login_name </tpl>
		</td>
		<th class="th2"><tpl> $langSysPersonalCertifyState </tpl>：</th>
		<td class="td1">
			<tpl> if $member_array.personal_certify eq '0' </tpl>
				<tpl> $langSysPersonalCertifyStateZero </tpl>
			<tpl> /if </tpl>
			<tpl> if $member_array.personal_certify eq '1' </tpl>
				<tpl> $langSysPersonalCertifyStateOne </tpl>
			<tpl> /if </tpl>
			<tpl> if $member_array.personal_certify eq '2' </tpl>
				<tpl> $langSysPersonalCertifyStateTwo </tpl>
			<tpl> /if </tpl>
			<tpl> if $member_array.personal_certify eq '3' </tpl>
				<tpl> $langSysPersonalCertifyStateThree </tpl>
			<tpl> /if </tpl>
		</td>
	</tr>
	<tr>
		<th class="th2"><tpl> $langSysPersonalCertifyChangeState </tpl>：</th>
		<td class="td1" colspan="3">
			<div style="float:left; padding-left:20px">
			<select name="sel_state" id="sel_state" onchange="if(this.value=='3'){$('#deny_reason').show();}else{$('#deny_reason').hide();}">
				<option value="2"><tpl> $langSysPersonalCertifyStateTwo </tpl></option>
				<option value="3"><tpl> $langSysPersonalCertifyStateThree </tpl></option>
			</select>
			</div>
			<div style="float:right; padding-right:77px; padding-top:2px;">
				<span class="btn_left">
					<input type="submit" class="btn_submit" value="<tpl> $langSysPersonalCertifySubmit </tpl>" />
				</span>	
				<span class="btn_left">
					<input type="button" class="btn_submit" value="<tpl> $langSysPersonalCertifyReturn </tpl>" onclick="ShowDiv='result_content';getPageContent('member_personal_certify.manage.php?action=ajax_list&certify_state=<tpl> $condition.certify_state </tpl>&member_name=<tpl> $condition.member_name </tpl>&curpage=<tpl> $condition.curpage </tpl>');" />
				</span>	
			</div>
		</td>
	</tr>
	<tr>
		<th class="th2"><tpl> $langSysPersonalCertifyLastReason </tpl>：</th>
		<td class="td1" colspan="3">
			<tpl> $member_array.personal_certify_deny_reason </tpl>
		</td>
	</tr>
	<tr id="deny_reason" style="display:none">
		<th class="th2"><tpl> $langSysPersonalCertifyDenyReason </tpl>：</th>
		<td class="td1" colspan="3">
			<textarea name="personal_certify_deny_reason" id="personal_certify_deny_reason" cols="40" rows="5"></textarea>
			<label style="display:none" for="personal_certify_deny_reason" class="wrong" metaDone="true" generated="true"></label>
		</td>
	</tr>
	<tr>
		<th class="th2"><tpl> $langSysPersonalCertifyCardUp </tpl>：</th>
		<td class="td1" colspan="3">
			<img src="<tpl> $site_url </tpl>/<tpl> $member_array.personal_certify_identitycard_up </tpl>" />
		</td>
	</tr>
	<tr>
		<th class="th2"><tpl> $langSysPersonalCertifyCardBack </tpl>：</th>
		<td class="td1" colspan="3">
			<img src="<tpl> $site_url </tpl>/<tpl> $member_array.personal_certify_identitycard_back </tpl>" />
		</td>
	</tr>
</table>
</form>
<script>
$(document).ready(function() {
	//添加
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ShowDiv	= 'result_content';
								getPageContent("member_personal_certify.manage.php?action=ajax_list&certify_state=<tpl> $condition.certify_state </tpl>&member_name=<tpl> $condition.member_name </tpl>&curpage=<tpl> $condition.curpage </tpl>");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form_update").validate({
		errorClass: "wrong",
		rules: {
			personal_certify_deny_reason: {required: 
					function(){
						if($("#sel_state").val()=='3'){
							return true;
						}else{
							return false;
						}
					}}
		},
		messages: {
			personal_certify_deny_reason: {required: "<tpl> $errSysPersonalCertifyDenyReasonIsEmpty </tpl>"}
		},
		submitHandler: function() {
			$('#form_update').ajaxSubmit(options);
		}
	});
});
</script>