!!!Source!!!
<!-- METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
<!--#include file=config.asp -->
<!--#include file=inc_top.asp -->
<%
if Request.Form("submit").Count > 0 or Len(Request.QueryString("forgot")) > 0 then
dim rec, sSQL, con
set con = Server.CreateObject("ADODB.Connection")
con.Open ConnString
set rec = Server.CreateObject("ADODB.Recordset")
if Request.Form("submit").Count > 0 then
sSQL = "SELECT * FROM [STP_USERST_TABLE] WHERE [UN_EMAIL]='" & Trim(Replace(Request.Form("email"), "'", "''")) &_
"' AND [UN_PASSWORD]='" & Trim(Replace(Request.Form("password"), "'", "''")) & "'"
else
sSQL = "SELECT * FROM [STP_USERST_TABLE] WHERE [UN_EMAIL]='" & Trim(Replace(Request.QueryString("forgot"), "'", "''")) & "'"
end if
sSQL = BuildUsersTQuery(sSQL)
rec.Open sSQL, con, adOpenForwardOnly, adLockReadOnly
if not rec.EOF then
if Request.Form("submit").Count > 0 then
Session(USER_LEVEL) = rec(U_LEVEL)
Session(USER_NAME) = rec(U_NAME)
sSQL = "UPDATE [STP_USERST_TABLE] SET [UN_LAST_VISIT]=Now() WHERE [UN_USER_ID]=" & rec(USER_ID)
sSQL = BuildUsersTQuery(sSQL)
con.Execute sSQL, adExecuteNoRecords
Response.Write "<SCRIPT language=Javascript>window.location.replace('" & ForumFile & "');</SCRIPT>"
else
dim oMail
set oMail = new MailClient
oMail.Recipient = Request.QueryString("forgot")
oMail.Subject = "Your password"
oMail.HTMLBody = "Your password for " & ForumName & " is: " & rec(U_PASSWORD)
oMail.Send
set oMail = nothing
Response.Write "<P align=center>Your password has been sent to your e-mail</P>"
end if
else
%>
<DIV class=Error>
Username and/or password is invalid. If you forgot your password, click <A HREF="<%=Request.ServerVariables("SCRIPT_NAME")%>?forgot=<%=Server.URLEncode(Request.Form("email"))%>">here</A>
and it will be sent to you by e-mail, otherwise use your Back button to try again
</DIV>
<%
end if
rec.Close
con.Close
set rec = nothing
set con = nothing
else
%>
<P align=center>
In case you forgot your password, just type in your e-mail and it will be sent to you
</P>
<%if Request.QueryString("error").Count > 0 then%>
<P align=center>
You came here because of one or more of reasons listed below:
<UL>
<LI>You are not logged in and this forum doesn't allow anonymous posts
<LI>The topic or forum you tried to post in is closed
<LI>The forum you are trying to view is restricted
</LI></UL>
</P>
<%end if%>
<FORM action="<%=LoginFile%>" method=POST id=form1 name=form1>
<TABLE ALIGN=center CELLSPACING=1 CELLPADDING=1>
<TR>
<TD bgcolor="<%=HeadCellColor%>"><FONT color="<%=HeadFontColor%>"><B>E-mail</B></FONT></TD>
<TD bgcolor="<%=HeadCellColor%>"><INPUT type="text" name=email></TD>
</TR>
<TR>
<TD bgcolor="<%=HeadCellColor%>"><FONT color="<%=HeadFontColor%>"><B>Password</B></FONT></TD>
<TD bgcolor="<%=HeadCellColor%>"><INPUT type="password" name=password></TD>
</TR>
</TABLE>
<TABLE align=center>
<TR><TD align=center><INPUT type="submit" value="Login" name=submit class=button></TD></TR>
</TABLE>
</FORM>
<%end if%>
<P align=center><A href="<%=ForumFile%>">Back to forums</A></P>
<!--#include file=inc_bottom.asp-->