<!--#include file=webhead.asp-->
<!--#include file=cookie.asp-->
<%if request.QueryString("action")="save" then%>
<!--#include file="../by2carmd5.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from byshop_user where user='"&request.cookies("byshop")("user")&"'",conn,1,3
if md5(trim(request("password")))<>rs("pass") then
response.Write "<script language=javascript>alert('原密码错误，请返回重新输入');history.go(-1);</script>"
response.End
else
rs("pass")=md5(trim(request("password2")))
rs.Update
rs.Close
set rs=nothing
response.Cookies("byshop")("user")=""
  response.write"<SCRIPT language=JavaScript>alert('您的密码修改成功，请重新登录！');"
   response.write"this.location.href='login.asp';</SCRIPT>" 
end if
response.End
end if
%>

<title><%=webname%>-会员中心-</title>
<div align="center">
<table border="0" width="784" cellspacing="0" cellpadding="0" bordercolor="#000000" style="border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px" >
		<tr>
			<td bgcolor="#E9E9E9" height=2></td>
				</tr>
		<tr>
			<td height=5></td>
				</tr>
		<tr>
			<td align="center">
		<p align="center"><%if ad2451class=0 then%><a target="_blank" href="<%=ad2451url%>"><img  alt="<%=ad2451name%>" src="<%=ad2451%>"  border="0" width=777 height=123></a>
	<%else%>
													<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="777" height="123">
	<param name="movie" value="<%=ad2451%>">
	<param name="quality" value="High">
	<embed src="<%=ad2451%>" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="777" height="123"></object>

	<%end if%>
	
												
			
												</td>
				</tr>
		<tr>
			<td height=5></td>
				</tr>
		<tr>
			<td height=5></td>
				</tr>
			</table>
<%
set rs7=server.CreateObject ("adodb.recordset")
sql="select * from byshop_user where user='"&replace(request.cookies("byshop")("user"),"'","")&"'"
rs7.open sql,conn,1,1
%>
	<table border="0" width="784" style="border-collapse: collapse; border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px" bordercolor="#000000" cellpadding="0">
		<tr>
			<td width="200" valign="top"><!--#include file="mume.asp"--></td>			<td width=3 bgcolor="#ffffff"></td>
			<td width=1 bgcolor="#E9E9E9"></td>
			<td width=3 bgcolor="#ffffff"></td>
			<td width="600" valign="top" align="center"><form name="renpassword"  method="post" action="password.asp?action=save" onSubmit="return check();">
			　<table border="1" width="95%" cellspacing="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#E9E9E9">
				<tr>
					<td colspan="2">
					<p align="center"><b>修改密码</b></td>
				</tr>
				<tr>
					<td width=50%>
					<p align="right">登<span lang="zh-cn"> 录 名：</span></td>
					<td><%=rs7("user")%>　</td>
				</tr>
				<tr>
					<td>
					<p align="right">旧 密 码<span lang="zh-cn">：</span></td>
					<td>
					<input name="password" type="password" id="password" size="20"></td>
				</tr>
				<tr>
					<td>
					<p align="right">新 密 码<span lang="zh-cn">：</span></td>
					<td>
					<input name="password1" type="password" id="password1" size="20"></td>
				</tr>
				<tr>
					<td>
					<p align="right">
					<span lang="en-us">&nbsp;</span>确认密码<span lang="zh-cn">：</span></td>
					<td>
					<input  name="password2" type="password" id="password2" size="20"></td>
				</tr>
				<tr>
					<td colspan="2">
					<p align="center">
					<input class="go-wenbenkuang" type="submit" value="提   交" name="button" >
					<input class="go-wenbenkuang" type="reset" value="取   消" name="Submit"> 
					</td>
				</tr>
			</table></form>
			<p><br>
　</td>
		</tr>
	</table>
</div>
<script LANGUAGE="javascript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function check()
{
  if(checkspace(document.renpassword.password.value)) {
	document.renpassword.password.focus();
    alert("原密码不能为空！");
	return false;
  }
  if(checkspace(document.renpassword.password1.value)) {
	document.renpassword.password1.focus();
    alert("新密码不能为空！");
	return false;
  }
    if(checkspace(document.renpassword.password2.value)) {
	document.renpassword.password2.focus();
    alert("确认密码不能为空！");
	return false;
  }
    if(document.renpassword.password1.value != document.renpassword.password2.value) {
	document.renpassword.password1.focus();
	document.renpassword.password1.value = '';
	document.renpassword.password2.value = '';
    alert("新密码和确认密码不相同，请重新输入");
	return false;
  }
	document.admininfo.submit();
  }
//-->
</script> 
<!--#include file=webfoot.asp-->