Add: Beginner ASP Always for Response.Redirect This method is confused, repeatedly with uncomfortable, now I come to tell you some skills. Before you can use it, you must use the Response.buffer=true to make the ASP page work with buffers. At this point, before the ASP is interpreted as an HTML program code, it is placed in a buffer instead of being sent directly to the client browser. There is also a need to know that before using Response.Redirect, no actual HTML program code can be sent to the client browser, or there will be an error. Of course there are workarounds, if the HTML program code is explained before Response.Redirect, you can use the Response.Clear method to clear the buffer, and then you can use it to reset.
End If
%>
Note: The following is the target of the reset after the authentication is passed: boardmanager.asp. It will list all the articles that have not been processed.
%
Boardid=request ("Boardid")
If session ("Beenthere") >boardidthen Response.Redirect "Forums.asp"
%>
Note: This is the test moderator identity, because the previous cookie in the owner's browser has been marked, now we can through the seesion to identify the moderator. If the mark does not match, it will return to the first landing page via Response.Redirect. If the moderator browser's cookie is not open, then the value of Seesion ("Beenthere") will be empty, also cannot enter this page.
Set conn = Server.CreateObject ("ADODB. Connection ")
Conn. Open "Driver={microsoft accessdriver (*.mdb)};d bq=" & Server.MapPath ("Bbssystem.mdb")
Set cmd = Server.CreateObject ("Adodb.command")
Set cmd. ActiveConnection = conn
Sql= "SELECT name from Kanban list whereid=" & Boardid
Set Rs=conn.execute (SQL)
Boardname=rs ("name")
cmd.commandtext= "List of unpublished articles"
ReDim param (0)
Param (0) = CLng (Boardid)//NOTE: CLng can not be ignored
Set rs = cmd. Execute (, param)
Set cmd=nothing
%>
html>
head>
title> version of the/title>
"Meta http-equiv=" Content-type "content=" text/html; charset=gb2312 ">
/head>
Body bgcolor= "#FFFFFF"
H1 align= "Center" > <%=boardname%> edition Management/h1>
hr>
%
If rs.eof or Rs.bof then Response.Write "Response.End
%>
Note: If no new articles are posted by netizens, this gives the appropriate hints and ends the display of this page with Response.End.
Table width= "90%" border= "0" cellspacing= "0" cellpadding= "0" align= "center"
TR bgcolor= "#FFFFCC"
TD width= "40%" height= "20" > theme </td>
TD width= "40%" height= "20" > article title </td>
TD width= "8%" height= "20" > author </td>
TD width= "12%" height= "20" > date </td>
/tr>
%
Todo
Topicid=rs ("Subject ID")
Articleid=rs ("article ID")
Data=rs ("date")
DATASTR=CSTR (Year (data)) & "-" & CStr (month (data) & "-" & CStr (data)
Author=rs ("author")
Articlename=rs ("title")
Topicname=rs ("Subject")
Response.Write "tr>< td><a href=qtopic.asp?topicid=" & topicid& ">" & Topicname & "/a></td>"
Response.Write "td>< a href=managearticle.asp?articleid=" &articleid & "&boardid=" & Boardid & ">" & Amp;articlename & "/a></td>"
Response.Write "td>< a href=qauthor.asp?author=" &author & "> & author&" "/a></td>"
Response.Write "td>" &datastr & "/td></tr>"
Rs.movenext
Loop until rs.eof
%>
/table>
/html>
%
Set rs=nothing
Conn.close
Set conn=nothing
%>
/body>
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.