⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 topic.asp

📁 电子商务网络购物系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		If rsBBS.EOF Then Exit For
		lngTopicID = CLng(rsBBS("topicid"))
		lngPollID = CLng(rsBBS("pollid"))
		intMovedForumID = CInt(rsBBS("moved"))
		lngNumberOfViews = CLng(rsBBS("viewnum"))
		strSubject = rsBBS("Subject")
		blnTopicLocked = CBool(rsBBS("Locked"))
		intPriority = CInt(rsBBS("Priority"))
		dtmstartdate=rsBBS("startdtm")
			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" align="center" class="text" height="32"><td>
		<% 	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 (lngLoggedInUserID = 1 OR blnModerator = True) AND (intPriority <> 3 OR lngLoggedInUserID = 1) Then
		 %>
		 <a href="javascript:openWin('putopicadmin.asp?tid=<%= lngTopicID %>','admin','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=425')"><img src="images/smadmin.gif" align="absmiddle" border="0"" alt="管理主题"></a>
		 <%
		End If
		If intMovedForumID = intForumID AND intMovedForumID <> 0 Then %>
		已移走 <% end if
		If lngPollID <> 0 Then %>投票:
		<% end if
		Response.Write("	<a href=""post.asp?tid=" & lngTopicID & "&pn=" & intRecordPositionPageNum)
		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("&nbsp;<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 & "&pn=" & intRecordPositionPageNum & "&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 & "&pn=" & intRecordPositionPageNum & "&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 & "&pn=" & intRecordPositionPageNum & "&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 & "&pn=" & intRecordPositionPageNum & "&tpn=" & intTopicPagesLoopCounter)
		 		If intPriority = 3 Then Response.Write("&fid=" & intForumID & "&pr=3")
		 		Response.Write(""" target=""_self"" class=""smLink"">" & intTopicPagesLoopCounter & "</a>")
		 	Next
		 End If
		  %></td>
     <td class="smtext" nowrap="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=590,height=425')"><% = strTopicStartUsername %></a><br/>&nbsp;<% = dtmstartdate  %>&nbsp;</td>
     <td><% = lngNumberOfReplies %></td>
     <td><% = lngNumberOfViews %></td>
     <td class="smText" align="right" nowrap="nowrap">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')"><% = strLastEntryUsername %></a>&nbsp;<br/>&nbsp;<% = dtmLastEntryDate %>&nbsp;</td>
	 <td width="30">&nbsp;<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>&nbsp;</td>
    </tr><%
                rsST.Close
		rsBBS.MoveNext
	Next
End If
Set rsST = Nothing
rsBBS.Close
        %>
   </table>
<table width="96%" border="0" align="center" cellpadding="2" cellspacing="0">
  <tr> 
    <form>
      <%
If intTotalNumOfPages > 1 Then
	Response.Write vbCrLf & "		<td align=""left"" class=""text"">第"
	Response.Write vbCrLf & "		 <select onChange=""ForumJump(this)"" name=""SelectTopicPage"">"
	For intTopicPageLoopCounter = 1 to intTotalNumOfPages
		Response.Write vbCrLf & "		  <option value=""topic.asp?fid=" & intForumID & "&pn=" & intTopicPageLoopCounter & """"
		If intTopicPageLoopCounter = intRecordPositionPageNum Then
			Response.Write " selected"
		End If
		Response.Write ">" & intTopicPageLoopCounter & "</option>"
	Next
	Response.Write vbCrLf & "</select> 页,共  <b>" & intTotalNumOfPages & "</b>  页 </td>"
End If

  %>
      <td align="right"> 
        <%
If blnEmail = True AND intGroupID <> 2 Then
		strSQL = "SELECT timesnotify.*  "
		strSQL = strSQL & "FROM timesnotify "
		strSQL = strSQL & "WHERE timesnotify.userid=" & lngLoggedInUserID & " AND timesnotify.bbsid=" & intForumID & ";"
	rsBBS.Open strSQL, adoCon
	Response.Write("<a href=""enotify.asp?fid=" & intForumID & "&pn=" & intRecordPositionPageNum & """ target=""_self"">")
	If NOT rsBBS.EOF Then Response.Write("取消")
	Response.Write("订阅主题" & "</a>")
	rsBBS.Close
Else
	Response.Write("&nbsp;")

End If
              %>
</td>
      <td align="right"><!-- #include file="includes/forumjump.asp" --></td>
      <%
Set rsBBS = Nothing
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing

%>
    </form>
  </tr>
</table>
<br/>
 <table width="96%" border="0" cellspacing="0" cellpadding="1">
  <tr>
   <td align="center" width="100%"><table width="88%" border="0" cellspacing="0" cellpadding="2">
     <tr>
      <td align='center' width="250"  class="smText"><img src="images/nonew.gif" alt="打开主题 (无新回复)"> 打开主题 (无新回复)</td>
      <td  align='center' width="220" class="smText"><img src="images/hotnonew.gif" alt="热门主题 (无新回复)"> 热门主题 (无新回复)</td>
     <td  align='center' width="220" class="smText"><img src="images/closedtopic.gif" alt="已锁主题"> 已锁主题</td>
	 <td  width="180" class="smText"><img src="images/firsttop.gif" alt="总置定主题">  总置定主题</td>
	 </tr>
     <tr>
      <td  align='center' width="250" class="smText"><img src="images/newpost.gif" alt="打开主题 (有新回复)"> 打开主题 (有新回复)</td>
      <td align='center' width="220" class="smText"><img src="images/hotnew.gif" alt="热门主题 (有新回复)"> 热门主题 (有新回复)</td>
     <td align='center' width="220" class="smText"><img src="images/pin.gif" alt="置定主题"> 置定主题</td>
	 <td width="180" class="smText"><img src="images/lockedtop.gif" alt="被锁置定主题"> 被锁置定主题</td>
	 </tr>

    </table></td></tr><tr>
   <td align="center" width="100%" class="smText" nowrap="nowrap"><!-- #include file="includes/permissions.asp" --></td>
  </tr>
 </table>
 <br />


<!-- #include file="includes/footer.asp" -->
<%
If Request.QueryString("DL") = "1" Then %>
<script language="JavaScript">
alert('此主题已被删除')
</script>
<% End If
If Request.QueryString("EN") = "FS" Then %>
<script language="JavaScript">
alert('此主题每次有新回复时都会e-mail通知你.\n\n要取消通知,单击页面底部的 <取消订阅主题>')
</script>
<% End If 
If Request.QueryString("EN") = "FU" Then %>
<script language="JavaScript">
alert('通知已关闭,要开通,请单击页面底部的 <订阅主题>')
</script>
<% End If %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -