<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<%
act=request("act")
if act="edit" then
if request("oldpass")="" then
		response.Write "<script >alert('提示：\n\n请填写原始密码,立即返回...');history.back(-1);</script>"
		response.End()	
end if
oldpass=md5(request("oldpass"))
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_admin where id="&session("adminid")&" and adminpass='"&oldpass&"'"
	rs.open sql,conn,1,1
	if rs.eof then
		response.Write "<script >alert('提示：\n\n原始密码不对,立即返回...');history.back(-1);</script>"
		response.End()	
	end if
	rs.close
	set rs=nothing	
if request("newpass1")="" or request("newpass2")="" then
		response.Write "<script >alert('提示：\n\n请填写新的密码,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
if request("newpass1")<>request("newpass2") then
		response.Write "<script >alert('提示：\n\n密码输入不一致,立即返回...');history.back(-1);</script>"
		response.End()	
		end if
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select top 1 * from H_admin"
	rs.open sql,conn,1,3
	rs("adminpass")=md5(request("newpass1"))
	rs("adminuser")=request.Form("adminuser")
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n修改成功,您的密码是："&request("newpass1")&"立即返回...');location.href='edit_pwd.asp';</script>"
	response.End()	
	end if
		
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<title><%=W_title%>,会员中心</title>

<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="style.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript src="images/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="images/function.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript type=text/javascript>
<!--


/*
function AddnewType()
*/
-->
</SCRIPT>

<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
</HEAD>
<BODY><!--用户中心头部-->
<!--#include file="top.asp"-->
<table width="960" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="150" valign="top"><!--#include file="left.asp"--></td>
        <td width="810" align="right" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="20" align="center"><img src="images/ico_4.gif" width="12" height="12"></td>
                <td height="30" align="left"><a href="index.asp" target="_self">用户中心</a> <span class="uc_huise">&gt; 修改密码</span></td>
            </tr>
            <tr>
                <td height="1" colspan="2" bgcolor="#EEEEEE"></td>
                </tr>
        </table>
            <table width="600" height="5" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
			<form name="form" action="edit_pwd.asp?act=edit" method="post"  target="_self">
            <table width="800" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE">
                <tr>
                    <td height="30" colspan="2" align="left" bgcolor="#FFFFFF" class="uc_huise">修改密码                        </td>
                </tr>
                <tr>
                    <td width="127" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >原始密码：</td>
                  <td width="670" height="14" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="oldpass" type="password" id="oldpass"></td>
                </tr>
                <tr>
                  <td width="127" height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >新的用户：</td>
                  <td height="15" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="adminuser" type="text" id="adminuser" value="<%=session("adminuser")%>"></td>
                </tr>
                <tr>
                  <td height="30" align="right" bgcolor="#FFFFFF" class="fc_green">新 密 码：</td>
                  <td height="30" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="newpass1" type="password" id="newpass1"></td>
                </tr>
                <tr>
                  <td height="30" align="right" bgcolor="#FFFFFF" class="fc_green" >确认密码：</td>
                  <td height="30" align="left" bgcolor="#FFFFFF" class="uc_huise"  ><input name="newpass2" type="password" id="newpass2"></td>
                </tr>
                
                <tr>
                    <td height="28" colspan="2" align="center" bgcolor="#FFFFFF" ><input name="Submit" type="submit" class="biao" value="立即修改"></td>
              </tr>
            </table>
	        
			</form>
		</td>
    </tr>
</table>
<!--#include file="end.asp"-->

</BODY></HTML>
