📄 getuserpass.asp
字号:
<!--#include file=../INC/txlconst.asp-->
<!--#include file=../INC/txlfun.asp-->
<!--#include file=INC/mail_fun.asp-->
<!--
<pre>
┌─ 自由领域ASP+WAP同学录系统 ─────────────────┐
│ │
│ 感谢你使用 自由领域ASP+WAP同学录系统(测试版) │
│ 使用本免费源码您必须遵守以下规定 │
│ 不得公开发表代码 不得用做商业用途,不得向其他使用者收费。 │
│ │
│ 使用时,请保留此段信息,谢谢配合 │
│ │
│ 2004/12/19 │
│ │
└──────────────── http://99167.jahee.com ───┘
</per>
-->
<%
'on error resume next
dim const_txl_HomeUrl,errstr,i
dim emailstr
emailstr=""
emailstr=emailstr&"<style>"&vbcrlf
emailstr=emailstr&"td{font-size:9pt;line-height:120%;color:#353535} "&vbcrlf
emailstr=emailstr&"body{font-size:9pt;line-height:120%} "&vbcrlf
emailstr=emailstr&"a:link { color: #000000; text-decoration: none }"&vbcrlf
emailstr=emailstr&"a:visited { color: #000000; text-decoration: none }"&vbcrlf
emailstr=emailstr&"a:active { color: #000000; text-decoration: none }"&vbcrlf
emailstr=emailstr&"a:hover { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }"&vbcrlf
emailstr=emailstr&"</style>"&vbcrlf
errstr=""
const_txl_HomeUrl="../"
OpenDatabase
txl_SiteHead const_txlname&"- 取回密码"
call online
call main
CloseDatabase
SiteBottom
sub main
%>
<table width="779" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="178" align="center" valign="top" bgcolor="#E0EAF8"><br>
<script language="JavaScript">
today=new Date();
function initarray(){
this.length=initarray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initarray.arguments[i] }
var d=new initarray(
" 星期日 ",
" 星期一 ",
" 星期二 ",
" 星期三 ",
" 星期四 ",
" 星期五 ",
" 星期六 ");
document.write(
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日",
d[today.getDay()+1]);
</script> </td>
<td valign="top" bgcolor="#F0F1F5"><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%"> </td>
<td width="90%"><br>
<a href="<%=const_homepageurl%>">首页</a> >> <a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a>
>> 取回密码</td>
</tr>
</table>
<%
if Request.QueryString("action")="getpass" then
Call getpass
else
call showform
end if
%>
<br> </td>
</tr>
</table>
<%
end sub
%>
<%sub showform
%>
<form name="txlfrm" method="post" action="?action=getpass" onsubmit="javascript:if(this.username.value==''){alert('请输入用户名!');this.username.focus();return false;}">
<TABLE border=0 class=font width="100%" cellpadding="0" cellspacing="0">
<TR>
<TD height=2 bgcolor="#ececff"></TD>
<TD height=2 bgcolor="#ececff"></TD>
</TR>
<TR>
<TD height="25" align=center> </TD>
<TD height="25"><B>取回密码</B></TD>
</TR>
<TR>
<TD height="25" align=center> </TD>
<TD height="25"><font color="#FF0000">请输入您的用户名,点"取回密码"按钮,密码将自动发送到您注册时的邮箱。
</font></TD>
</TR>
<TR>
<TD height="25" align=center> <p>用户名:</TD>
<TD height="25"> <input name="username" class=fminpt id="username" size=20 maxLength=20>
</TD>
</TR>
<TR>
<TD height="25" align=center> </TD>
<TD height="25"><input name="send" type="submit" id="send" style="border:1px solid #666666;height:20px;" onFocus="this.blur()" value="取回密码">
<input type="button" name="Submit32" value="取消-回首页" style="border:1px solid #666666;height:20px;" onFocus="this.blur()" onclick="javascript:window.location.href='../index.asp'"></TD>
</TR>
</TABLE>
</form>
<%end sub%>
<%
Sub getpass
dim rs,username,password,temp,temp2,subject,mailsendfalg,shoujianren
username=Trim(Request.Form("username"))
username=Replace(username,"'","''")
If username="" then
Call printerror("取回密码操作出错!","<li>请输入您的用户名!</li>","97%")
Exit Sub
End if
Set rs=conn.execute ("select password,email from ec where studentid='"&username&"'")
If rs.eof Then
Call printerror("取回密码操作出错!","<li>不存在这样的用户!</li>","97%")
Exit Sub
Else
password=rs("password")
shoujianren=rs("email")
End If
rs.close
set rs=nothing
temp="亲爱的同学,您好!<br>"&Vbcrlf
temp=temp&" 请注意查收在同学录("&const_txlname&")的登录密码:<br>"
temp=temp&" <font color=red>"&password&"</font><br>"
temp=temp&" 点击这里登录<a href='"&const_homepageurl&"' target='_blank'>"&const_txlname&"</a>!<br>"
temp=temp&"<div align='right'>"&const_adminname&"<br>"&now()&"</div><br>"
temp=temp& "<table width='500' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#ffffff'>"&vbcrlf
temp=temp& " <tr>"&vbcrlf
temp=temp& " <td height=8></td>"&vbcrlf
temp=temp& " </tr>"&vbcrlf
temp=temp& " <tr>"&vbcrlf
temp=temp& " <td style='border:#e6e6e6 1px solid;font-size:12px;text-align:center;line-height:1.8;'>"&vbcrlf
temp=temp& const_copyright&vbcrlf
temp=temp& "<br>"&vbcrlf
temp=temp& " Copyright ©2003 <a href='http://99167.jahee.com/class2' target='_blank'><font face=Verdana, Arial, Helvetica, sans-serif style=font-size:10px><b>WinSteps<font color=#CC0000>.Net</font></b></font></a> Powered by :<a href=http://ec5460.winsteps.net target='_blank' title='2003届2班同学录'><font color=gray style='text-DECORATION: none'>Ec5460 V2.0</font></a>"&vbcrlf
temp=temp& " </td>"&vbcrlf
temp=temp& " </tr>"&vbcrlf
temp=temp& "</table>"&vbcrlf
temp2="<html>"&vbcrlf
temp2=temp2&"<body>"&vbcrlf
temp2=temp2&emailstr&vbcrlf
temp2=temp2&temp&vbcrlf
temp2=temp2&"</html>"&vbcrlf
subject="请查收在"&const_txlname&"的密码!"
select case const_emailmode
case 0:
case 1:
mailsendfalg=SendJmail(shoujianren,subject,temp2,const_adminemail)
case 2
mailsendfalg=SendCDOMail(shoujianren,subject,temp2,const_adminemail)
case 3:
mailsendfalg=SendEasyMail(shoujianren,subject,temp2,const_adminemail)
end select
'1成功,2失败,0不支持
If mailsendfalg=0 Then
Call printerror("取回密码操作出错!","<li>当前服务器不支持该邮件组件!</li>","97%")
ElseIF mailsendfalg=1 Then
Call printsuc("取回密码操作成功!","<li>恭喜您,你的登录密码已经发送到了您的注册邮箱,请注意查收!</li>","97%")
ElseIF mailsendfalg=2 Then
Call printerror("取回密码操作出错!","<li>服务器发邮件失败!</li>","97%")
End If
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -