Source code ' ==================================================================================================
Case "Modify"
'==================================================================================================
' Modify the article
Which = Request ("Which")
Whichid = GetID (Which)
If Left (Which, 1) = "E" Then table = "BBS" Else table = "Bbsreply"
Wrongmsg = ""
If Request ("Modify") = "Yes" Then
Userid = Request ("Userid")
Password = Request ("Password")
title = Trim (Request ("Title"))
Content = RTrim (Request ("Content"))
If title = "" Then wrongmsg = wrongmsg + "<DD><LI> title cannot be empty. </LI> "
If content = "Then wrongmsg = wrongmsg +" <DD><LI> contents cannot be empty. </LI> "
If wrongmsg = "" Then
Recbbs.open "SELECT [author] from" & Table & "WHERE [serial number]=" & Whichid, Con, 1
If Recbbs.fields ("author") = Userid Then
SQL = "Select COUNT (*) from Bbsmember WHERE [Account]= '" & Sqlstr (Userid) & "' and [Password]= '" & Sqlstr (Password) & "'"
Recmember.open SQL, Con, 1
If recmember.fields (0) > 0 Then
SQL = "UPDATE" & Table & "SET [topic]= '" & Sqlstr (title) & "', [Content]= '" & Sqlstr (contents) & "' WHERE [Serial number]= ' & Whichid
Con.execute (SQL)
Else
wrongmsg = "<DD><LI> password is incorrect. </LI> "
End If
Recmember.close
Else
wrongmsg = "<DD><LI> username is incorrect. </LI> "
End If
Recbbs.close
End If
End If
Title = ""
Content = ""
SQL = "SELECT [topic],[content] from" & Table & "WHERE [Ordinal]=" & Whichid
Recbbs.open SQL, Con, 1
If not recbbs.eof Then
title = Recbbs.fields ("topic")
Content = Recbbs.fields ("content")
End If
Recbbs.close
%>
<table align=center border=0 cellpadding=1 cellspacing=0 width=650>
<TR>
<TD class= "Menu" >
<a href= "/" > Fly Linzhuang </a>-><a href= "<%= asp_file_name%>" > Experience Exchange </a>-><a href= "<% = Asp_file_name%>? job=content&which=<%= session ("Bbs_which")%> "><%= session (" Bbs_whichtitle ")%></a>
<% If wrongmsg <> "" Then%>
<BR><BR> modification failed! <BR><BR>
<%= wrongmsg%><br>
<% Else%>
<BR><BR> Modification Success! <BR><BR>
<% End If%>
<form action= "<%= asp_file_name%>" method=post>
<input Type=hidden name=job value=modify>
<input Type=hidden name=modify value=yes>
<input type=hidden Name=which value= "<%= Which%>" >
Account: <input type=text id=userid name=userid size=30 maxlength=80><br>
Password: <input type=password id=password name=password size=30 maxlength=80><br><br>
Title: <input type=text id=title name=title value= "<%= Title%>" >
<textarea id=content name=content cols=80 rows=16><%= Content%></textarea><br>
<input type=submit value= "Confirm modification" >
</FORM>
</TD>
</TR>
</TABLE>
<%
'==================================================================================================
Case "Apply"
'==================================================================================================
' Application account
%>
<table align=center border=0 cellpadding=7 cellspacing=0 width=650>
<TR>
<TD class=menu>
<form action= "<%= asp_file_name%>" method=post>
<input Type=hidden name=job value=adduser>
<P> Fly Linzhuang-> Experience Exchange-> registered account </P>
<P>
The necessary information:<br>
<font color= #ff0000 > account </font>:
<input Id=userid Name=userid size=40 maxlength=80><br>
This is your personal identification, you can use Chinese or English. <BR>
<font color= #ff0000 > Password </font>:
<input id=password Name=password Type=password maxlength=80 size=25><br>
To protect the legitimate rights and interests of your account, please choose your password carefully! <BR>
<font color= #ff0000 > Repeat password </font>:
<input id=confirm name=confirm Type=password maxlength=80 size=25><br>
Confirm your password. <BR>
<font color= #ff0000 > E-mail </font>:
<input Id=em