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

📄 index.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<%option explicit%>
<!-- #include virtual="Templet/SessionExcept.asp" -->
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<!-- #include virtual="include/String.asp" -->
<!-- #include virtual="include/MD5.asp" -->
<%
Dim ObjDB,ObjRS,StrSQL,C,M
Dim IntAccountID
Dim StrAccountName,StrNowTime
Dim StrOldPassword,StrPassword

If Request.Form.Count > 0 Then
	IntAccountID   = Request.Form("AccountID") 
	StrAccountName = Request.Form("AccountName")
	StrOldPassword = Request.Form("OldPassword")
	StrPassword    = Request.Form("Password")

	Set ObjDB = Server.CreateObject("Adodb.Connection")
	OpenDB ObjDB
	Set C = Server.CreateObject("CMS2003.DBHandle")
	'Set M = Server.CreateObject("CMS2003.MD5")
	C.Init(ObjDB)
	StrSQL = "Select ID,Password From t_OA_SYS_Account Where ID ='" & Session("AccountID") & "'"
	Set ObjRS = C.View(StrSQL)

	'Response.Write StrOldPassword
	'Response.Write "<BR>"
	'Response.Write ObjRS("Password")
	'Response.Write "<BR>"
	'Response.Write M.MD5(ObjRS("ID")&StrOldPassword)
  'Response.End		
	'密码错误
	If Not(ObjRS("Password") = md5(StrOldPassword)) Then
		Response.Redirect "/Error.asp?Err=原密码错误"
	End If
	
	StrSQL = "Update t_OA_SYS_Account set Password='" & md5(StrPassword) & "' ,UpdateTime=getdate(),Is1=0 Where ID='" & Session("AccountID") & "'"			
	ObjDB.Execute StrSQL
	ObjDB.Close
	Set ObjDB = Nothing
%>
<script language=javascript>
	window.location = "http://192.168.42.2:8009/logon.asp?pass=<%=StrPassword%>&name=<%=StrAccountName%>"
	parent.doAlert(1,"修改密码成功")
	//window.location = "http://192.168.42.120:8001/Templet/UI/Desk.asp"
</script>
<%
	Response.End 
End If
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="<%=Application("ROOTPATH")%>Templet/main.css">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>系统登录</title>
<script language=javascript>
function doSubmit(thisForm)
{
	thisForm.SUBMIT.disabled=true
}
</script>
<script language=javascript src="<%=Application("ROOTPATH")%>Templet/JsMain.asp"></script>
</head>
<body background="../../../images/bg.gif" onload="document.forms[0].OldPassword.focus()" class="RightBackground">
  <table border=0 width="100%" height="80%">
  <tr><td>
<div align="center">
  <center>
  <table border="0" cellspacing="0" width="400" cellpadding="0" style="border-left: 2 outset #FFFFFF; border-right: 2 outset #808080; border-top: 2 outset #FFFFFF; border-bottom: 2 outset #808080">
    <tr>
            <td height="25" bgcolor="#4F92CA"> <font color="#FFFFFF"> 修改密码</font> 
            </td>
    </tr>
    <tr>
      <td class="bodymain">
        <div align="center">
                <table width="100%" height="80" border="0" cellspacing="1" bgcolor="BBE4FE">
                  <tr>
                    <td width="50"> 
                      <p align="center"><img border="0" src="../../../IMAGES/infoFlag.gif" width="36" height="34"></td>
                    <td> 
                      <p style="line-height: 150%"><font color="#000000">系统提醒,请定期更新您的密码。</font></p>
              </td>
            </tr>
          </table>
        </div>
      </td>
    </tr>
    <tr>
      <td bgcolor="#808080"></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF"></td>
    </tr>
    <tr>
      <td class="ChangePasswordDown" height="35">
        <div align="center">
                <table width="85%" border="0" cellpadding="5" cellspacing="5">
                  <form action="index.asp" method="post" onsubmit="return(CheckForm(this))" id=form1 name=form1>
<input type=hidden name=AccountID value="<%=IntAccountID%>">
            <tr>
              <td align="right">旧密码:</td>
              <td><input type="password" name="OldPassword" size="30"></td>
            </tr>
            <tr>
              <td align="right">新密码:</td>
              <td><input type="password" name="Password" Check=1 Show="新密码" size="30"></td>
            </tr>
            <tr>
              <td align="right">确认密码:</td>
              <td><input type="password" Check=3 To="Password" Show="两次输入的密码不一致" name="Password1" size="30"></td>
            </tr>
 
           <tr>
              <td align="right"></td>
            <td>
              <p align="right"><input class="button" type="submit" value="确  定" name="SUBMIT"> <input class="button" type="reset" value="取  消" name="B3" onclick="history.go(-1)"></td> 
          </tr>
          <tr>
            <td align="right"></td>
            <td height="5"></td>
          </tr>
</form>
        </table>
      </div>
    </td> 
    </tr>
  </table>
</div>
</td>
</table>
</body>
</html>

⌨️ 快捷键说明

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