欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

一个BBS的源代码(三)

程序员文章站 2024-01-28 20:21:16
=============================case "content"============================= 显示内容if request("keyword")...

=============================
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>