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

📄 admin_pwdmain3.asp

📁 asp+sql的教室申请系统,可以完成一个学期的教室分配情况
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="Admin_login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
  If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
    MM_grantAccess = true
  End If
End If
If Not MM_grantAccess Then
  MM_qsChar = "?"
  If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  MM_referrer = Request.ServerVariables("URL")
  if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="Connections/CSYD.asp" -->
<%
Dim rs__MMColParam
rs__MMColParam = "1"
If (Request.Form("username") <> "") Then 
  rs__MMColParam = Request.Form("username")
End If
%>
<%
Dim rs
Dim rs_numRows

Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_CSYD_STRING
rs.Source = "SELECT * FROM CS_login WHERE username = '" + Replace(rs__MMColParam, "'", "''") + "'"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 3
rs.Open()

rs_numRows = 0

if rs("passwd")=request.Form("oldpwd") then
rs("passwd")=request.Form("newpwd1")
msg="修改密码成功,以后请用新密码登陆!"
else
msg="旧密码不正确,请返回重试!"
end if
rs.update
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="770" height="168"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td background="images/003_02.gif"><div align="center"><%=msg%></div></td>
  </tr>
</table>
</body>
</html>
<%
rs.Close()
Set rs = Nothing
%>

⌨️ 快捷键说明

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