书库调用
作者:cmscn 日期:2007-01-14
sub book()
dim cid,dateandtime,title,b_name,sql1,rs1,articleid,b_id,sql3,rs3,classid,temp1,sql2,c_name,zuozhe,c_id,rs2,tiime
%>
<table cellspacing=0 cellpadding=4 class=table>
<tr><td class=td> 最新更新</td></tr>
<tr class=bg_td><td align=center>
<table border=0 width='100%'>
<%
sql="select * from bb_class order by tiime desc"
set rs=joekoe_cms.exec(sql,1)
for i=1 to 6
if rs.eof then exit for
zuozhe=rs("zuozhe")
tiime=rs("tiime")
%>
<tr>
<%
cid=rs("c_id")
sql3="select * from jk_class where c_id="&cid
set rs3=joekoe_cms.exec(sql3,1)
b_id=rs("b_id")
response.write"<td> [<a href='book_list.asp?id="&rs3("c_id")&"'>"&rs3("c_name")&"</a>] <a href='book_view.asp?b_id="&b_id&"'>"&rs("b_name")&"</a> "
rs3.close
sql2="select * from b_article where b_id="&b_id&" and page=1 order by articleid desc"
set rs2=joekoe_cms.exec(sql2,1)
if rs2.eof and rs2.bof then
response.write "暂无内容更新"
else
dateandtime=rs2("dateandtime")
title=rs2("title")
articleid=rs2("articleid")
c_id=rs2("c_id")
rs2.close
sql1="select * from bc_class where c_id="&c_id
set rs1=joekoe_cms.exec(sql1,1)
c_name=rs1("c_name")
rs1.close
response.write" <a href='book_jie.asp?b_id="&b_id&"&aid="&articleid&"'><font class=gray>"&c_name&" "&title&"</font></a></td>"
end if
response.write"<td><a href='book_show.asp?word="&zuozhe&"'><font class=blue>"&zuozhe&"</font></td><td class=tims align=right><"&mid(tiime,6,4)&"></td>"
response.write"</tr>"
rs.movenext
next
rs.close
response.write"</table>"&ukong
end sub
评论: 8 | 引用: 0 | 查看次数: 659
发表评论