分页
作者:cmscn 日期:2009-09-25
dim nname,topic,hidden,tim
sql="select count(id) from news where c_id="&cid&" and hidden=1"
set rs=joekoe_cms.exec(sql,1)
rssum=rs(0)
rs.close
call format_pagecute()
sql="select top "&nummer*viewpage&" id,topic,tim from news where c_id="&cid&" and hidden=1 order by id desc"
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,1
if int(viewpage)>1 then rs.move (viewpage-1)*nummer
if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
%>
<table border="0" cellpadding="0" cellspacing="0" width="1003">
<tr>
<td width="484" height="447">
<iframe src='news_view.asp?id=<%
if trim(request.querystring("id"))="" then
response.write tid
else
response.write id
end if
%>' frameborder=0 width='483' height='447' marginwidth=0 marginheight=0 vspace=0 hspace=0 allowtransparency=true scrolling=off></iframe>
</td>
<td><img src="/images/<%=timg%>" width="34" height="447" border="0" usemap="#Map"></td>
<td width="485" height="447" bgcolor='#6B6A74' valign='top'>
<table width='100%'>
<tr><td>
<!--开始-->
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td class=btd> 新闻列表</td></tr>
<%
for i=1 to nums
id=rs("id")
topic=rs("topic")
tim=rs("tim")
%>
<% if (i-1) mod col_num=0 then %>
<tr><td>
<table border=0 cellspacing=1 cellpadding=2 width='100%'>
<tr align=left>
<%
tr_ture=false
end if
%>
<td><%response.write img_skin("h_news1")%><a href='?c_id=<%=cid%>&id=<%=id%>'><font alt='<%response.write joekoe_cms.code_html(topic,1,0)%>'><%response.write joekoe_cms.code_html(topic,1,32)%></font></a></td>
<%
if i mod col_num=0 then
tr_ture=true
%>
</tr></table></td></tr>
<% end if
rs.movenext
next
rs.close
%>
<% if not tr_ture then %>
</tr></table></td></tr>
<% end if %>
<tr height=26><td> 共有<font class=red><%response.write rssum%></font>个新闻 <%=tid%>页次:<font class=red><%response.write viewpage&"</font>/<font class=red>"&thepages%></font> 分页:<% response.write jk_pagecute(nummer,thepages,viewpage,pageurl,5,"#ff0000") %></td></tr>
</table>
评论: 0 | 引用: 0 | 查看次数: 713
发表评论