<%
Dim prePostNo, prePageNo, preTitle, rearPostNo, rearPagNo, rearTitle
Dim strSQL, msg, intRecCount, seek_ok
' 開啟使用者資料庫-唯讀
Call OpenDB_Board(20, 3)
strSQL = "Select * From Board Order By " & Page_Desc & " DESC"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open strSQL, objDBConn, 3, 3, 1
Rs.MoveFirst
Rs.PageSize = Page_Size ' 設定每頁的記錄數
intMaxPageCount = Cint(Rs.PageCount) ' 取得目前記錄的頁數
Rs.AbsolutePage = PageNo ' 指定目前的頁數
intRecCount = 0
seek_ok = 1
%>
<%
While Not Rs.EOF And intRecCount < Rs.PageSize + 1 And seek_ok
Rs.MovePrevious
if Not Rs.BOF Then
prePostNo = Rs("編號")
prePageNo = PageNo
preTitle = Rs("主題")
if intRecCount = 0 Then prePageNo = prePageNo - 1
end if
Rs.MoveNext
If Rs("編號") = PostNo Then
Rs("瀏覽次數") = Rs("瀏覽次數") + 1
%>
|
討論主題:<% = Rs("主題") %>
|
|
發文者:<% = Rs("暱稱") & "(" & Rs("帳號") & ")" %>
|
發文時間:<% = Rs("發文時間") %>
|
|
發文者郵件:"><% =Rs("發文者郵件") %>
|
發文者IP:<% = Rs("發文者位址") %>
|
<% =Rs("內容") %>
|
<% if Session("UserLV") > 1 or Session("UserID") = Rs("帳號") then %>
|
刪除相關討論文章
|
<% end if %>
<%
seek_ok = 0
End If
Rs.MoveNext
if Not Rs.EOF Then
rearPostNo = Rs("編號")
rearPageNo = PageNo
rearTitle = Rs("主題")
if intRecCount >= Rs.PageSize Then rearPageNo = rearPageNo + 1
end if
intRecCount = intRecCount + 1
Wend
If seek_ok Then
%>
沒有這篇留言...
<% Else %>
<% if preTitle <> "" and prePostNo <> "" Then %>
|
▲上一主題:<% =preTitle %>
|
<% End if %>
<% if rearPostNo <> PostNo and rearPostNo <> EMPTY Then %>
|
▼下一主題:<% =rearTitle %>
|
<% End if
End If
' 關閉資料庫
Rs.Close
%>
<%
Dim intMaxPageCount, intRepostRecCount, intRepostPageNo
strSQL = "Select * From RePost where 回覆編號=" & PostNo & " Order By 時間 DESC"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open strSQL, objDBConn, 3, 1, 1
intRepostPageNo = request.querystring("RepostPageNo")
If intRepostPageNo = "" Then intRepostPageNo = 1
If Not Rs.EOF Then
%>
|
相關回應文章
|
<%
Rs.MoveFirst
Rs.PageSize = Repost_Size ' 設定每頁的記錄數
intMaxPageCount = Cint(Rs.PageCount) ' 取得目前記錄的頁數
Rs.AbsolutePage = intRepostPageNo ' 指定目前的頁數
intRepostRecCount = 0
%>
| |
|
<% If intRepostPageNo-1 > 0 Then %>
第一頁
|
上一頁
|
<% Else %>
|
<% End If
If intRepostPageNo+1 <= intMaxPageCount Then %>
下一頁
|
最終頁
|
<% Else %>
|
<% End If %>
第 <% =intRepostPageNo %> 頁 / 共 <% =intMaxPageCount %> 頁
|
|
<%
While Not Rs.EOF And intRepostRecCount < Rs.PageSize
%>
|
|
回覆者:
<%
if Rs("回覆者郵件") <> "" Then
response.write "" & Rs("暱稱") & ""
else
response.write Rs("暱稱")
end if
if Rs("帳號") <> "" then
response.write "(" & Rs("帳號") & ")"
End if
%>
|
<% if Session("UserLV") > 1 or (Session("UserID") <> "" And Session("UserID") = Rs("帳號")) or GetCookie("集亞部品討論區" & Rs("編號"), "") = 1 then %>
">刪除此回覆文章
<% else %>
<% end if %>
|
|
回覆時間:<% =Rs("時間") %>
|
回覆者IP:<% = Rs("回覆者位址") %>
|
<% =Rs("內容") %>
|
|
:')">回覆給 <% =Rs("暱稱") %>
|
<%
Rs.MoveNext
intRepostRecCount = intRepostRecCount + 1
Wend
End IF
Rs.Close
Call CloseDB_Board
%>
<% if seek_ok = 0 then %>
<% end if %>
|