频道直达 - 学院 - 下载 - 交易 - 特效 - 字库 - 手册 -排名-工具- 繁體
网页教学网站开发 设为首页
加入收藏
联系我们
建站搜索: 常用广告代码   用户注册 | 用户登陆
您当前的位置:中国建站之家 -> 网站开发设计技术教程 -> asp教程 -> 用排序串字段实现树状结构(例程——显示贴子内容)

用排序串字段实现树状结构(例程——显示贴子内容)

作者:未知  来源:转载  发布时间:2005-7-28 14:30:22  发布人:acx

减小字体 增大字体

程序:disprec.asp
功能:显示贴子具体内容

<!-- #include file="lybcon.inc" -->
<%
keyid=request("keyid")
rootid=request("rootid")
pageno=request("pageno")
if rootid=0 then rootid=keyid
set guestconn=Server.CreateObject("ADODB.connection")
guestconn.Open lybstr
set guestrs=server.createobject("ADODB.recordset")
sqlstr="SELECT * FROM guestbook where lybid="&rootid&" or rootid="&rootid
sqlstr=sqlstr&" order by orderstr,lybid desc"
guestrs.open sqlstr,guestconn,1,1
%>
<html>
<head><title>软件使用留言薄</title>
<style TYPE="text/css">
<!--
a {  text-decoration: none}
body {line-height:18px;font-size:9pt;font-family:宋体}
a:hover {color:#FF0000;text-decoration:none}
td {font-family: 宋体; font-size: 9pt;background-color:ECF7FF}
.td1 {font-family: 宋体; font-size: 9pt;background-color:A2C8F2}
.td2 {font-family: 宋体; font-size: 9pt;background-color:E9EDE0}
.small1 {font-family: 宋体; font-size: 9pt;background-color:ffffff;line-height:9pt}
-->
</style>
</head>
<body topmargin=16 background='topbg.gif'>
<form name='index' method='POST' action='index.asp'>
<table width=100% align=center>
  <tr>
   <td align=center style='font-size:16px;background-color:ffffff;color:red' height=35 valign=top>软件使用
留言薄</td>
   <td align=center colspan=2 style='background-color:ffffff' valign='bottom'>相关留言共<font style='font-
size:16px;color:red'><% =guestrs.recordcount %></font>条</td>
   <td style='background-color:ffffff' valign=bottom align=center><a href='index.asp?pageno=<% =pageno %>'>
留言列表</a></td>
   <td style='background-color:ffffff' valign=bottom align=center><a href='revert.asp?type=post'>发贴子
</a></td>
  </tr>
  <tr style="color:red">
   <td align=center class='td1' width=70%>留言标题</td>
   <td align=center width=70 class='td1' nowrap><img src='http://www.7880.com/Info/edit.gif'>;作  者</td>
   <td align=center width=100 class='td1' nowrap>发表时间</td>
   <td align=center width=60 class='td1' nowrap>贴子字数</td>
   <td align=center width=60 class='td1' nowrap>贴子序号</td>
  </tr>
<% do while not guestrs.eof %>
  <tr>
   <td><% if guestrs("rootid")<>0 then response.write(replace(space(len(guestrs("orderstr")))," ","  ")) %
><% if guestrs("lybid")+1=keyid+1 then
    if guestrs("rootid")=0 then
      rootid=guestrs("lybid")
    else
      rootid=guestrs("rootid")
    end if
    lybid=guestrs("lybid")
    guestitle=guestrs("guestitle")
    guestname=guestrs("guestname")
    guestemail=guestrs("guestemail")
    guestcomm=guestrs("guestcomm")
    putdate=guestrs("putdate")
    puttime=guestrs("puttime")
    emailflag=guestrs("emailflag")
%><% =guestrs("guestitle") %><% else %><a href='disprec.asp?keyid=<% =guestrs("lybid") %>&rootid=<%
=guestrs("rootid") %>&pageno=<% =pageno %>'><% =guestrs("guestitle") %></a><% end if %></td>
   <td align=right nowrap><% =guestrs("guestname") %> </td>
   <td nowrap align=center nowrap><% =guestrs("putdate")&" "&guestrs("puttime") %></td>
   <td align=right nowrap><% =len(guestrs("guestcomm")) %> </td>
   <td align=right nowrap><% =guestrs("lybid") %> </td>
  </tr>
<%
guestrs.movenext
loop
guestrs.close
set guestrs=nothing
guestconn.close
set guestconn=nothing
%>
<tr><td height=20 colspan=5 style="background-color:ffffff"></td></tr>
<tr>
<td style="color:red" align=center><% =guestitle %></td>
<td align=right width=70><% =guestname %> </td>
<td width=100><% =putdate&" "&puttime %></td>
<td align=right width=60><% =len(guestcomm) %> </td>
<td align=right width=60><% =lybid %> </td>
</tr>
<tr><td colspan=5 style="background-color:f3F7FF" height=50 valign=top><% =guestcomm %><p align=right><a
href='delrec.asp?type=revert&keyid=<% =keyid %>&pageno=<% =pageno %>'>删除留言</a>    <a href='revert.asp?
type=revert&keyid=<% =lybid %>&pageno=<% =pageno %>'>回复作者</a>  </td></tr>
</table>
</form>
</body>
</html>

将本文收藏到QQ书签与更多好友分享
[打 印]
[] [返回上一页] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
精彩推荐
热门文章
· 注册码大全二
· 注册码大全四
· 注册码大全一
· 要10G免费网络硬盘的请进..
· 通过google 赶快来赚美金..
· 注册码大全十
· 头像-qq头像(qq新头像)4..
· 让你轻松架设FTP服务器1..
· 注册码大全三
· 梦幻背景图片7
· 卡通动物图片6
· 网页制作素材-按钮素材2..
· 让你轻松架设FTP服务器5..
· 风景图片8
· 注册码大全九
· 让你轻松架设FTP服务器2..
关注此文读者还看过
· 在Windows2000ADV下配置..
· .Net 2.0 新功能:重构(..
· 用VB.NET 2005编写定时关..
· JScript 方法 - indexOf..
· global.asa文件总是不起..
· PS特效:腐蚀金属牌上的..
· Flash页面参数详解
· 魔图效果研究
· 初学者接触HTML了解一些..
· 善用色彩设计网页
· 用XML数据岛解决用户界面..
· 创建企业级Internet邮件..
· 用flash制作文字的飘落效..
· DB2 数据库设计:取得最..
· 创建有意义的google排名..
· 网游产业并没有衰退 衰退..
相关文章
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
· 用排序串字段实现树状结构(..
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 人才招聘
网站合作、内容监督、商务咨询:QQ: 9576619
Copyright ? 2005--2008 中国建站之家版权所有
粤ICP备05092265号