<!--#include file="head.asp"-->
<% 
if session("user")<>"" then
if request("action")="check" then
	Set rsLogin=Server.CreateObject("ADODB.RecordSet")
	rsLogin.Open "Select * from user1 where name='"&Request.Form("name")&"' and PassWord='"&Request.Form("password")&"'",conn,1,3
	If Not rsLogin.Eof Then	
	rslogin("password")=request("newpassword")
	rslogin.update
	Response.Write "<script language=javascript>alert('密码修改成功!!'); "
	else
	Response.Write "<script language=javascript>alert('原始密码不正确!!'); "
	end if
	rsLogin.Close
	Set rsLogin=Nothing
end if	
%>
<script type="text/javascript">
function checkForm(){
	if(document.form1.name.value==""){
		alert('用户名不能为空！');
		document.form1.name.focus();
		return false;
	}
	
	if(document.form1.password.value==""){
		alert('旧密码必须填写！');
		document.form1.password.focus();
		return false;
	}
		
	if(document.form1.newpassword.value==""){
		alert('新密码必须填写！');
		document.form1.newpassword.focus();
		return false;
	}
	
	document.form1.submit();
}
</script>        

<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=215 background=images/ne_left_pic03.gif>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=175 src="images/ne_left_pic06.gif" width=215></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=30 src="images/ne_left_tt03.gif" width=215></TD></TR></TBODY></TABLE>
      <TABLE height="100%" cellSpacing=5 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=top><BR><B>&nbsp;&nbsp;密码修改步骤</B><BR>&nbsp;&nbsp;一、会员登陆
			<FONT color=#ff0000>√</FONT><BR>&nbsp;&nbsp;二、填写信息
			<FONT color=#ff0000>→</FONT><BR>&nbsp;&nbsp;三、完成修改
			<FONT color=#ff0000>→</FONT></TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=10 src="images/ne_main01.gif" width=10></TD></TR></TBODY></TABLE><BR>
      <TABLE height=28 cellSpacing=0 cellPadding=3 width="95%" align=center border=0>
        <TBODY>
        <TR>
          <TD background=images/ne_login_bg01.gif>四川华北星学校 <IMG height=5 src="images/ne_patch01.gif" width=3 align=middle> 学生投稿</TD></TR></TBODY></TABLE>
	  <table width="95.2%" align="center" style="margin-top:5px; margin-bottom:5px"> 
	  <tr>
		   <TD class=phbox height=25 width="92%">
<SPAN>&nbsp;&nbsp;请牢记您的密码，如果遗失，你可以联系我们或者通过密码找回功能找回。<br>&nbsp;&nbsp;如有其他问题请及时与我们取得联系。电话：028-86131259、028-86131245、13880252822</SPAN></TD></tr></table>
						
      <FORM name="form1" action=?action=check method=post>
      <TABLE cellSpacing=0 cellPadding=3 width="95%" align=center border=0>
        <TBODY>        
        <TR>
          <TD width="20%">用户名</TD>
          <TD><INPUT id=name size=30 name=name value="<%=session("user")%>"> *</TD></TR>       
        <TR>
          <TD width="20%">旧密码</TD>
          <TD><INPUT id=passwword size=30 name=password> *</TD></TR>
		<TR>
          <TD width="20%">新密码</TD>
          <TD><INPUT id=newpassword size=30 name=newpassword> *</TD></TR>        
        <TR>
          <TD>&nbsp;</TD>
          <TD><img src="images/search_btn.gif" onClick="javascript:checkForm();" style="cursor:hand">&nbsp;<img type="image" onClick="javascript:form1.reset();return false;"  src="images/qingchu.gif" style="cursor:hand"></TD></TR></TBODY></TABLE></FORM>
      </TD></TR></TBODY></TABLE>
<!--#include file="foot.asp"-->
<% 
else
Response.Write "<script language=javascript>alert('您还没有登陆，或者登陆超时!!');location.href='index.asp';</script>"
end if
%>