图片新闻的另一种调用方法
作者:cmscn 日期:2006-12-17
引用内容
sub news_pic()
dim tmp1,id,topic,pic,tmp_title,tmp_img
tmp_title="头条报道"
tmp_img="news1"
tmp1=vbcrlf&"<tr align=center>"
sql="select top 1 id,topic,word,pic from news where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
tmp1=tmp1&vbcrlf&"<td>" & _
vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&" <tr><td align=center width=80 rowspan=2>"&pic_fk(rs("pic"),2,"../news/view.asp?id="&id)&"</td><td align=center width=300><a class=h_tilte href='../news/view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'><i>"&joekoe_cms.code_html(topic,1,13)&"</i></a></td></tr>" & _
vbcrlf&" <tr><td align=left><a href='../news/view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(rs("word"),1,230)&"</a>...... <a href='../news/view.asp?id="&id&"'><font color=red>评论</font></a><a href='../news/view.asp?id="&id&"'><font color=red>全文</font></a></td>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</tr>"
tmp1="<table border=0 cellspacing=0 cellpadding=2 width=444>"&tmp1&vbcrlf&"</table>"
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=#efefef>" & _
vbcrlf&"<tr><td class=tdi> "&img_skin("n_"&tmp_img)&" "&tmp_title&"</td></tr>" & _
vbcrlf&"<tr class=bg><td align=center>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"&ukong
end sub
dim tmp1,id,topic,pic,tmp_title,tmp_img
tmp_title="头条报道"
tmp_img="news1"
tmp1=vbcrlf&"<tr align=center>"
sql="select top 1 id,topic,word,pic from news where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
tmp1=tmp1&vbcrlf&"<td>" & _
vbcrlf&" <table border=0 cellspacing=0 cellpadding=0>" & _
vbcrlf&" <tr><td align=center width=80 rowspan=2>"&pic_fk(rs("pic"),2,"../news/view.asp?id="&id)&"</td><td align=center width=300><a class=h_tilte href='../news/view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'><i>"&joekoe_cms.code_html(topic,1,13)&"</i></a></td></tr>" & _
vbcrlf&" <tr><td align=left><a href='../news/view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(rs("word"),1,230)&"</a>...... <a href='../news/view.asp?id="&id&"'><font color=red>评论</font></a><a href='../news/view.asp?id="&id&"'><font color=red>全文</font></a></td>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</tr>"
tmp1="<table border=0 cellspacing=0 cellpadding=2 width=444>"&tmp1&vbcrlf&"</table>"
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=#efefef>" & _
vbcrlf&"<tr><td class=tdi> "&img_skin("n_"&tmp_img)&" "&tmp_title&"</td></tr>" & _
vbcrlf&"<tr class=bg><td align=center>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"&ukong
end sub
红色的为你要显示的内容字数
在CSS中加入:
引用内容
a.h_tilte {font-family: 黑体; font-size: 20pt; color:#333333; text-decoration: none}
a.h_tilte:hover {font-family: 黑体; font-size: 20pt;color:#333333; text-decoration: none}
a.h_tilte:hover {font-family: 黑体; font-size: 20pt;color:#333333; text-decoration: none}
调用:call news_pic()
评论: 6 | 引用: 0 | 查看次数: 682
发表评论