程序:disprec.asp
功能:显示贴子具体内容
1
2keyid=request("keyid")
3rootid=request("rootid")
4pageno=request("pageno")
5if rootid=0 then rootid=keyid
6set guestconn=Server.CreateObject("ADODB.connection")
7guestconn.Open lybstr
8set guestrs=server.createobject("ADODB.recordset")
9sqlstr="SELECT * FROM guestbook where lybid="&rootid&" or rootid="&rootid
10sqlstr=sqlstr&" order by orderstr,lybid desc"
11guestrs.open sqlstr,guestconn,1,1
1<html>
2<head><title>软件使用留言薄</title>
3<style type="text/css">
4<!--
5a { text-decoration: none}
6body {line-height:18px;font-size:9pt;font-family:宋体}
7a:hover {color:#FF0000;text-decoration:none}
8td {font-family: 宋体; font-size: 9pt;background-color:ECF7FF}
9.td1 {font-family: 宋体; font-size: 9pt;background-color:A2C8F2}
10.td2 {font-family: 宋体; font-size: 9pt;background-color:E9EDE0}
11.small1 {font-family: 宋体; font-size: 9pt;background-color:ffffff;line-height:9pt}
12\-->
13</style>
14</head>
15<body background="topbg.gif" topmargin="16">
16<form action="index.asp" method="POST" name="index">
17<table align="center" width="100%">
18<tr>
19<td align="center" height="35" style="font-size:16px;background-color:ffffff;color:red" valign="top">软件使用
20留言薄</td>
21<td align="center" colspan="2" style="background-color:ffffff" valign="bottom">相关留言共<font style="font-
22size:16px;color:red">```
23 =guestrs.recordcount
24```</font>条</td>
25<td align="center" style="background-color:ffffff" valign="bottom"><a href="index.asp?pageno=```
26 =pageno
27```">
28留言列表</a></td>
29<td align="center" style="background-color:ffffff" valign="bottom"><a href="revert.asp?type=post">发贴子
30</a></td>
31</tr>
32<tr style="color:red">
33<td align="center" class="td1" width="70%">留言标题</td>
34<td align="center" class="td1" nowrap="" width="70"><img src="edit.gif"/>作 者</td>
35<td align="center" class="td1" nowrap="" width="100">发表时间</td>
36<td align="center" class="td1" nowrap="" width="60">贴子字数</td>
37<td align="center" class="td1" nowrap="" width="60">贴子序号</td>
38</tr>
do while not guestrs.eof
1<tr>
2<td>```
3 if guestrs("rootid")&lt;&gt;0 then response.write(replace(space(len(guestrs("orderstr")))," "," ")) %
4&gt;&lt;% if guestrs("lybid")+1=keyid+1 then
5if guestrs("rootid")=0 then
6rootid=guestrs("lybid")
7else
8rootid=guestrs("rootid")
9end if
10lybid=guestrs("lybid")
11guestitle=guestrs("guestitle")
12guestname=guestrs("guestname")
13guestemail=guestrs("guestemail")
14guestcomm=guestrs("guestcomm")
15putdate=guestrs("putdate")
16puttime=guestrs("puttime")
17emailflag=guestrs("emailflag")
=guestrs("guestitle")
1 else
2```<a href='disprec.asp?keyid=```
3 =guestrs("lybid")
4```&amp;rootid=```
5
6=guestrs("rootid")
7```&amp;pageno=```
8 =pageno
9```'>```
10 =guestrs("guestitle")
11```</a>```
12 end if
13```</td>
14<td align="right" nowrap="">```
15 =guestrs("guestname")
16``` </td>
17<td align="center" nowrap="">```
18 =guestrs("putdate")&" "&guestrs("puttime")
19```</td>
20<td align="right" nowrap="">```
21 =len(guestrs("guestcomm"))
22``` </td>
23<td align="right" nowrap="">```
24 =guestrs("lybid")
25``` </td>
26</tr>
27```
28
29guestrs.movenext
30loop
31guestrs.close
32set guestrs=nothing
33guestconn.close
34set guestconn=nothing
35
36```
37<tr><td colspan="5" height="20" style="background-color:ffffff"></td></tr>
38<tr>
39<td align="center" style="color:red">```
40 =guestitle
41```</td>
42<td align="right" width="70">```
43 =guestname
44``` </td>
45<td width="100">```
46 =putdate&" "&puttime
47```</td>
48<td align="right" width="60">```
49 =len(guestcomm)
50``` </td>
51<td align="right" width="60">```
52 =lybid
53``` </td>
54</tr>
55<tr><td colspan="5" height="50" style="background-color:f3F7FF" valign="top">```
56 =guestcomm
57```<p align="right"><a href="delrec.asp?type=revert&amp;keyid=```
58 =keyid
59```&amp;pageno=```
60 =pageno
61```">删除留言</a> <a href="revert.asp?
62type=revert&amp;keyid=```
63 =lybid
64```&amp;pageno=```
65 =pageno
66```">回复作者</a> </p></td></tr>
67</table>
68</form>
69</body>
70</html>
71```