📄 web_school_editpass.asp
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="Web_Session.asp" -->
<!--#include file="../Include/Class_Pass.asp" -->
<%
Dim Action,Schid,PageNo
Dim TypeId,TypeName,News
'//检测是否跨站
Call Check_url()
'//检测管理员是否有权限操作该页面
If Instr(1,Session("Web_Power"),"130") <= 0 Then
Call CloseDB()
Response.write "对不起!您没有访问该页面的权限..."
Response.End()
End If
Action = Replace_text(request("action"))
Schid = Replace_text(request("Schid"))
PageNo = Replace_text(request("pageno"))
Select Case Action
Case "edit"
Call Edit_Submit() '//跳转到编辑函数
End Select
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻类别</title>
<link href="../CSS/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="25" bgcolor="fb7a03"> <font color="#FFFFFF">::<strong>修改密码</strong>[系统自动将修改后的密码发送到企业邮箱]</font></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td align="left"> <table width="50%" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="eff0eb">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<%
'查找会员的数据
Set Rs = Conn.Execute("Select Username,SchoolName,Email From [pH_School_Base] Where Schid='"&Schid&"'")
If Not Rs.Eof Then
Username = Rs(0)
SchoolName = Rs(1)
Email = Rs(2)
%>
<form action="?action=edit" method="post">
<tr bgcolor="eff0eb">
<td width="100" height="25" align="right" bgcolor="eff0eb">院校名称:</td>
<td bgcolor="eff0eb"><%= SchoolName %></td>
</tr>
<tr bgcolor="eff0eb">
<td width="100" height="25" align="right" bgcolor="eff0eb">院校帐号:</td>
<td bgcolor="eff0eb"><%= Username %></td>
</tr>
<tr bgcolor="eff0eb">
<td width="100" height="25" align="right" bgcolor="eff0eb">修改密码:</td>
<td bgcolor="eff0eb"><input name="password" type="text" id="password" size="16" maxlength="30">
<input name="Schid" type="hidden" id="Schid" value="<%= Schid %>">
<input name="pageno" type="hidden" id="pageno" value="<%= PageNo %>">
<input name="email" type="hidden" id="email" value="<%= Email %>">
<input name="Schoolname" type="hidden" id="Schoolname" value="<%= Schoolname %>">
</td>
</tr>
<tr bgcolor="eff0eb">
<td width="100" height="25" align="right" bgcolor="eff0eb">
</td>
<td bgcolor="eff0eb"><input type="submit" name="Submit" value="保存新密码"></td>
</tr>
</form>
<%
Else
%>
<tr bgcolor="eff0eb">
<td height="25" colspan="2" bgcolor="eff0eb">没有找到该院校!</td>
</tr>
<%
End if
Rs.Close
Set Rs = Nothing
%>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
Sub Edit_Submit() '修改密码
Schid = Replace_text(request("Schid"))
PageNo = Replace_text(request("PageNo"))
Password = Replace_text(request("Password"))
Email = Replace_text(request("Email"))
SchoolName = Replace_text(request("SchoolName"))
'加密
Pass = Md5(Password)
'修改密码
SQL = "UPdate [pH_School_Base] Set Password='"&Trim(Pass)&"' Where Schid='"&Trim(Schid)&"'"
Conn.Execute(SQL)
'发送邮件
HtmlStr = "您好,我们是"&Cls_WebName&",您在"&Cls_WebName&"的新密码是<u>"&Password&"</u>,请及时用新的密码登陆到网站并修改该密码!"
Call SendEmail(Email,HtmlStr,"您的密码修改成功")
Response.write "<script language=JavaScript>alert('密码修改成功!');location.href='"&PageNo&"';</script>"
End Sub
Call CloseDB()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -