主题:  代码如何理解?处理较长文章,添加 …… 效果

yanking

职务:普通成员
等级:1
金币:0.0
发贴:1
#12006/7/2 14:04:30
function gztzupdate(which)
which=34
ChildSite=1
set boardrs=server.createobject("adodb.recordset"
set boardrsljf=server.createobject("adodb.recordset"
set rs=server.createobject("adodb.recordset"
listtype=1
boardsql="select top 100 announce.body, announce.boardid,announce.announceId,announce.topic,announce.newtime,board.boardname,announce.hits from announce,board where announce.boardid in (8,53,51,59,49,75,67,34,83,76,173) and announce.parentid =0 and board.boardid=announce.boardid order by announce.DateAndTime desc"
boardrs.open boardsql,conn,1,1
if not boardrs.eof then
response.write "<table width='100%' border='0' style='border: 0px ridge'>"
end if
boardrs.movefirst
do while not boardrs.eof
if len(boardrs("body")>300 then
body0=mid(rtrim(ltrim(boardrs("body")),1,300)+".........详情请点击进入看!"
else
body0=rtrim(ltrim(boardrs("body"))
end if
response.write "<tr height=25><td width='100%'>"
        if left(boardrs("newtime",2)<>"20" then
response.write " <img src='/images/block9.gif'><a title='"&body0&"' target='_blank' onClick='return js_callpage(this.href);'href='/information/asp/ShowAnnounce.asp?ID="&cstr(boardrs("AnnounceID")&"&listtype="&cstr(listtype)&"' target='_blank'>"&boardrs("topic"&"</a>20"&cstr(formatdatetime(boardrs("newTime",1))&"...<font color=darkorchid>"&left(boardrs("boardname",instr(boardrs("boardname","布"-1)&"</b></font>"
        else
response.write " <img src='/images/block9.gif'><a title='"&body0&"' target='_blank' onClick='return js_callpage(this.href);'href='/information/asp/ShowAnnounce.asp?ID="&cstr(boardrs("AnnounceID")&"&listtype="&cstr(listtype)&"' target='_blank'>"&boardrs("topic"&"</a>"&cstr(formatdatetime(boardrs("newTime",1))&"...<font color=darkorchid>"&left(boardrs("boardname",instr(boardrs("boardname","布"-1)&"</b></font>"
        end if
        response.write "</td></tr>"
boardrs.movenext
loop

boardrs.close
set boardrs=nothing
response.write "</table>"
end function