|
| |
<%
If News_Check = 1 Then
If s_keyword <> "" Then
sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' and D_Title LIKE '%"&s_keyword&"%' and D_Num = 1 ORDER BY D_Special desc ,D_SortID"
Else
sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' and D_Num = 1 ORDER BY D_Special desc ,D_SortID"
End If
Else
If s_keyword <> "" Then
sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' and D_Title LIKE '%"&s_keyword&"%' ORDER BY D_Special desc ,D_SortID"
Else
sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' ORDER BY D_Special desc ,D_SortID"
End If
End If
oRs.Open sSql, oConn, 1, 1
Dim Rcount, Loopno, Mpage,lrid,lrtle,lrfn,lrfrom
Rcount = oRs.Recordcount
If Pmcount="" or isempty(Pmcount) or Pmcount<1 then
Pmcount=20
End If
oRs.Pagesize = pmcount '设置每页数
Mpage = oRs.Pagecount '得到总页数
Pageno = GetSafeInt(Request("Pageno"),1)
If Cint(Pageno) < 1 Then Pageno = 1
If Cint(Pageno) > Mpage Then Pageno = Mpage
If oRs.Bof and oRs.Eof then
Response.write "| 暂时没有任何新闻! | "
Else
oRs.Absolutepage = Pageno '将指针移至指定页的第一条记录
Loopno = Pmcount
Do While Not oRs.Eof and Loopno > 0
lrid=oRs("D_id")
lrtle=oRs("D_Title")
lrfn=split(oRs("D_SavePathFileName"),"|")(0)
lrfrom=oRs("D_From")
%>
|
|
| |
<%
oRs.Movenext
Loopno=Loopno-1
Loop
oRs.Close
Set oRs=Nothing
End if
%>
|
|
|
|