| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 546 人关注过本帖
标题:谁能告诉我这段代码是什么意思?
只看楼主 加入收藏
下里巴人
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2005-10-30
收藏
 问题点数:0 回复次数:2 
谁能告诉我这段代码是什么意思?

<!--#include file="inc/setup.asp" -->
<!--#include file="inc/CheckClass.inc.asp" -->
<!--#include file="conn2.asp" -->

<%
id=RtnReplaceInt(trim(request("id")),0)
word=RtnReplaceInt(trim(request("word")),15)
num=RtnReplaceInt(trim(request("num")),6)

Response.Buffer = True
on error resume next
sql1 ="select * from newsclass where id="&request("id")&" order by id desc"
Set rs1= Server.CreateObject("ADODB.Recordset")
rs1.open sql1,Conn,3,3
name=rs1("name")
rs1.Close
Set rs1=Nothing

tempcontent="<table cellspacing=0 cellpadding=0 width=100% align=center border=0>"
tempcontent=tempcontent&" <tbody>"
tempcontent=tempcontent&" <tr>"
tempcontent=tempcontent&" <td height=4></td>"
tempcontent=tempcontent&" </tr>"


Response.Buffer = True
on error resume next
sql ="select * from news where type='"& name &"' order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3,3

if rs.EOF or rs.BOF then
tempcontent=tempcontent&" <tr><td class=td2>暂时没有任何信息!</td></tr>"
end if
for i=1 to num
if len(Trim(rs("title")))>cint(word) then
atempTitle = Left(RtnReplaceString(Trim(rs("title"))),word)&"..."
else
atempTitle =RtnReplaceString(Trim(rs("title")))

end if

tempcontent=tempcontent&" <tr>"
tempcontent=tempcontent&" <td height=20 valign=top> <img src=images/Bult_ar_org.gif align=absmiddle>"
tempcontent=tempcontent&" <a class=a href='show.asp?id="&rs("id")&"' target=_self>"&atempTitle&"</a>"

tempcontent=tempcontent&" </td>"
tempcontent=tempcontent&" </tr>"
rs.movenext
next

rs.close
set rs = nothing
if s_more <> "ok" then
tempcontent=tempcontent&" <tr>"
tempcontent=tempcontent&" <td height=20>"
tempcontent=tempcontent&" <div align=right><a class=a href=more.asp?id="& id &"><img src=images/Bt_more.gif style=border: 1px solid #FFFFFF></a>"
tempcontent=tempcontent&" </div>"
tempcontent=tempcontent&" </td>"
tempcontent=tempcontent&" </tr>"
end if
tempcontent=tempcontent&" </tbody>"
tempcontent=tempcontent&"</table>"
%>
document.write("<%=tempcontent%>");

搜索更多相关主题的帖子: request trim include 
2005-11-06 08:36
zbt886
Rank: 1
等 级:新手上路
帖 子:49
专家分:0
注 册:2005-10-26
收藏
得分:0 
复杂,不想看!
2005-11-06 11:28
ryan211
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2005-10-10
收藏
得分:0 

挺简单的,你要看一下包含文件里的
RtnReplaceInt函数


2005-11-06 15:37
快速回复:谁能告诉我这段代码是什么意思?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014436 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved