⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jg_regself_uppwdself.asp

📁 这个系统是企业管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="jm5.asp" -->

<!--#include file="admin_qx.asp" -->
<%
 requestid=session("jg_reg_id")

if trim(session("jg_reg_id"))="" then
response.Write "<script language=javascript>{window.alert('抱歉,您没有登录或登录超时,请重新登录!');window.open('index.asp','_parent'); }</script>"
response.End
end if
%>
<!--#include file="conn_db123.asp" -->
<%

sql="select id,login123,pwd123,xingming from mainjg  where  id="&requestid&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,2
%>
<%
isupdate=trim(request("isupdate"))

oldpwd=trim(request("oldpwd"))
newpwd=trim(request("newpwd"))
newpwd2=trim(request("newpwd2"))

if isupdate="1"then

if oldpwd="" then 
response.Write "<script language=javascript>{window.alert('报错:在修改新密码前必须输入原密码!');window.history.go(-1);}</script>"
response.End
end if

if newpwd="" then 
response.Write "<script language=javascript>{window.alert('报错:必须输入新原密码!');window.history.go(-1);}</script>"
response.End
end if

 if newpwd<>"" or newpwd2<>"" then 
    if newpwd<>newpwd2  then 
			     response.Write "<script language=javascript>{window.alert('报错:您两次输入的新密码不一致!');window.history.go(-1);}</script>"
				 response.End
				 end if
	if newpwd=newpwd2  then
	
	if len(newpwd)<6 or len(newpwd)>30 then
response.Write "<script language=JavaScript>{window.alert('报错:您的密码长度不够,至少要输入五位,最长不超过30位!');window.history.go(-1);}</script>"
response.End()
   end if
				 
if oldpwd="" then 
response.Write "<script language=javascript>{window.alert('报错:在修改新密码前必须输入原密码!');window.history.go(-1);}</script>"
response.End
else     
   if MD5(oldpwd)<>rs("pwd123") then 
	 response.Write "<script language=javascript>{window.alert('报错:您输入的原密码错误,要修改密码必须核实原密码!');window.history.go(-1);}</script>"
	 response.End
end if
end if
end if
end if'-------
if oldpwd<>"" and newpwd<>"" and newpwd2<>"" then
if newpwd=newpwd2 then
if MD5(oldpwd)=rs("pwd123") then
rs("pwd123")=MD5(newpwd)
end if
end if
end if

rs.update
response.Write "<script language=JavaScript>{window.alert('恭喜您,密码修改成功!下次登录时请用新密码!');window.history.go(-1);}</script>"
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="Images/Style.css" rel="stylesheet" type="text/css">
<title>修改密码</title>
<style type="text/css">
<!--
.STYLE5 {color: #000000}
.STYLE15 {font-size: 14; color: #FF0000; }
.STYLE7 {font-size: 12px; color: #0000FF; }
.STYLE4 {font-size: 12px; color: #FF0000; }
.style1 {color: #0000FF}
body {
	SCROLLBAR-FACE-COLOR: #c6ebde;
	SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
	SCROLLBAR-SHADOW-COLOR: #39867b;
	SCROLLBAR-3DLIGHT-COLOR: #39867b;
	SCROLLBAR-ARROW-COLOR: #330000;
	SCROLLBAR-TRACK-COLOR: #e2f3f1;
	SCROLLBAR-DARKSHADOW-COLOR: #ffffff;
	background-image: url(../images/bg/6/11.gif);
}
body,td,th {
	font-size: 13px;
}
.STYLE3 {color: #FFFFFF}
-->
</style>
</head>

<body>
<p align="center"><a href="javascript:window.history.go(-1)" class="STYLE15">返回上一页</a></p>
<form action="?" method="post" name="form1" target="_self" id="form1">
  <table width="83%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
    <tr>
      <td height="31" colspan="2" bgcolor="#6699CC"><div align="center"><span class="STYLE4 STYLE3">【修改密码】</span></div></td>
    </tr>
    <tr>
      <td width="28%" align="right" bgcolor="#F2F7FD"><span class="STYLE7">用户名:</span></td>
      <td width="72%" bgcolor="#F2F7FD"><label><%=rs("login123")%></label></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F2F7FD" class="STYLE7">姓名:</td>
      <td bgcolor="#F2F7FD"><%=rs("xingming")%></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F2F7FD"><span class="STYLE15">原密码:</span></td>
      <td bgcolor="#F2F7FD"><input name="oldpwd" type="password" id="oldpwd">
        <span class="STYLE7">在修改密码前必须输入原密码</span></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F2F7FD"><span class="STYLE15">新密码:</span></td>
      <td bgcolor="#F2F7FD"><input name="newpwd" type="password" id="newpwd">
        <span class="STYLE7">新密码可以是字母、数字和符号的组合</span></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F2F7FD"><span class="STYLE15">再次输入新密码:</span></td>
      <td bgcolor="#F2F7FD"><input name="newpwd2" type="password" id="newpwd2">
        <span class="STYLE7">新密码确认</span></td>
    </tr>
    <tr>
      <td bgcolor="#F2F7FD">&nbsp;</td>
      <td bgcolor="#F2F7FD">&nbsp;</td>
    </tr>
  </table>
  <p align="center"> 
    <input type="submit" name="Submit" value="密码执行修改"style="width:100;background-color: #FFCC66; color: #000000; border: 1 solid #00CC00">
    <input name="isupdate" type="hidden" id="isupdate" value="1">
    <br>
  </p>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -