The code for logging on to login. asp of dvbbs is as follows:

Source: Internet
Author: User
Tags servervariables

BBS login Login. aspCodeAs follows:

<! -- # Include file = "conn. asp" -->
<! -- # Include file = "INC/Const. asp" -->
<! -- # Include file = "INC/char_login.asp" -->
<! -- # Include file = "md5.asp" -->
<%
'================================================ ============================
'File: Login. asp
'Version: 5.0
'Date: 2002-9-10
'Script written by Satan
'================================================ ============================
'Copyright (c) 2001,2002 aspsky. net. All rights reserved.
'Web: http://www.aspsky.net, http://www.dvbbs.net
'Email: info@aspsky.net, eway@aspsky.net
'================================================ ============================

Stats = "fill in login information"
Dim URL, comeurl

Call NAV ()
Call head_var (2, 0 ,"","")
If request ("action") = "Chk" then
Call chklogin ()
If founderr then call dvbbs_error ()
Else
Url = request. servervariables ("http_referer ")
%>
<Form action = "login. asp? Action = chk "method = post>
<Table cellpadding = 3 cellspacing = 1 align = center class = tableborder1>
<Tr>
<TH valign = middle colspan = 2 align = Center Height = 25> enter your username and password to log on </TD> </tr>
<Tr>
<TD valign = middle class = tablebody1> enter your user name </TD>
<TD valign = middle class = tablebody1> <input name = username type = text> <a href =.../Reg. asp> not registered? </A> </TD> </tr>
<Tr>
<TD valign = middle class = tablebody1> enter your password </font> </TD>
<TD valign = middle class = tablebody1> <input name = password type = PASSWORD> <a href = lostpass. asp> forgot password? </A> </TD> </tr>
<Tr>
<TD class = tablebody1 valign = top width = 30%> <B> cookie options </B> <br> select the cookie retention time. You can enter the time for the next visit. </TD>
<TD valign = middle class = tablebody1> <input type = radio name = cookiedate value = 0 checked> if it is not saved, the browser is disabled. <br>
<Input type = radio name = cookiedate value = 1> save for one day <br>
<Input type = radio name = cookiedate value = 2> Save January 1, January <br>
<Input type = radio name = cookiedate value = 3> save for one year <br> </TD> </tr>
<Tr>
<TD valign = top width = 30% class = tablebody1> <B> stealth login </B> <br> you can choose stealth login, forum members cannot see your information in the user list. </TD>
<TD valign = middle class = tablebody1> <input type = radio name = userhidden value = 2 checked> normal logon <br>
<Input type = radio name = userhidden value = 1> stealth login <br>
</TD> </tr>
<Input type = hidden name = comeurl value = <% = URL %>
<Tr>
<TD class = tablebody2 valign = middle colspan = 2 align = center> <input type = submit name = submit value = ""> </TD> </tr> </ table>
</Form>
<%
End if
Call footer ()

Sub chklogin ()
Dim userip
Dim Username
Dim userclass
Dim Password
Dim article
Dim cookies_path_s, cookies_path_d, cookies_path, usercookies
Userip = request. servervariables ("remote_addr ")
If request ("username") = "" then
Errmsg = errmsg + "<br>" + "<li> enter your user name. "
Founderr = true
Else
Username = trim (checkstr (Request ("username ")))
End if
If request ("password") = "" then
Errmsg = errmsg + "<br>" + "<li> enter your password. "
Founderr = true
Else
Password = MD5 (TRIM (checkstr (Request ("password "))))
End if
'Determine to update the cookies directory
Cookies_path_s = Split (request. servervariables ("path_info "),"/")
Cookies_path_d = ubound (cookies_path_s)
Cookies_path = "/"
For I = 1 to cookies_path_d-1
If not (cookies_path_s (I) = "Upload" or cookies_path_s (I) = "admin") Then cookies_path = cookies_path & cookies_path_s (I )&"/"
Next
If cookiepath <> cookies_path then
Cookiepath = cookies_path
Conn.exe cute ("Update config set cookiepath = '" & cookiepath &"'")
End if
If founderr then exit sub

Usercookies = request ("cookiedate ")
If chkuserlogin (username, password, usercookies, 1) = false then
Errmsg = errmsg + "<br>" + "<li> your user name does not exist, your password is incorrect, or your account has been locked by the Administrator. "
Founderr = true
Exit sub
End if
Dim comeurlname
If instr (lcase (Request ("comeurl"), "Reg. ASP ")> 0 or instr (lcase (Request (" comeurl ")," login. ASP ")> 0 or trim (Request (" comeurl ") =" "then
Comeurlname = ""
Comeurl = "index. asp"
Else
Comeurl = request ("comeurl ")
Comeurlname = "<li> <a href =" & request ("comeurl") & ">" & request ("comeurl") & "</a> </LI>"
End if
%>
<Meta HTTP-EQUIV = Refresh content = '2; url = <% = comeurl %> '>
<Table cellpadding = 3 cellspacing = 1 align = center class = tableborder1>
<Tr>
<TH Height = 25> login successful: <% = forum_info (0) %> welcome </Th>
</Tr>
<Tr> <TD class = tablebody1> <br>
<Ul> <% = comeurlname %> <li> <a href = index. asp> back to home </a> </LI> </ul>
</TD> </tr>
</Table>
<%
End sub
%>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.