文栏两列显示
作者:cmscn 日期:2005-04-11
修改方法:
con_article_main.asp:
修改成如下:
<%
sub article_main_list(n_num,c_num)
%>document.write("<table width='100%' valign='top'>");<%
dim ncid,ncname,crs,csql,sqla,n_username,n_topic,n_tim
i=0
csql="select c_id,c_name from jk_class where nsort='"&n_sort&"' order by c_order"
set crs=joekoe_cms.exec(csql,1)
do while not crs.eof
ncid=crs("c_id")
ncname=crs("c_name")
sqla=" and c_id="&ncid
if i mod 2=0 then %>document.write("<tr>");<%end if
%>document.write("<td width='50%' valign='top'>");<%
response.write vbcrlf&"article_bar_top('"&ncname&"',1);"
sql="select top "&n_num&" id,topic,tim,username,counter,emoney,power from article where hidden=1 and c_id="&ncid&" order by id desc"
set rs=conn.execute(sql)
do while not rs.eof
n_username=rs("username")
n_topic=rs("topic")
n_topic=joekoe_cms.code_js(n_topic,1)
n_tim=rs("tim")
n_tim=joekoe_cms.time_type(n_tim,1)
response.write vbcrlf&"article_topic_type("&c_num&","&rs("id")&",'"&n_username&"','"&n_topic&"','"&n_tim&"','"&rs("counter")&"','false',2,'"&rs("emoney")&"','"&rs("power")&"');"
rs.movenext
loop
rs.close
response.write vbcrlf&"article_bar_end(""<a href='article_list.asp?action=more&c_id="&ncid&"'>浏览更多…</a>"",1);"
%>document.write("</td>");<%
if i+1 mod 2=0 then %>document.write("</tr>");<%end if
if i=1 then %>document.write("<tr><td height=1></td></tr>");<%end if
crs.movenext
i=i+1
loop
crs.close
set crs=nothing
%>document.write("</table>");<%
end sub
%>
http://www.joekoe.com/forum_view.asp?forum_id=7&view_id=38094
评论: 7 | 引用: 0 | 查看次数: 624
发表评论