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

📄 update_company_pw_sav.asp

📁 oracle9i程序事例集
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<html>
<head>
<%
  dim conn
  dim connstr
  Set conn=Server.CreateObject("ADODB.Recordset")
  connstr="Driver={Microsoft ODBC for Oracle};server=mylink;uid=system;pwd=system;"
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<%    dim rs,sql,oldpw,newpw,newpw1,newpw2
    oldpw=lcase(trim(request("oldpw")))
	set rs=server.createobject("adodb.recordset")
    sql="select company_password from GSCOTT.company_info_table where company_name='"&request.querystring("companyname")&"'"
    rs.open sql,connstr,3,3
	
	if md5(oldpw) <> rs("company_password") then
	   errmsg=errmsg+"<br>"+"<li>原密码输入不正确"
       founderr=true
    else if trim(request("newpw1"))="" or trim(request("newpw2"))="" then
            errmsg=errmsg+"<br>"+"<li>输入密码或确认密码不能为空"
            founderr=true
         else
            pw=md5(lcase(trim(request("newpw1"))))
            pw2=md5(lcase(trim(request("newpw2"))))

            if pw <> pw2 then
              errmsg=errmsg+"<br>"+"<li>输入密码与确认密码不同"
              founderr=true
            else if len(trim(request("newpw1")))<6 then
                   errmsg=errmsg+"<br>"+"<li>您输入的密码少于6位"
                   founderr=true
                 end if
            end if
          end if
	end if
%>
<body>
<div align="left">
  <!-- #include file="pagetop.asp" -->
</div>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<%
	if founderr=false then
	rs("company_password")=pw
	rs.update
%>  
  <tr>
    <td height="70"></td>
  </tr>
  <tr><td align="center"><font color="#0000FF" size="-1">公司密码修改成功,请您牢记您的密码</font></td></tr>
  <tr><td height="20" bgcolor="#FFFFFF"></td></tr>
  <tr><meta http-equiv="refresh" content="3;url=index.asp">
      <td height="20" colspan="2" align="center"><font size="-1">三秒钟后自动返回,如果您的浏览器没有返回,请<a href="index.asp" target="_self">单击此处</a>返回首页</font></td>
  </tr>
  <tr>
    <td height="70"></td>
  </tr>
<% else %>
  <tr>
    <td height="70"></td>
  </tr>
  <tr><td align="center"><font color="#0000FF" size="-1">	<%=errmsg%> </font></td></tr>
  <tr><td height="20" bgcolor="#FFFFFF"></td></tr>
  <tr><meta http-equiv="refresh" content="3;url=javascript:history.go(-1)">
      <td height="20" colspan="2" align="center"><font size="-1">三秒钟后自动返回,如果您的浏览器没有返回,请<a href="javascript:history.go(-1)" target="_self">单击此处</a>返回首页</font></td>
  </tr>
  <tr>
    <td height="70"></td>
  </tr>
	<%
	rs.close
	set rs=nothing	 
    end if	
    %>
</table>
<!-- #include file="pagefooter.html" -->
</body>
</html>

⌨️ 快捷键说明

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