<!--#include file="top.asp"-->
<!--#include file="../bbs/inc/md5.asp"-->
<%usertopview
if request("action")="edit" 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(password)
errstyle="·您输入的旧密码不正确，请重新输入！"
scripterr
end if

set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_yp where dlxf_id="&session("id")
rs.open sql,conn,1,3
rs("dlxf_pass")=md5(pass1,32)
rs("dlxf_question")=dlxf_question
rs("dlxf_answer")=Md5(dlxf_answer,32)
rs.update
rs.close
set rs=nothing

response.redirect"ok.asp?url=lcdpass.asp"
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="150" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="610" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是：管理中心 > 企业资料</td></tr>
  <tr>
    <td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
  <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>
<form name="addform" method="post" action="lcdpass.asp?action=edit" onSubmit="return checkdata()">
<%set rs1=server.createobject("ADODB.Recordset")
sql1="select * from dlxf_yp where dlxf_id="&session("id")
rs1.open sql1,conn,1,1%>
<input name="password" type="hidden" value="<%=rs1("dlxf_pass")%>">
<%rs1.close
set rs1=nothing%>
  <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>
</table>
<!--======-->
	</td>
  </tr>
</table>
<!--####################################-->
	</td>
  </tr>
<tr><td height=25></td></tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<!--====== bottom ========-->
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" background="img/bottom_bg.gif">
<tr><td height=2 bgcolor=#6C94D1></td></tr>
  <tr>
    <td align="center" height=80><%=citybottom%></td>
  </tr>
</table>
</body>
</html>