用排序串字段实现树状结构(例程——回复表单)

程序名称:revert.asp
程序功能:回复表单

 1   
 2pageno=request("pageno")   
 3keyid=request("keyid")   
 4posttype=request("type")   
 5if posttype="revert" then   
 6set guestconn=Server.CreateObject("ADODB.connection")   
 7guestconn.Open lybstr   
 8set guestrs=server.createobject("ADODB.recordset")   
 9sqlstr="SELECT * FROM guestbook where lybid="&keyid   
10guestrs.open sqlstr,guestconn,1,1   
11if guestrs.eof then response.redirect "index.asp"   
12end if   
 1<html>
 2<head><title>软件使用留言薄回复</title>
 3<style type="text/css">   
 4<!--   
 5a { text-decoration: none}   
 6a:hover {color:#FF0000}   
 7.submit {line-height:9pt;font-size:9pt;font-family:宋体}   
 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 topmargin="16">
16<form action="savelyb.asp" method="POST" name="revert">
17<input name="posttype" type="hidden" value="```
18 =posttype 
19```"/>
20<input =pageno="" ```="" name="pageno" type="hidden" value="```"/>
21<table align="center" width="100%">   

if posttype="revert" then

 1<input =guestrs("lybid")="" ```="" name="keyid" type="hidden" value="```"/>
 2<tr style="color:red">
 3<td align="center" class="td1" width="70%">留言标题</td>
 4<td align="center" class="td1" width="70"><img src="edit.gif"/>作 者</td>
 5<td align="center" class="td1" width="100">发表时间</td>
 6<td align="center" class="td1" nowrap="" width="60">贴子字数</td>
 7<td align="center" class="td1" nowrap="" width="60">贴子序号</td>
 8</tr>
 9<tr>
10<td align="center" style="color:red" width="80%">```
11 =guestrs("guestitle") 
12```</td>
13<td align="right" nowrap="" width="70">```
14 =guestrs("guestname") 
15``` </td>
16<td nowrap="" width="100">```
17 =guestrs("putdate")&amp;amp;" "&amp;amp;guestrs("puttime") 
18```</td>
19<td align="right" nowrap="" width="60">```
20 =len(guestrs("guestcomm")) 
21``` </td>
22<td align="right" nowrap="" width="60">```
23 =guestrs("lybid") 
24``` </td>
25</tr>
26<tr><td colspan="5" height="50" style="background-color:f3F7FF" valign="top">```
27 =guestrs("guestcomm") 
28```<p align="right">[From:```
29 =guestrs("fromip") 
30```] </p></td></tr>   

end if

 1<tr><td></td><td width="70"></td><td width="100"></td><td width="60"></td><td width="60"></td></tr>
 2<tr><td colspan="5" height="16" style="background-color:ffffff"></td></tr>
 3<tr><td> 留言标题:<input class="small1" maxlength="100" name="guestitle" size="36" type="text"/></td>
 4<td colspan="4"> <input name="emailflag" type="checkbox"/>有回复请通知我</td></tr>
 5<tr>
 6<td> 网上昵名:<input class="small1" maxlength="20" name="guestname" size="36" type="text"/></td>
 7<td colspan="4"> 邮箱地址:<input class="small1" maxlength="50" name="guestemail" size="25" type="text"/></td>
 8</tr>
 9<tr><td colspan="5" style="background-color:f3F7FF" valign="top"> 留言内容:<textarea class="small1" cols="80" name="guestcomm" rows="6"></textarea></td></tr>
10<tr><td align="center" colspan="5"><a href="javascript:document.revert.submit();"> 发送留言 </a> <a href="index.asp?pageno=```
11 =pageno 
12```"> 放弃留言 </a></td></tr>
13</table>
14</form>
15</body>
16</html>
1   
2if posttype="revert" then   
3guestrs.close   
4set guestrs=nothing   
5guestconn.close   
6set guestconn=nothing   
7end if   
Published At
Categories with Web编程
comments powered by Disqus