CMS1.2首页图片新闻、最新新闻调用方法
作者:cmscn 日期:2005-04-11
修改方法如下:
一、在 index2.asp 中找到
'---------------------------中间1 开始----------------------------
call main_center_shop(4,12)
'---------------------------中间1 结束----------------------------
替换成:
'---------------------------中间1 开始----------------------------
'call main_center_shop(4,12)
%>
<table cellspacing=1 cellpadding=4 class=table align=center><tr><td class=td0> 最新新闻</td></tr><tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td width='40%'>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<%
sql="select top 1 id,topic,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")
response.write " <tr><td align=center>"&pic_fk(rs("pic"),2,"news_view.asp?id="&id)&"</td></tr>"
response.write " <tr><td align=center><a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(topic,1,16)&"</a></td></tr>"
rs.movenext
loop
rs.close
%>
</table>
</td>
<td width='60%'>
<table border=0 width='100%'>
<%
sql="select top 6 id,topic from news where hidden=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
response.write vbcrlf&" <tr><td height='"&dim_num(6)&"'><img src='skin/"&joekoe_cms.web_skin&"/small/h_news1.gif' border=0 align=absMiddle><a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(topic,1,16)&"</a></td></tr>"
rs.movenext
loop
rs.close
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
'---------------------------中间1 结束----------------------------
二、再找到:
dim voteid
修改成:
dim id,topic,voteid
评论: 6 | 引用: 1 | 查看次数: 798
发表评论