📄 admin_teacher_pwd_modi02.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'=========================================================
' 学校机房作业管理系统 V 1.0 [创建于200812122100]
' 授权发布网站:清远ABC-http://www.qyabc.com/
' 客服QQ:418322257 E-Mail:qystu@163.com
' 注意:如想得到关于本程序免费的技术支持,
' 必须承诺使用一周后,用平邮回寄“相关文件”文件夹中的“学校机房作业管理系统调查反馈表”表格。
' 作者博客:http://www.qyabc.com/u/qin/Default.aspx
'=========================================================
%>
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/config.asp" -->
<!--#include file="Connections/master.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="6,7"
MM_authFailedURL="login.asp?error=3"
MM_grantAccess=false
If session("QYABC_userid") <> "" Then
If (false 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
%>
<%
dim check_user__MMColParam,pakong111,dbpakong111
pakong111="111"
check_user__MMColParam=Request.QueryString("userid")
rndstr = MyRandc(2) '两位随机字母
dbpakong111 = rndstr & md5(rndstr & pakong111)
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_master_STRING
Command1.CommandText = "update userinfo set Paskk = '"& dbpakong111 &"' where userid=" + Replace(check_user__MMColParam, "'", "''") + ""
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
function MyRandc(n)'生成随机字符,n为字符的个数
thechr = ""
for i=1 to n
Randomize timer
zNum = cint(25*Rnd)
if zNum mod 2 = 0 then
zNum = zNum + 97
else
zNum = zNum + 65
end if
thechr = thechr & chr(zNum)
next
MyRandc = thechr
end function
%>
<%'记录操作行为!开始
Dim userinfo__MMColParam
userinfo__MMColParam = "1"
If (Request.QueryString("userid") <> "") Then
userinfo__MMColParam = Request.QueryString("userid")
End If
%>
<%
Dim userinfo
Dim userinfo_numRows
Set userinfo = Server.CreateObject("ADODB.Recordset")
userinfo.ActiveConnection = MM_master_STRING
userinfo.Source = "SELECT studentnum, studentname, MasterClass FROM userinfo WHERE userid = " + Replace(userinfo__MMColParam, "'", "''") + ""
userinfo.CursorType = 0
userinfo.CursorLocation = 2
userinfo.LockType = 1
userinfo.Open()
userinfo_numRows = 0
%>
<%
dim asanhandle_content,asanteachername,asanteachernum,asanhappen_ip
asanhandle_content="把编号为"+(userinfo.Fields.Item("studentnum").Value)+"在"+(userinfo.Fields.Item("MasterClass").Value)+"的"+(userinfo.Fields.Item("studentname").Value)+"密码设置为“111”!"
asanteachername=session("QYABC_username")
asanteachernum=session("QYABC_userid")
asanhappen_ip=Request.ServerVariables("Remote_Addr")
%>
<%
set hanellog = Server.CreateObject("ADODB.Command")
hanellog.ActiveConnection = MM_master_STRING
hanellog.CommandText = "INSERT INTO doitlog (handle_content, teachername, userid, happen_ip) VALUES ('"&asanhandle_content&"','"&asanteachername&"','"&asanteachernum&"','"&asanhappen_ip&"' ) "
hanellog.CommandType = 1
hanellog.CommandTimeout = 0
hanellog.Prepared = true
hanellog.Execute()
%>
<%
userinfo.Close()
Set userinfo = Nothing
'记录操作行为!结束%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>已将该生密码修改为“111”-<%=WebName%></title>
<link rel="SHORTCUT ICON" href="favicon.ico"/>
<link href="<%= SysCss %>" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE2 {font-size: 100%}
-->
</style>
<meta http-equiv="refresh" content="3;URL=admin_teacher_list.asp">
<body>
<br>
<br>
<br>
<br>
<br>
<p align="center" class="STYLE2">已将该生密码修改为“111” </p>
<!--#include file="inc/bot.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -