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

📄 forum_show.asp

📁 1] 校友多种方式注册认证[直接注册,答问注册,认证注册] 2] 校友论坛 小巧而实用的论坛,支持UBB标签,快速回复,帖子搜索,灵活的将帖子置顶,设置精华 3] 校友相册 相片上传[方便上传
💻 ASP
📖 第 1 页 / 共 2 页
字号:
									Response.Write "<b>该贴已被设置为禁止回复</b>"
								End If
							%>
							</td>
						</tr>
						<%
						'== user sign show
						strHtmlCode = ""
						If Trim(GBL_objPubDB.objPubRS("USER_INFO")) <> "" And Trim(GBL_objPubDB.objPubRS("USER_INFO")) <> CONST_DIVIDER Then
							Dim arrTmp : arrTmp = Split(GBL_objPubDB.objPubRS("USER_INFO"),CONST_DIVIDER)
							If Isarray(arrTmp) Then
								strTmp = UbbCode(arrTmp(0))
								strHtmlCode = "<img src=" & GBL_strHomeURL & "images/ico/" & "forum_sign.gif><br>" & strTmp
								%>
								<tr width=100%>
									<td width=100% style="line-height:15pt;" colspan=2>
										<%=strHtmlCode%>
									</td>
								</tr>
								<%
							End If
						End If
						%>
					</table>
				</td>
			</tr>
			 
			<%

		'== reply
		'== get this topic content
		GBL_objPubDB.Clear()
		GBL_objPubDB.SQLType = "SELECT"
		GBL_objPubDB.AllSQL = "SELECT R.REPLY_ID,R.REPLY_CONTENT,R.REPLY_TITLE,R.REPLY_FACE,R.REPLY_OWNER_ID,R.REPLY_FORUM_ID,R.REPLY_TOPICS_ID,R.REPLY_DATE,U.USER_LEVEL,U.USER_LAST_TIME,U.USER_REALNAME,U.USER_INFO,U.USER_NOW_FACE,U.USER_AUTHEN,U.USER_FACE_SELECT,U.USER_QQ,U.USER_CLASS,U.USER_ID,U.USER_ACCOUNT FROM CLASS_REPLY R,CLASS_USER U WHERE R.REPLY_OWNER_ID=U.USER_ID AND R.REPLY_TOPICS_ID=" & GetRSId & " ORDER BY R.REPLY_DATE ASC"
		GBL_objPubDB.SQLRSExecute()

		'== get now page 
		intMaxPerPage = 10 
		If Not IsEmpty(Request("intPageNow")) Then
			intCurPage = Cint(Request("intPageNow"))
		Else
			intCurPage = 1
		End If
		If intCurPage < 1 then
			intCurPage = 1
		End If

		Call ResultExecute(GBL_objPubDB.intErrNum,"get topics content","ES_ERR")
		If GBL_objPubDB.intRSNum > 0 Then
				
			'== make now page
			intTotalPut =  GBL_objPubDB.intRSNum

			If (intCurPage - 1) * intMaxPerPage > intTotalPut Then
				If (intTotalPut Mod intMaxPerPage) = 0 Then
					intCurPage = intTotalPut \ intMaxPerPage
				Else
					intCurPage = intTotalPut \ intMaxPerPage + 1
				End If
			End if

			If intCurPage = 1 Then
				Call ShowContentRe(GBL_objPubDB.objPubRS,intCurPage,intMaxPerPage,ForumId)
			Else
				If (intCurPage - 1) * intMaxPerPage < intTotalPut Then
					GBL_objPubDB.objPubRS.Move  (intCurPage - 1) * intMaxPerPage
					Dim BookMark
					BookMark = GBL_objPubDB.objPubRS.BookMark
					Call ShowContentRe(GBL_objPubDB.objPubRS,intCurPage,intMaxPerPage,ForumId)
				Else
					intCurPage = 1
					Call ShowContentRe(GBL_objPubDB.objPubRS,intCurPage,intMaxPerPage,ForumId)
				End If

			End If


		End If
			%>
		</table>
		<%
		Dim strFileName
		'== by page
		If GBL_objPubDB.intRSNum > 0 Then
			strFileName = "forum_show.asp?TopicsId=" & GetRSId & "&ForumId=" & ForumId
			Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
		End If

		Call ForumIcoShow()

		If intForbid <> 1 Then
			%>
			<table width="100%" >
			<tr width="100%" >
				<td align="left">
				<input type="checkbox" onclick="OpenReply()" id="chkreply" name="chkreply"><font color="red">回复该贴(划勾则可以直接回复该贴)</font>
				</td></tr>
			<tr width="100%" style="display:none" id="tabopen" name="tabopen">
				<td width="100%">
				<%
				Call FormAddReply()
				%>
				</td></tr></table>
			<%
		End If

	End If '== intRSNum

End Function

'====================================================================
'= Function         : OpenReply()
'= Description : open reply forum
'====================================================================
%>
<script>
function OpenReply()
{
	if (chkreply.checked)
		tabopen.style.display="";
	else
		tabopen.style.display="none";
}
</script>
<%
'====================================================================
'= Function    : ShowContentRe(ByRef clsReTab,objRSCont,intMaxPerPage)
'= Time		   : Created At Jan,31,2004
'= Input       :
'= Description : Show per topics reply
'====================================================================
Function ShowContentRe(objRSCont,intCurPage,intMaxPerPage,intForumId)
	Dim k,str,strHtmlMgr,strSelect1
	Dim strTmp,strHtmlCode
	Dim strTdClass1,strTdClass2,strTdClass,arrTmp

	k = 0
	Do While Not objRSCont.Eof

		k = k + 1

		If (k Mod 2) = 0 Then
			strTdClass = "TBBG1"
		Else
			strTdClass = "TBBG9"
		End If

		'== reply left
%>
	<tr style='word-break:break-all' valign=top>
				<td class=<%=strTdClass%> style="line-height:15pt;">
				<%
					'== user info show
					strHtmlCode = ""
					If objRSCont("USER_FACE_SELECT") = "QQ秀" Then
						strHtmlCode = "&nbsp;&nbsp;&nbsp;&nbsp;<a href='" & MakeQQShow(objRSCont("USER_QQ")) & "'  target=_blank><img src='" & MakeQQShow(objRSCont("USER_QQ")) & "'  onload='javascript:DrawImage(this," & "112" & "," & "181" & ",1);' title='点击查看原图' border=0></a>"
					Else
						strHtmlCode = "&nbsp;&nbsp;&nbsp;&nbsp;" & MakeImg( objRSCont("USER_NOW_FACE")& " onload='javascript:DrawImage(this," & GBL_strUserFaceWidth & "," & GBL_strUserFaceHeight & ",1);'","") 
					End If

					strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;姓名:" & "<span  onclick=window.open('" & GBL_strHomeURL & "address/address_userinfo_pop.asp?intUserId=" & objRSCont("REPLY_OWNER_ID") & "','','left=5,top=5,width=450,height=410,scrollbars=yes,status=yes'); style='cursor:hand;'>" & objRSCont("USER_REALNAME") & "</span>"

					strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;<img src=" & GBL_strHomeURL & "images/lvstar/level" & ConvertLevel(objRSCont("USER_LEVEL")) & ".gif align=absmiddle width=110 height=11>"

					strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;班级:" & objRSCont("USER_CLASS")

					strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;积分:" & objRSCont("USER_LEVEL")
					
					strTmp = FormatDateTime(objRSCont("USER_LAST_TIME"),vbShortDate)
					strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;最近:" & Right(strTmp,Len(strTmp)-2)

					If GBL_objPubDB.objPubRS("USER_AUTHEN") = 1 Then
						If GBL_objPubDB.objPubRS("USER_ACCOUNT") = GBL_strDefaultAdminAccount Then
							strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>网站身份:管理员</font>" 
						Else
							strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>网站身份:副管理员</font>" 
						End If
					End If

					str = GetConfig(Trim(Application(GBL_strCookieURL & "FORUM_MASTER")),"Forum" & intForumId)
					If Instr(str,Trim(objRSCont("USER_ACCOUNT"))) > 0 Then
						strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>身份:本版版主</font>" 
					End If

					Response.Write strHtmlCode
				%>
				</td>
				<td class=<%=strTdClass%> valign=top >
					<table width=98% border=0 cellspacing=0 cellpadding=0 >
						<tr width=100% >
							<td width=70%>
							<%
		'== topics content show
		strHtmlCode = ""
		strTmp = ""
		'== edit or del this topics
		strHtmlMgr = ""
		If IsNumeric(GBL_intUserId) Then
			If Cint(GBL_intUserId) = Cint(objRSCont("REPLY_OWNER_ID")) Then

				strTmp = MakeImg(GBL_strImgDir & "ico/forum_edit.gif","修改回复贴内容")
				strHtmlMgr = "&nbsp;&nbsp;" & MakeLink("forum/forum_add_reply.asp?pstActFlag=FORUM_EDIT_MODE&ReplyId=" & objRSCont("REPLY_ID") & "&TopicsId=" & objRSCont("REPLY_TOPICS_ID") & "&ForumId=" & objRSCont("REPLY_FORUM_ID"),strTmp,"修改")
				strTmp = ""
				strTmp = MakeImg(GBL_strImgDir & "ico/forum_del.gif","删除该回复贴")
				strHtmlMgr = strHtmlMgr & "&nbsp;" & MakeLinkClew("forum/forum_del.asp?action=DelReply&ReplyId=" & objRSCont("REPLY_ID") & "&TopicsId=" & objRSCont("REPLY_TOPICS_ID") & "&ForumId=" & objRSCont("REPLY_FORUM_ID"),strTmp,"删除","onclick=""return confirm('确定删除该回复?')""")

			End If
		Else
			strHtmlMgr = ""
		End If
		
		strTmp = ""
		strTmp = MakeImg(GBL_strImgDir & "ico/User_info.gif style='cursor:hand;' onclick=window.open('" & GBL_strHomeURL & "address/address_userinfo_pop.asp?pstUserId=" & objRSCont("REPLY_OWNER_ID") & "','','left=5,top=5,width=450,height=410,scrollbars=yes,status=yes');" ,"查看用户信息")
		strHtmlCode = "发表:" & objRSCont("REPLY_DATE") & "&nbsp;" & strHtmlMgr & "&nbsp;" & strTmp

		strTmp = MakeImg(GBL_strImgDir & "ico/forum_quote.gif","引用回复该贴")
		strTmp =  MakeLink("forum/forum_add_reply.asp?ACT_MODE=ACT_REPLY_QUOTE&TopicsId=" & objRSCont("REPLY_TOPICS_ID") & "&pstTitle=" & objRSCont("REPLY_TITLE") & "&ForumId=" & objRSCont("REPLY_FORUM_ID") & "&ReplyId=" & objRSCont("REPLY_ID"),strTmp,"引用回复该贴")
		strHtmlCode = strHtmlCode & "&nbsp;" & strTmp

		strTmp = MakeImg(GBL_strImgDir & "ico/User_sms.gif","给" & objRSCont("USER_REALNAME") & "发站内短信")
		strTmp = "<a href='" & GBL_strHomeURL & "sms/sms_add_form.asp?action=FormNewSms&pstReTitle=你好&pstReSenderId=" & objRSCont("USER_ID") & "&pstReSender=" & objRSCont("USER_REALNAME") & "' title='给其发站内短信' target=_blank>" & strTmp & "</a>"
		strHtmlCode = strHtmlCode & "&nbsp;" & strTmp 

		strHtmlCode = strHtmlCode & "<br>&nbsp;&nbsp;" & "<img src='" & GBL_strHomeURL & "images/smile/" & objRSCont("REPLY_FACE") & "' border=0 align=absmiddle> " & "<b>" & objRSCont("REPLY_TITLE") & "</b>"
		
		Response.Write strHtmlCode

		'== for administrator
		If GBL_strUserAuthen = 1 Or GetMaster(objRSCont("REPLY_FORUM_ID")) Then
		
			%>
			<script language=javascript>
			function MasterSelect1<%=k%>(selValue)
			{
				switch (selValue)
				{
					case	'1' :
						if (!confirm("确定删除该回复?"))
							return false;
						else
							document.location.href = '<%=GBL_strHomeURL%>forum/forum_del.asp?action=DelReply&ReplyId=<%=objRSCont("REPLY_ID") & "&TopicsId=" & objRSCont("REPLY_TOPICS_ID") & "&ForumId=" & objRSCont("REPLY_FORUM_ID")%>';
							return true;
					case	'2' :
						if (!confirm("确定修改该回复?"))
							return false;
						else
							document.location.href = '<%=GBL_strHomeURL%>forum/forum_add_reply.asp?pstActFlag=FORUM_EDIT_MODE&ReplyId=<%=objRSCont("REPLY_ID") & "&TopicsId=" & objRSCont("REPLY_TOPICS_ID") & "&ForumId=" & objRSCont("REPLY_FORUM_ID")%>';
							return true;
				}
				return true;
			}
			</script>
			<%
			strSelect1 = "<select name=selMasterMgr" & k & " onChange=MasterSelect1" & k & "(this.options[this.selectedIndex].value);>"
			strSelect1 = strSelect1 & "<option>版主管理</option>"
			strSelect1 = strSelect1 & "<option value='1'>删除回复</option>"
			strSelect1 = strSelect1 & "<option value='2'>修改回复</option>"
			strSelect1 = strSelect1 & "</select>"
		End If
		%>
							</td>
							<td width="*" align=right><%=strSelect1%><font color=#999999><b>第<%=(intCurPage-1)*intMaxPerPage + k%>楼</b></font></td>
						</tr>
						<tr width=100%>
							<td width=100% style="line-height:15pt;" colspan=2>
							<%
								Response.Write "<br>&nbsp;&nbsp;" & UbbCode(objRSCont("REPLY_CONTENT"))
							%>
							</td>
						</tr>
						<%
						'== user sign show
						strHtmlCode = ""
						If Trim(objRSCont("USER_INFO")) <> "" And Trim(objRSCont("USER_INFO")) <> CONST_DIVIDER Then
							arrTmp = Split(objRSCont("USER_INFO"),CONST_DIVIDER)
							If Isarray(arrTmp) Then
								strTmp = UbbCode(arrTmp(0))
								strHtmlCode = "<img src=" & GBL_strHomeURL  & "images/ico/forum_sign.gif><br>" & strTmp
								%>
								<tr width=100% >
									<td width=100% style="line-height:15pt;" colspan=2>
										<%=strHtmlCode%>
									</td>
								</tr>
								<%
							End If
						End If
						%>
					</table>
				</td>
			</tr>
			<!--
			<tr width=100%>
				<td height=1 background='<%=GBL_strHomeURL & GBL_strImgDir%>ShowBoard_line.gif' colspan=2></td>
			</tr>
			-->
<%


		If k >= intMaxPerPage Then Exit Do
			objRSCont.MoveNext
		
	Loop

End Function


Function ShowForumMenu()
	Dim GetRSId,strAddInfo,intErrId,ForumId,strMaster,strHtmlCode,strTmp,strTitle
	GetRSId = Trim(Request.QueryString("TopicsId"))
	strAddInfo = "该文章"
	intErrId = DataCheck("DT_ID",GetRSId,strAddInfo,"")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	ForumId = Trim(Request.QueryString("ForumId"))
	strAddInfo = "该文章所属栏目"
	intErrId = DataCheck("DT_ID",ForumId,strAddInfo,"")
	Call ResultExecute(intErrId,strAddInfo,"ES_ERR")

	'== master
	strMaster =  Replace(GetConfig(Application(GBL_strCookieURL & "FORUM_MASTER_NAME"),"Forum" & ForumId),"|",", ")
	If Trim(strMaster) <> "" Then
		strMaster = " 本版版主:" & strMaster
	Else
		strMaster = " 本版版主:暂无"
	End If

%>
	<table width=<%=DEF_WEB_ScreenWidth%> cellspacing=1 cellpadding=5  class="forum_nav_table">
			<tr>
				<td width=100% align=left colspan=2>
				<%
				If Trim(Request.QueryString("ACT_MODE")) = "ACT_TOPICS_GOOD" Then
						Response.Write ForumMenu(1,"<font color=red>精华区</font>") 
				Else
					Response.Write ForumMenu(1,"查看帖子")
				End If
				%>
				</td>
			</tr>
			<tr>
				<td width="50%" align=left>
				<%
					strHtmlCode = ""
					strTmp = MakeImg(GBL_strImgDir & "ico/forum_add.gif","")
					strHtmlCode = "&nbsp;"&  MakeLink("forum/forum_add_topics.asp?ForumId=" & ForumId,strTmp,"")
					strTmp = MakeImg(GBL_strImgDir & "ico/forum_rly.gif","")
					strHtmlCode = strHtmlCode & "&nbsp;" & MakeLink("forum/forum_add_reply.asp?TopicsId=" & GetRSId & "&pstTitle=" & strTitle & "&ForumId=" & ForumId, strTmp,"")
					Response.Write strHtmlCode
				%>
				</td>
				<td width="*" align=right>
				<%
					Response.Write "<font color=red>" & strMaster & "</font>&nbsp;&nbsp;&nbsp;"	
				%>
				</td>
			</tr>
		</table>
<%
End Function

%>

⌨️ 快捷键说明

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