网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > ASP技巧
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.使用ASP与JAVASCRIPT配合实现多个.
.采用XML数据来填充ASP表单.
.ASP中取得图片宽度和高度的类(无.
.让使用者可以看到你的ASP的原代码.
.判断输入是否为中文的函数.
.把ASP移植到ASP+.
.用排序串字段实现树状结构(原理.
.ASP无法更新ACCESS数据库解决方法.
.防止重复提交的巧妙方法.
.remote script文档(转载自微软)(.
.RS.OPEN SQL,CONN,A,B 全接触.
.了解MSMQ,控制ASP进程 (二).
.对数据库连接问题的一点总结.
.ADO存取数据时如何实现留言记录的.
.ASP.NET中的XML表单控件.
.如何使用asp创建dsn.
.asp将数据导入excel后,中文出现.
.实验Recordset.Movenext,Records.
.如何用ASP创建日志文件.
.用ASP实现网页保密的两种方法.

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

发表日期:2000-8-8


程序: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='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>
上一篇:用排序串字段实现树状结构(例程——回复表单) 人气:45856
下一篇:用排序串字段实现树状结构(例程——显示树) 人气:13191
浏览全部用排序串字段实现树状结构的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐