<!--#include file="0.asp"--><!--#include file="0.asp"-->
<!--#include file="../../conn/zkconn.asp"-->
<% name=session("www.loogoo.com")
if request("x")<>"" then
set rs = conn.execute("select password from user_name where  name='"&name&"'")
if request("password")=trim(rs("password")) then
conn.execute("Update user_name set password = '"&request("password2")&"' where  name='"&name&"'")
Response.Write("<script>alert(""设置成功"");location.href=""password.asp"";</script>")
else
Response.Write("<script>alert(""原密码错误，请检查！"");history.back();</script>")
end if
end if
set rs = conn.execute("select ps from user_name where name='"&name&"'")
 %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/css.css" rel="stylesheet" type="text/css">
</head>
<body><script language="javascript">
	<!--//
	function checksignup() {
		if ( document.form.password.value == '' ) {
			window.alert('请输入原管理员密码!!');
			document.form.password.focus();
			return false;
		}
		if (( document.form.password2.value == '' )||( document.form.password2.value.length<4)) {
			window.alert('请输入4位以上新管理员密码!!');
			document.form.password2.focus();
			return false;
		}
		if ( document.form.password3.value == '' ) {
			window.alert('请确认新管理员密码!!');
			document.form.password3.focus();
			return false;
		}
		if ( document.form.password2.value!=document.form.password3.value ) {
			window.alert('新管理员密码与确认密码不一致，请重新输入!!');
			document.form.password2.focus();
			return false;
		}
			return true;
			}
	//-->
</script>
<form name="form" method="post" action="?x=yes">
  <p>&nbsp;</p>
  <table width="500" align="center">
    <tr> 
      <td colspan="2">&nbsp; <font color="#FF3333" class="b2"><strong>&gt;&gt;网店管理员密码修改&nbsp;<br>
        <br>
        </strong></font></td>
    </tr>
    <tr>
      <td align="right">原密码：</td>
      <td><input name="password" type="password" class="wenbenkuang" id="password" size="20" maxlength="20"></td>
    </tr>
    <tr> 
      <td align="right">新密码：</td>
      <td><input name="password2" type="password" class="wenbenkuang" id="password2" size="20" maxlength="20"></td>
    </tr>
    <tr> 
      <td width="151" align="right">新密码确认：</td>
      <td width="337"> <input name="password3" type="password" class="wenbenkuang" id="password3" size="20" maxlength="20"></td>
    </tr>
    <tr> 
      <td align="center">&nbsp;</td>
      <td> <input name="Submit" type="submit" class="go-wenbenkuang" value="提 交" onClick="javascript:return checksignup()"> 
        <input name="Submit2" type="reset" class="go-wenbenkuang" value="重 置"></td>
    </tr>
  </table>

</form>
</body>
</html>
<%rs. close
set rs=nothing
conn.close
set conn=nothing
%>