<!--#include file="top.asp"-->
<!--#include file="../bbs/inc/md5.asp"-->
<%topview%>
<%if request("action")="save" then
password=request("password")
pass=request("pass")
pass1=request("pass1")
pass2=request("pass2")
dlxf_question=request("dlxf_question")
dlxf_answer=request("dlxf_answer")

if md5(pass,32)<>password then
response.write"<script>alert('密码修改出错，下面是产生错误的可能原因：\n\n·您输入的旧密码不正确，请重新输入');history.go(-1)</script>"
response.end
end if

set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_job_qz where dlxf_id="&session("individualid")
rs.open sql,conn,1,3
rs("dlxf_pwd")=md5(pass1,32)
rs("dlxf_question")=dlxf_question
rs("dlxf_answer")=Md5(dlxf_answer,32)
rs.update
rs.close
set rs=nothing
response.write "<script>alert('恭喜您，操作成功！');window.open('admin.asp','_self')</script>"
response.end
end if%>

<script language="JavaScript">
<!--
function checkdata() {
if( addform.pass.value =="") {
alert("\密码修改出错，下面是产生错误的可能原因：\n\n·请输入 4-16 位的原始密码")
return false;
}
if( addform.pass1.value =="" || addform.pass1.value.length<4) {
alert("\密码修改出错，下面是产生错误的可能原因：\n\n·请输入 4-16 位的新密码")
return false;
}
if( addform.pass2.value =="") {
alert("\密码修改出错，下面是产生错误的可能原因：\n\n·请输入您的确认密码")
return false;
}
if( addform.pass1.value != addform.pass2.value ) {
alert("\密码修改出错，下面是产生错误的可能原因：\n\n·确认密码与新密码不一致，请重新输入")
return false;
}
if( addform.dlxf_question.value =="") {
alert("\操作出错，下面是产生错误的可能原因：\n\n·请输入您的密码提示问题，以便忘记密码时找回密码")
return false;
}
if( addform.dlxf_question.value == "") {
alert("\操作出错，下面是产生错误的可能原因：\n\n·请输入您的密码问题答案，以便忘记密码时找回密码")
return false;
}
return true;
}
// -->
</script>

<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td width="149" valign=top background="img/leftmanu_bg.gif">
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="611" valign=top>
<!--==============-->
<table width="580" border="0" cellspacing="0" cellpadding="5" align="center">
<tr><td height=25 bgcolor=#efefef style="border-bottom:1px #cccccc solid">您现在的位置是：管理中心 > 修改密码</td></tr>
<tr><td>
<!--###################################-->
<br>
<table width="80%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1 align=center>
  <tr>
    <td height=25 bgcolor=#6C94D1>　　<font color=white>企业密码及提示问题答案修改</font></td>
  </tr>
  <tr>
    <td bgcolor=#ffffff height=25>
<!--======-->
<table width="50%" border="0" cellspacing="0" cellpadding="0" align=center>
<%sql1="select * from dlxf_job_qz where dlxf_id="&session("individualid")
set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,conn,1,1%>
<form name="addform" method="post" action="lcdpass.asp?action=save" onSubmit="return checkdata()">
<input name="password" type="hidden" value="<%=rs1("dlxf_pwd")%>">
  <tr>
    <td width="32%" align=center height=30>旧 密 码</td>
	<td width="68%"><input name="pass" type="password" style="width=130" maxlength="16"></td>
  </tr>
  <tr>
    <td height=30 align=center>新 密 码</td>
	<td><input name="pass1" type="password" style="width=130" maxlength="16"></td>
  </tr>
  <tr>
    <td height=30 align=center>确认密码</td>
	<td><input name="pass2" type="password" style="width=130" maxlength="16"></td>
  </tr>
  <tr>
    <td height=30 align=center>提示问题</td>
	<td><input name="dlxf_question" type="text" style="width=130" maxlength="30" title="忘记密码的提示问题"></td>
  </tr>
  <tr>
    <td height=30 align=center>问题答案</td>
	<td><input name="dlxf_answer" type="text" style="width=130" maxlength="30" title="忘记密码的提示问题的答案"></td>
  </tr>
  <tr>
    <td height=30 align="center" colspan="2"><input type="submit" name="Submit" value="修 改" class="input1"></td>
  </tr>
</form>
<%rs1.close%>
</table>
<!--======-->
	</td>
  </tr>
</table>
<!--###################################-->
</td></tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<!--====== bottom ========-->
<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor=#ffffff>
<tr><td height=2 bgcolor=#6C94D1></td></tr>
  <tr>
    <td align="center" height=80><%=citybottom%></td>
  </tr>
</table>
