程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> ASP編程 >> ASP技巧 >> 一個BBS的源代碼(三)

一個BBS的源代碼(三)

編輯:ASP技巧

'=============================
Case "Content"
'=============================
' 顯示內容

If Request("KeyWord") <> "" Then KeyWord = Request("Keyword") Else KeyWord = ""

%>

 

<TABLE align=center border=0 cellPadding=1 cellSpacing=0 width=650>
<TR>
<TD class="menu">
<A href="/">飛林莊</A>-&gt;<A href="<%= ASP_FILE_NAME %><% If KeyWord <> "" Then Response.Write "?Keyword=" & KeyWord %>">經驗交流</A>-&gt;怎樣輸出圖像</TD>
</TR>
</TABLE>
<TABLE align=center border=0 cellPadding=8 cellSpacing=0 width=650>
<TR>
<TD bgColor=#000000>
<%
Which = Request("Which")

If IsNumeric( Which ) Then

session("BBS_Which") = Which

' 點擊數加一
Con.Execute( "UPDATE bbs SET [點擊]=[點擊]+1 WHERE [序號]=" & Which )

SQL = "SELECT * FROM bbs WHERE [序號]=" & Which
RecBBS.Open SQL , Con , 1
If Not RecBBS.EOF Then

Title = RecBBS.FIElds("題目")
Session("BBS_WhichTitle") = Title
%>
<P><FONT color=#66ff99>序號</FONT>:<FONT color=#6699ff>E<%= Which %></FONT><BR>
<FONT color=#66ff99>作者</FONT>:<%= Server.HtmlEncode( RecBBS.FIElds("作者") ) %><BR>
<FONT color=#66ff99>題目</FONT>:<%= Server.HtmlEncode( Title ) %><BR>
<FONT color=#66ff99>時間</FONT>:<%= RecBBS.FIElds("時間") %><BR>
<BR>
<PRE>
<%= Server.HtmlEncode( RecBBS.FIElds("內容") ) %>
</PRE>
</P>
<%
End If
RecBBS.Close

SQL = "SELECT * FROM bbsreply WHERE [原文]=" & Which
RecReply.Open SQL , Con , 3

AllID = "E" & Which

Do While Not RecReply.EOF

ID = RecReply.FIElds("序號")
AllID = AllID & ":" & ID
%>
<P><FONT color=#66ff99>序號</FONT>:<FONT color=#6699ff><%= ID %></FONT><BR>
<FONT color=#66ff99>作者</FONT>:<%= Server.HtmlEncode( RecReply.FIElds("作者") ) %><BR>
<FONT color=#66ff99>題目</FONT>:<%= Server.HtmlEncode( RecReply.FIElds("題目") ) %><BR>
<FONT color=#66ff99>時間</FONT>:<%= RecReply.FIElds("時間") %><BR>
<BR>
<PRE>
<%= Server.HtmlEncode( RecReply.FIElds("內容") ) %>
</PRE>
</P>
<%
RecReply.MoveNext
If RecReply.EOF Then Exit Do
Loop
RecReply.Close

End If
%>
</TD>
</TR>
</TABLE>
<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 id=Job name=Job value=Reply>
賬號:<INPUT id=Userid name=Userid maxLength=30 size=30>
密碼:<INPUT id=Password maxLength=30 name=Password size=30 type=passWord><BR>
題目:<INPUT id=Title maxLength=80 name=Title size=72 value="回復:<%= Title %>"><BR>
<TEXTAREA cols=80 id=Content name=Content rows=10></TEXTAREA><BR>
<INPUT type=submit value=" 回 復 ">
</FORM>
<P>
選中文章:
<SELECT id=Which name=Which size=1>
<%
WhichID = Split( AllID , ":" )

For Each ID In WhichID
Response.Write "<OPTION value="
Response.Write ID & ">" & ID
Response.Write "</OPTION>"
Next
%>
</SELECT><BR>
<INPUT id=Email maxLength=80 name=Email size=40>
<INPUT type=button id=MailBack name=MailBack value="寄回信箱" OnClick="window.open('<%= ASP_FILE_NAME %>?Job=Send&Which=' + Which.value + '&Email=' + Email.value , '_self')">
<INPUT type=button id=Modify name=Modify value="修改" OnClick="window.open('<%= ASP_FILE_NAME %>?Job=Modify&Which=' + Which.value , '_self')">
<INPUT type=button id=Delete name=Dalete value="刪除" OnClick="window.open('<%= ASP_FILE_NAME %>?Job=Delete&Which=' + Which.value , '_self')">
</P>
</TD>
</TR>
</TABLE>

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved