<%
tablewidth=590'定义表格的宽度
tablestyle="p9" '定义表格的样式
sqlstr_1="SELECT t.id,t.title,t.newsimg,t.newsdate,m.newsort as boardname FROM t_news_purpose t,t_news_sort m WHERE t.newsort=m.id AND t.newsort=" & myclass
sqlstr_1=sqlstr_1 & " ORDER BY topsign desc,newsdate desc"
set myrs=server.CreateObject("Adodb.recordset")
myrs.Open sqlstr_1,conn,1,1
if myrs.RecordCount>0 then
myrs.PageSize=14'每页显示的记录数 '显示标题时
total_page=myrs.PageCount
total_red=myrs.RecordCount
current_page=Request("me_page")
if current_page="" then
current_page=1
elseif not isnumeric(current_page) then
current_page=1
else
current_page=cint(current_page)
end if
if current_page>total_page then
current_page=total_page
elseif current_page<1 then
current_page=1
end if
myrs.AbsolutePage=current_page
%>
<%if total_page>1 then%>
<%end if
else
Response.Write "对不起!没有与此相关的新闻!返回 "
end if
myrs.Close
set myrs=nothing
%>
|
|
|
|