📄 logon.asp
字号:
<%
Response.CacheControl = "no-cache"
%>
<!--#include file="passinc.asp" -->
<%
pw = trim(request("pwhidden"))
dim errstr
if pw <> "" and Request.ServerVariables("REQUEST_METHOD") = "POST" then
pw = strDecode(pw, trim(request("picnum")))
if Session("wem") <> Application("em_TestAccounts") then
Set em = Application("em")
em.ChangeUserPassWord Session("wem"), pw
set em = nothing
if trim(request("forget")) <> "1" then
Response.Redirect "ok.asp?" & getGRSN()
else
Response.Redirect "ok.asp?gourl=welcome.asp&" & getGRSN()
end if
else
if trim(request("forget")) <> "1" then
Response.Redirect "err.asp?errstr=" & server.htmlencode("Password modification is not allowed for test accounts") & "&" & getGRSN()
else
Response.Redirect "err.asp?gourl=welcome.asp&errstr=" & server.htmlencode("Password modification is not allowed for test accounts") & "&" & getGRSN()
end if
end if
end if
%>
<html>
<head>
<title>Corp.Email</title>
<LINK href="images\hwem.css" rel=stylesheet>
</head>
<SCRIPT LANGUAGE=javascript>
<!--
function checkpw(){
if (pw1.value != "" && pw2.value != "")
{
if (pw1.value != pw2.value)
alert("Your new password entries did not match.");
else
{
form1.pwhidden.value = encode(pw1.value, parseInt(form1.picnum.value));
form1.submit();
}
}
}
function encode(datastr, bassnum) {
var tempstr;
var tchar;
var newdata = "";
for (var i = 0; i < datastr.length; i++)
{
tchar = 65535 + bassnum - datastr.charCodeAt(i);
tchar = tchar.toString();
while(tchar.length < 5)
{
tchar = "0" + tchar;
}
newdata = newdata + tchar;
}
return newdata;
}
//-->
</script>
<body>
<br>
<br>
<div align="center">
<form name="form1" method="post" action="logon.asp">
<input type="hidden" name="forget" value="<%=trim(request("forget")) %>">
<input type="hidden" name="pwhidden">
<input type="hidden" name="picnum" value="<%=createRnd() %>">
</form>
<table width="80%" border="0" align="center" cellspacing="0" bgcolor="#EFF7FF" style='border-top:1px #8CA5B5 solid;'>
<tr bgcolor="#dbeaf5">
<td colspan="2" height="30" nowrap style="border-left:1px #8CA5B5 solid; border-right:1px #8CA5B5 solid; border-bottom:1px #8CA5B5 solid;">
<div align="center"><font class="s" color="#104A7B"><b>Password Modification</b></font></div>
</td>
</tr>
<tr>
<td width="35%" height="26" style="border-bottom:1px #8CA5B5 solid;">
<div align="right">New Password : </div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<input type="password" name="pw1" maxlength="32" size="40" class="textbox">
</td>
</tr>
<tr>
<td width="20%" height="26" style="border-bottom:1px #8CA5B5 solid;">
<div align="right">Re-enter New Password : </div>
</td>
<td style="border-bottom:1px #8CA5B5 solid;">
<input type="password" name="pw2" maxlength="32" size="40" class="textbox">
</td>
</tr>
<tr>
<td colspan="2" align="right" bgcolor="#ffffff"> <br>
<input type="button" value="Submit" onclick="checkpw()" class="Bsbttn">
<input type="button" value="Cancel" onclick="javascript:location.href='viewmailbox.asp?<%=getGRSN() %>';" class="Bsbttn">
</td>
</tr>
</table>
</div>
</body>
</html>
<%
function createRnd()
dim retval
retval = getGRSN()
if Len(retval) > 4 then
retval = Right(retval, 4)
end if
if Left(retval, 1) = "0" then
retval = "5" & Right(retval, 3)
end if
createRnd = retval
end function
function strDecode(sd_Data, sd_bassnum)
dim sd_vChar
dim sd_NewData
dim sd_TempChar
sd_vChar = 1
do
if sd_vChar > Len(sd_Data) then
exit do
end if
sd_TempChar = CLng(Mid(sd_Data, sd_vChar, 5))
sd_TempChar = ChrW(65535 + sd_bassnum - sd_TempChar)
sd_NewData = sd_NewData & sd_TempChar
sd_vChar = sd_vChar + 5
loop
strDecode = sd_NewData
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -