4. Forum management
This is the core of our forum, but there is nothing special about it. There are still old things: Form processing, database query, and organic combination of them with ASP. After entering the document review mode (as mentioned above), the most important thing is to verify the moderator's identity. Next let's take a look at the moderator login page:
<%
Boardid = request ("boardid ")
(Note: The boardid is transmitted by the connection that enters this page, and is the ID of the panel to be processed. It can be used to know that the board is being processed .)
Set conn = erver. CreateObject ("ADODB. Connection ")
Conn. Open "driver = {Microsoft AccessDriver (*. mdb)}; dbq =" & Server. MapPath ("bbssystem. mdb ")
Set cmd = Server. CreateObject ("ADODB. Command ")
Set cmd. ActiveConnection = conn
Cmd. CommandText = "board master password query"
ReDim param (0)
Param (0) = CLng (boardid) // Note: CLng cannot be ignored.
Set rs = cmd. Execute (, param)
Boardmanager = rs ("Board owner ")
Set cmd = nothing
%>
<Html>
<Head>
<Title> Untitled Document </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = GB2312">
</Head>
<Body bgcolor = "# FFFFFF">
<P> This location can be accessed only when the board owner <% = boardmanager %> </p>
<P> enter the authentication password and open Cookies in the browser to maintain authentication. </P>
<Form method = "post" action = "managerloginrest. asp">
<Input type = "password" name = "password">
<Input type = "hidden" name = "boardid" value = <% = boardid %>
<Input type = "submit" name = "Submit" value = "OK">
</Form>
Note: This page is only used for login. After obtaining the password entered by bamboo, it cannot be verified. Instead, it puts the verification work on the next page. In fact, password input and verification can be completed on a page, but the structure of the program code is a little troublesome.
</Body>
</Html>
<%
Set rs = nothing
Conn. close
Set conn = nothing
%>
Now you have obtained the moderator ID and the entered password. The following is the verification work managerloginrest. asp. It accepts the content of the form in the above file and performs related processing:
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.