<%temp_customer_manage_password_edit_handle=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_customer_manage_password_edit_handle -->
<%
If Trim(request.Form("customer_password_new")) <> "" Then

	If len(Trim(request.Form("customer_password_new"))) <6 Then
		site.Error.info = "密码设置失败！您填写的新密码应大于6位！"
		site.Error.location = "temps.asp?tr=customer|manage|password"
		site.Error.err()
	End If
	
	If Trim(request.Form("customer_password_new")) <> Trim(request.Form("customer_password_new_verify")) Then
		site.Error.info = "密码设置失败！您填写的新密码和确认新密码不符！"
		site.Error.location = "temps.asp?tr=customer|manage|password"
		site.Error.err()
	End If

	If site.functions.EncodeMd5(Trim(request.Form("customer_password_old")),16) <> site.temp.customer.info.reg_password Then
		site.Error.info = "密码设置失败！原密码错误！"
		site.Error.location = "temps.asp?tr=customer|manage|password"
		site.Error.err()
	End If

	If Not site.temp.customer.info.EditInfo(site.temp.customer.info.reg_name, "customer_reg_password='" & site.functions.EncodeMd5(Trim(request.Form("customer_password_new")),16)&"'") Then
		site.Error.info = "密码设置失败！出现意外错误！" & site.Error.info
		site.Error.location = "temps.asp?tr=customer|manage|password"
		site.Error.err()
	End If
	
	if site.temp.customer.login.logout() then site.Error.info="请您重新登陆！"
    
End If

site.Error.info = "登陆设置成功！"&site.Error.info
site.Error.location = "temps.asp?tr=customer|login|form"
site.Error.suc()
%>