📄 newtopics.asp
字号:
Case 7
rsBBS.Filter = "lastdtm > #" & DateAdd("h", -4, Now()) & "#"
Case 8
rsBBS.Filter = "lastdtm > #" & DateAdd("h", -6, Now()) & "#"
Case 9
rsBBS.Filter = "lastdtm > #" & DateAdd("h", -8, Now()) & "#"
Case 10
rsBBS.Filter = "lastdtm > #" & DateAdd("h", -12, Now()) & "#"
Case 11
rsBBS.Filter = "lastdtm > #" & DateAdd("h", -16, Now()) & "#"
End Select
If rsBBS.EOF Then %>
<td bgcolor="#ffffff" height="25" colspan="7" class="text"> <%= strShowTopicsFrom %> 从你上次离开到现在还没有新帖 </td>
<%
End If
If NOT rsBBS.EOF Then
intForumID = CInt(rsBBS("bbsid"))
rsBBS.PageSize = intTopicPerPage
rsBBS.AbsolutePage = intRecordPositionPageNum
intTotalNumOfPages = rsBBS.PageCount
Set rsST = Server.CreateObject("ADODB.Recordset")
For intRecordLoopCounter = 1 to intTopicPerPage
If rsBBS.EOF Then Exit For
intForumID = CInt(rsBBS("bbsid"))
lngTopicID = CLng(rsBBS("topicid"))
lngPollID = CLng(rsBBS("pollid"))
lngNumberOfViews = CLng(rsBBS("viewnum"))
strSubject = rsBBS("Subject")
blnTopicLocked = CBool(rsBBS("Locked"))
intPriority = CInt(rsBBS("Priority"))
strForumPassword = rsBBS("Password")
strForumPaswordCode = rsBBS("codes")
intForumReadRights = CInt(rsBBS("Read"))
dtmstartdate=rsBBS("startdtm")
If rsBBS("bbsname") <> strForumName Then
strForumName = rsBBS("bbsname") %>
<td height="25" bgcolor="<%= strTableTitleColour2 %>" colspan="7" class="tHeading"> ◇ <%= rsBBS("bbsname") %> ◇</td>
<%
End If
strSQL = "SELECT timespost.postid, timespost.userid, timespost.msgdtm, timesuser.Username "
strSQL = strSQL & "FROM timesuser INNER JOIN timespost ON timesuser.userid = timespost.userid "
strSQL = strSQL & "WHERE timespost.topicid = " & lngTopicID & " "
strSQL = strSQL & "ORDER BY timespost.msgdtm ASC;"
rsST.CursorType = 1
rsST.Open strSQL, adoCon
If NOT rsST.EOF Then
strTopicStartUsername = rsST("Username")
lngTopicStartUserID = CLng(rsST("userid"))
lngNumberOfReplies = CLng((rsST.RecordCount) - 1)
rsST.MoveLast
lngLastEntryMessageID = CLng(rsST("postid"))
strLastEntryUsername = rsST("Username")
lngLastEntryUserID = CLng(rsST("userid"))
dtmLastEntryDate = CDate(rsST("msgdtm"))
End If
If (CDate(Session("dtmLastVisit")) < dtmLastEntryDate) AND (Request.Cookies("RT")("tid" & lngTopicID) = "") Then
blnNewPost = True
Else
blnNewPost = False
End If %>
<tr bgcolor="#ffffff" class="text" height="35" align="center"><td width="40">
<%
If intPriority = 1 Then %>
<img src="images/pin.gif" border="0" alt="置定主题">
<%
ElseIf blnTopicLocked = True AND intPriority > 0 Then %>
<img src="images/lockedtop.gif" border="0" alt="被锁置定主题">
<%
ElseIf intPriority > 0 Then %>
<img src="images/firsttop.gif" border="0" alt="总置定主题">
<%
ElseIf blnTopicLocked = True Then %>
<img src="images/closedtopic.gif" border="0" alt="已锁主题">
<%
ElseIf (lngNumberOfReplies >= intNumHotReplies OR lngNumberOfViews >= intNumHotViews) AND (blnNewPost = True) Then %>
<img src="images/hotnew.gif" border="0" alt="热门主题 (有新回复)">
<%
ElseIf lngNumberOfReplies >= intNumHotReplies OR lngNumberOfViews >= intNumHotViews Then %>
<img src="images/hotnonew.gif" border="0" alt="热门主题(无新回复)">
<%
ElseIf blnNewPost = True Then %>
<img src="images/newpost.gif" border="0" alt="开放主题 (有新回复)">
<% Else %>
<img src="images/nonew.gif" border="0" alt="开放主题(无新回复)">
<% End If %>
</td> <td align="left">
<%
If lngPollID <> 0 Then Response.Write("投票")
Response.Write(" <a href=""post.asp?tid=" & lngTopicID)
If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3")
Response.Write(""" target=""_self"">" & strSubject & "</a>")
intNumberOfTopicPages = ((lngNumberOfReplies + 1)\intThreadsPerPage)
If ((lngNumberOfReplies + 1) Mod intThreadsPerPage) > 0 Then intNumberOfTopicPages = intNumberOfTopicPages + 1
If intNumberOfTopicPages > 1 Then
Response.Write("<br /><img src=""images/page.gif"" align=""middle"" alt=""页"">")
For intTopicPagesLoopCounter = 1 To intNumberOfTopicPages
If intTopicPagesLoopCounter > 7 Then
If intNumberOfTopicPages = 8 Then
Response.Write(" <a href=""post.asp?tid=" & lngTopicID & "&tpn=8")
If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3")
Response.Write(""" target=""_self"" class=""smLink"">8</a>")
Else
Response.Write(" ...")
Response.Write(" <a href=""post.asp?tid=" & lngTopicID & "&tpn=" & intNumberOfTopicPages - 1)
If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3")
Response.Write(""" target=""_self"" class=""smLink"">" & intNumberOfTopicPages - 1 & "</a>")
Response.Write(" <a href=""post.asp?tid=" & lngTopicID & "&tpn=" & intNumberOfTopicPages)
If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3")
Response.Write(""" target=""_self"" class=""smLink"">" & intNumberOfTopicPages & "</a>")
End If
Exit For
End If
Response.Write(" <a href=""post.asp?tid=" & lngTopicID & "&tpn=" & intTopicPagesLoopCounter)
If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3")
Response.Write(""" target=""_self"" class=""smLink"">" & intTopicPagesLoopCounter & "</a>")
Next
End If
%>
<td nowrap><a href="JavaScript:openWin('puprofile.asp?pf=<% = lngTopicStartUserID %>&fid=<% = intForumID %>','profile','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=425')"><% = strTopicStartUsername %></a></br><% = FormatDateTime(dtmstartdate, vbLongDate) &" "& FormatDateTime(dtmstartdate, vbShortTime)%></td>
<td><% = lngNumberOfReplies %></td>
<td><% = lngNumberOfViews %></td>
<td class="smText" nowrap="nowrap" align="right">By:<a href="JavaScript:openWin('puprofile.asp?pf=<% = lngLastEntryUserID %>','profile','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425')" class="smLink"><% = strLastEntryUsername %></a> <br/> <% = FormatDateTime(dtmLastEntryDate, vbLongDate) & " " & FormatDateTime(dtmLastEntryDate, vbShortTime) %> </td>
<td> <a href="post.asp?tid=<% = lngTopicID %>&pn=<% = intRecordPositionPageNum %><% If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3") %>&get=last#<% = lngLastEntryMessageID %>" target="_self"><img src="images/rightarrow.gif" align="absmiddle" border="0" alt="查看最后发表的贴子"></a> </td>
</tr><%
rsST.Close
rsBBS.MoveNext
Next
End If
rsBBS.Close
Set rsBBS = Nothing
Set rsST = Nothing
%>
</table>
<form>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> <%
If intTotalNumOfPages > 1 Then
Response.Write"<td align=""left"" class=""text"">第"
Response.Write"<select onChange=""ForumJump(this)"" name=""SelectTopicPage"">"
For intTopicPageLoopCounter = 1 to intTotalNumOfPages
Response.Write "<option value=""newtopics.asp?pn=" & intTopicPageLoopCounter & """"
If intTopicPageLoopCounter = intRecordPositionPageNum Then
Response.Write " selected"
End If
Response.Write ">" & intTopicPageLoopCounter & "</option>"
Next
Response.Write "</select> <b> " & intTotalNumOfPages & "</b> 页</td>"
End If
%>
<td align="right">
<!-- #include file="includes/forumjump.asp" -->
<%
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
%>
</td></tr></table>
</form>
<table width="760" border="0" cellspacing="0" cellpadding="2" align="center">
<tr class="smtext">
<td width="200"><img src="images/nonew.gif" alt="开放主题 (无新回复)"> 开放主题 (无新回复)</td>
<td width="200"><img src="images/hotnonew.gif" alt="热门主题 (无新回复)"> 热门主题 (无新回复)</td>
<td width="150"><img src="images/firsttop.gif" alt="被锁置定主题"> 总置定主题</td>
<td width="200"><img src="images/pin.gif" alt="置定主题"> 置定主题</td>
</tr>
<tr class="smtext">
<td width="200"><img src="images/newpost.gif" alt="开放主题 (有新回复)"> 开放主题 (有新回复)</td>
<td width="200"><img src="images/hotnew.gif" alt="热门主题 (有新回复)"> 热门主题 (有新回复)</td>
<td width="150"><img src="images/lockedtop.gif" alt="被锁置定主题"> 被锁置定主题</td>
<td width="200"><img src="images/closedtopic.gif" alt="已锁主题"> 已锁主题</td>
</tr>
</table>
<br /> <br />
<!-- #include file="includes/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -