多行列表 黄页
作者:cmscn 日期:2007-01-11
sub pris_main(f_title,ft,c_num,f_num)
dim i,ii:ii=0
select case ft
case "hot"
sql=" order by counter desc,id desc"
case "good"
sql=" and isgood=1 order by id desc"
case else
sql=" order by id desc"
end select
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0> <%response.write img_skin(web_img_m)%> <%response.write f_title%></td></tr>
<tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=2 width='100%'>
<%
sql="select top "&c_num&" id,c_id,name,counter from pris where hidden=1"&sql
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
response.write "<tr>"
for i=1 to 2
if rs.eof then exit for
%>
<td>
<%response.write img_skin(web_img_h)%>
<a href="pris_view.asp?c_id=<%response.write rs("c_id")%>&s_id=<%response.write sid%>&id=<%response.write rs("id")%>" alt='<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,0),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("name"),1,f_num),1)%></a></td>
<%
ii=ii+1
rs.movenext
next
response.write "</tr>"
loop
rs.close
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td align=right><a href="pris_list.asp?action=<%response.write ft%>">浏览更多…</a> </td></tr>
</table></td></tr></table>
<%
end sub
调用
call pris_main("最新公司","new",10,12)
评论: 6 | 引用: 0 | 查看次数: 695
发表评论