|
<%
'开始读取当前位置的信息
Dim aRs, aSql, aRootID, aTitle, aLen, i, TempStr
Response.write "你的位置:"
If Len(s_cataid) < 5 Then
Response.Write "所有内容"
Else
TempStr = "所有内容"
aLen = Int(Len(Trim(s_cataid))/4)
For i = 1 To aLen
aRootID = Mid(s_cataid,1,4*i+1)
Set aRs = Server.CreateObject( "ADODB.Recordset" )
aSql = "SELECT * FROM NewsCata WHERE C_RootID = '"&aRootID&"' ORDER BY C_ID DESC"
aRs.Open aSql, oConn, 0, 1
If Not aRs.Eof Then
aTitle = aRs("C_Title")
End If
aRs.Close
Set aRs = Nothing
If i = aLen Then
TempStr = TempStr & " >> "& aTitle &""
Else
TempStr = TempStr & " >> "& aTitle &""
End If
Next
Response.Write TempStr
End If
%>
您的位置 >> 府谷县人民政府网 >> 政府办文件
|
<%
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_SortID DESC"
Else
sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' and D_Num = 1 ORDER BY D_SortID DESC"
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_SortID DESC"
Else
sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' ORDER BY D_SortID DESC"
End If
End If
oRs.Open sSql, oConn, 1, 1
Dim Rcount, Loopno, Mpage
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
%>
|
|
|
|