<% Dim SqlStr, Rs, IsErr, ErrMsg, CurrentPage, CurrentNum Dim TotalNum, MaxPerPage, j, OffSet Dim Url, Index, FileName, Action MaxPerPage = AppMaxPerPage Url = Request.ServerVariables("URL") index = InstrRev(Url, "/") FileName = Right(Url, Len(Url) - index) CurrentPage = Trim(Request("Page")) if CurrentPage = "" then CurrentPage = 1 Set Rs = Server.CreateObject("ADODB.Recordset") %> <%=AppTitle%>
<% if Session("SysAdmin") = "Yes" then SqlStr = "Select * From Message Where ReplyID = 0 order by ID Desc" else SqlStr = "Select * From Message Where Opened = true And ReplyID = 0 order by ID Desc" end if Rs.Open SqlStr, conn, 1, 3 TotalNum = Rs.RecordCount CurrentNum = (CurrentPage - 1) * MaxPerPage if TotalNum > 0 then if CurrentNum > TotalNum then if TotalNum mod MaxPerPage = 0 then CurrentPage = TotalNum \ MaxPerPage else CurrentPage = TotalNum \ MaxPerPage + 1 end if end if j = 1 CurrentNum = (CurrentPage - 1) * MaxPerPage Rs.Move CurrentNum Do While not rs.eof %> <% Dim Rss Set Rss = Server.CreateObject("ADODB.RecordSet") SqlStr = "Select * From Message Where ReplyID = " & Rs("ID") Rss.Open SqlStr, conn, 1, 3 While not Rss.eof %> <% Rss.MoveNext Wend Rss.Close %>
  留言者:<%=Trim(Rs("Name"))%>    时间 [<%=Rs("AddTime")%>] <% if Session("SysAdmin") = "Yes" then %> ">回复此条   ">删除此条  <% elseif AppReplyOpen = true then %> ">回复此条   删除此条  <% else %> 回复此条   删除此条  <% end if %>
" width="75" height="75">
<%=Trim(Rs("Content"))%>

No.<%=j%>
回复来自于:<%=Trim(Rss("Name"))%>  [<%=Rss("AddTime")%>] <% if Session("SysAdmin") = "Yes" then %> ">删除此回复  <% else %> 删除此回复  <% end if %>
<%=Trim(Rss("Content"))%>
target="_blank"> 

<% Rs.MoveNext j = j + 1 if j > MaxPerPage then exit do end if loop end if Rs.Close %>
<% call ShowPage(FileName, CurrentPage, TotalNum, MaxPerPage, true, true, "条留言") %>