📄 forum_show.asp
字号:
<%
'===================================================================
'= ASP FILENAME : /forum/forum_show.asp
'= CREATED TIME : 2006-5-4
'= LAST MODIFIED: 2006-5-4
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : 浏览帖子
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/customer/include_customer_action_view.asp" -->
<!-- #include file = "../inc/inc_ubb.asp" -->
<!-- #include file = "./class_html_form.asp" -->
<!-- #include file = "../main_func.asp" -->
<!-- #include file = "./forum_func.asp" -->
<!-- #include file = "./forum_inc.asp" -->
<!-- #include file = "./forum_reply_inc.asp" -->
<%
'========================================================
'== Action参数设置
'========================================================
'== 页面名
Const CONST_PAGE_FILE = "forum/forum_show.asp"
'== 页面标题/功能
Const CONST_PAGE_TITLE = "浏览帖子"
'== 功能函数名字空间
Const CONST_ACTION_FUNC = "ShowForumContentCtl"
'== 相对根目录路径
GBL_strHomeURL = "../"
'== 页面构造
Call ActionBuild()
'== 在模板中引用的标签变量
Dim TAG_strVerifyCode '== 表单校验
Dim TAG_objDicUnit '== 单列记录
'== 请求校验与过滤
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)
'== 页面析构
Call ActionOver()
%>
<%
'===================================================================
'= Function : LoadPageTpl()
'= Time : Created At 2006-5-4
'= Description : 加载页面模块
'===================================================================
Function LoadPageTpl()
%>
<!-- #include file = "../template_c/page_forum_cate_list.html.asp" -->
<%
End Function
'===================================================================
'= Function : ShowForumContentCtl()
'= Time : Created At 2006-5-4
'= Input :
'= Description : 浏览帖子
'===================================================================
Function ShowForumContentCtl()
Dim i
Dim clsTable '== the object of table
Dim strHtmlCode,strTmp,strNowTitle,strTitle,strInTitle,intStatus,intSubject,strStatus,strAfterTitle
Dim GetRSId,ForumId,intForbid
If Not ServerDataCheck(arrForumContentDataChk) Then
Exit Function
End If
'== 取得表单值
GetRSId = Trim(Request.QueryString("TopicsId"))
ForumId = Trim(Request.QueryString("ForumId"))
'== 论坛导航条
Call ShowForumMenu()
'== 是否是版主才能访问的论坛栏目
Call CheckMasterForum(ForumId)
'== 更新点击数
Call RecordCounter("CLASS_TOPICS","TOPICS_HITS",1," AND TOPICS_ID=" & GetRSId)
'== get this topic content
GBL_objPubDB.Clear()
GBL_objPubDB.SQLType = "SELECT"
GBL_objPubDB.AllSQL = "SELECT T.TOPICS_ID,T.TOPICS_TITLE,T.TOPICS_FACE,T.TOPICS_SUBJECT,T.TOPICS_GOOD,T.TOPICS_REPLY_FORBID,T.TOPICS_HITS,T.TOPICS_OWNER_ID,T.TOPICS_REPLIES,T.TOPICS_CONTENT,T.TOPICS_DATE,T.TOPICS_STATUS,U.USER_INFO,U.USER_REALNAME,U.USER_ID,U.USER_INFO,U.USER_QQ,U.USER_LAST_TIME,U.USER_NOW_FACE,U.USER_LEVEL,U.USER_FACE_SELECT,U.USER_AUTHEN,U.USER_CLASS,U.USER_ACCOUNT FROM CLASS_TOPICS T,CLASS_USER U WHERE U.USER_ID=T.TOPICS_OWNER_ID AND T.TOPICS_ID=" & GetRSId
If Not GBL_objPubDB.SQLRSExecute() Then
Exit Function
End If
If Not ResultExecute(GBL_objPubDB.intRSNum,"该论坛主题","ES_DB_NO") Then
intForbid = GBL_objPubDB.objPubRS("TOPICS_REPLY_FORBID")
strTitle = GBL_objPubDB.objPubRS("TOPICS_TITLE")
strInTitle = GBL_objPubDB.objPubRS("TOPICS_TITLE")
intStatus = GBL_objPubDB.objPubRS("TOPICS_STATUS")
intSubject = GBL_objPubDB.objPubRS("TOPICS_SUBJECT")
strNowTitle = ""
If intStatus = 0 Then
strStatus = "<font color=red>将该贴置顶</font>"
intStatus = 9
strNowTitle = ""
Else
strStatus = "<font color=red>解除该贴置顶</font>"
intStatus = 0
strNowTitle = "<font color=red>[置顶贴]</font>"
End If
If GBL_objPubDB.objPubRS("TOPICS_STATUS") = 10 Then
strNowTitle = "<font color=red>[公共贴]</font>"
End If
If intSubject > 0 Then
If Not IsEmpty(DEF_FormSubject(ForumId)) Then
If IsArray(DEF_FormSubject(ForumId)) Then
arrNowSub = DEF_FormSubject(ForumId)
If Not IsEmpty(arrNowSub(intSubject-1)) Then
strAfterTitle = "--[" & arrNowSub(intSubject-1) & "]"
End If
End If
End If
Else
strAfterTitle = ""
End If
If GBL_objPubDB.objPubRS("TOPICS_GOOD") = 1 Then
strNowTitle = strNowTitle & "<font color=red>[精华]</font>"
End If
%>
<script>
window.document.title = window.document.title + "----" + "<%=GBL_objPubDB.objPubRS("TOPICS_TITLE")%>";
</script>
<table width="100%" border="0" cellspacing="1" cellpadding="5" align="center" style="word-break:break-all;" class="TBone">
<tr class="TBHead" style="text-align:left">
<td colspan="2" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr width="100%">
<td width="90%" align="left">
<%
strHtmlCode = " <b><img src=""" & GBL_strHomeURL & "images/smile/" & GBL_objPubDB.objPubRS("TOPICS_FACE") & """ border=""0"" align=""absmiddle""> " & strNowTitle & GBL_objPubDB.objPubRS("TOPICS_TITLE") & strAfterTitle & "</b>"
Response.Write strHtmlCode
%>
</td>
<td width="*" align=right><a href="javascript:OpwCollection(1,<%=GBL_objPubDB.objPubRS("TOPICS_ID")%>,'<%=GBL_objPubDB.objPubRS("TOPICS_TITLE")%>');"><img src=<%=GBL_strHomeURL%>images/user/collect.GIF border=0 title='加为收藏' align="absmiddle" width="16" height="16"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr style="word-break:break-all" valign="top">
<td class="TBBG1" width="23%" style="line-height:15pt;">
<%
'== user info show
strHtmlCode = ""
If GBL_objPubDB.objPubRS("USER_FACE_SELECT") = "QQ秀" Then
strHtmlCode = " <a href='" & MakeQQShow(GBL_objPubDB.objPubRS("USER_QQ")) & "' target=_blank><img src='" & MakeQQShow(GBL_objPubDB.objPubRS("USER_QQ")) & "' onload='javascript:DrawImage(this," & "112" & "," & "181" & ",1);' title='点击查看原图' border=0></a>"
Else
strHtmlCode = " " & MakeImg( GBL_objPubDB.objPubRS("USER_NOW_FACE")& " onload='javascript:DrawImage(this," & GBL_strUserFaceWidth & "," & GBL_strUserFaceHeight & ",1);'","")
End If
strHtmlCode = strHtmlCode & "<br> 姓名:" & "<span onclick=window.open('" & GBL_strHomeURL & "address/address_userinfo_pop.asp?intUserId=" & GBL_objPubDB.objPubRS("TOPICS_OWNER_ID") & "','','left=5,top=5,width=450,height=410,scrollbars=yes,status=yes'); style='cursor:hand;'>" & GBL_objPubDB.objPubRS("USER_REALNAME") & "</span>"
strHtmlCode = strHtmlCode & "<br> <img src=" & GBL_strHomeURL & "images/lvstar/level" & ConvertLevel(GBL_objPubDB.objPubRS("USER_LEVEL")) & ".gif align=absmiddle width=110 height=11>"
strHtmlCode = strHtmlCode & "<br> 班级:" & GBL_objPubDB.objPubRS("USER_CLASS")
strHtmlCode = strHtmlCode & "<br> 积分:" & GBL_objPubDB.objPubRS("USER_LEVEL")
strTmp = FormatDateTime(GBL_objPubDB.objPubRS("USER_LAST_TIME"),vbShortDate)
strHtmlCode = strHtmlCode & "<br> 最近:" & Right(strTmp,Len(strTmp)-2)
Dim str
str = GetConfig(Trim(Application(GBL_strCookieURL & "FORUM_MASTER")),"Forum" & ForumId)
If Instr(str,Trim(GBL_objPubDB.objPubRS("USER_ACCOUNT"))) > 0 Then
strHtmlCode = strHtmlCode & "<br> <font color=red>身份:本版版主</font>"
End If
Response.Write strHtmlCode
%>
</td>
<td class="TBBG1" 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
If IsNumeric(GBL_intUserId) Then
If Cint(GBL_intUserId) = Cint(GBL_objPubDB.objPubRS("TOPICS_OWNER_ID")) Then
strTmp = MakeImg(GBL_strImgDir & "ico/forum_edit.gif","修改帖子内容")
strHtmlCode = " " & MakeLink("forum/forum_add_topics.asp?pstActFlag=FORUM_EDIT_MODE&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId,strTmp,"编辑")
strTmp = ""
strTmp = MakeImg(GBL_strImgDir & "ico/forum_del.gif","删除该贴")
strHtmlCode = strHtmlCode & " " & MakeLinkClew("forum/forum_del.asp?action=DelTopics&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId,strTmp,"删除","onclick=""return confirm('确定删除该帖子及其所有回复?')""")
End If
End If
strTmp = ""
strTmp = MakeImg(GBL_strImgDir & "ico/User_info.gif style='cursor:hand;' onclick=window.open('" & GBL_strHomeURL & "address/address_userinfo_pop.asp?intUserId=" & GBL_objPubDB.objPubRS("TOPICS_OWNER_ID") & "','','left=5,top=5,width=450,height=410,scrollbars=yes,status=yes');" ,"查看用户信息")
strHtmlCode = strHtmlCode & " " & strTmp
strTmp = MakeImg(GBL_strImgDir & "ico/forum_quote.gif","回复该贴")
strTmp = MakeLink("forum/forum_add_reply.asp?TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&pstTitle=" & GBL_objPubDB.objPubRS("TOPICS_TITLE") & "&ForumId=" & ForumId,strTmp,"回复该贴")
strHtmlCode = strHtmlCode & " " & strTmp
strTmp = ""
strTmp = MakeImg(GBL_strImgDir & "ico/User_sms.gif","给" & GBL_objPubDB.objPubRS("USER_REALNAME") & "发站内短信")
strTmp = "<a href='" & GBL_strHomeURL & "sms/sms_add_form.asp?action=FormNewSms&pstReTitle=你好&pstReSenderId=" & GBL_objPubDB.objPubRS("USER_ID") & "&pstReSender=" & GBL_objPubDB.objPubRS("USER_REALNAME") & "' title='给其发站内短信' target=_blank>" & strTmp & "</a>"
strHtmlCode = strHtmlCode & " " & strTmp
strHtmlCode = " 发表:" & GBL_objPubDB.objPubRS("TOPICS_DATE") & " 人气:" & GBL_objPubDB.objPubRS("TOPICS_HITS") & " 回复:" & GBL_objPubDB.objPubRS("TOPICS_REPLIES") & strHtmlCode
Response.Write strHtmlCode
'== for administrator operation
Dim strSelect,str2,strClew2,str7,strClew7,strAll,str3,strClew3,str4,strClew4,strForbid,str5,strClew5,str8,strClew8,str6,strClew6,strGood,intMaxPerPage,intCurPage,intTotalPut
strSelect = ""
If GBL_strUserAuthen = 1 Or GetMaster(ForumId) Then
str2 = GBL_strHomeURL & "forum/forum_status.asp?action=MdyTopicsStatus&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&pstStatus=" & intStatus
strClew2 = "确定该帖子置顶或解除置顶?"
'== for all top
If GBL_strUserAuthen = 1 Then
If GBL_objPubDB.objPubRS("TOPICS_STATUS") <> 10 Then
str7 = GBL_strHomeURL & "forum/forum_status.asp?action=MdyTopicsStatus&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ACT_MODE=ACT_ALLTOP&ForumId=" & ForumId & "&pstAllTop=10"
strClew7 = "确定该帖子置顶于所有版面?"
strAll = "置顶于所有版面"
ElseIf GBL_objPubDB.objPubRS("TOPICS_STATUS") = 10 Then
str7 = GBL_strHomeURL & "forum/forum_status.asp?action=MdyTopicsStatus&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ACT_MODE=ACT_ALLTOP&ForumId=" & ForumId & "&pstAllTop=0"
strClew7 = "确定该帖子解除置顶于所有版面?"
strAll = "解除置顶于所有版面"
End If
End If
str3 = GBL_strHomeURL & "forum/forum_add_topics.asp?action=FormAddTopics&pstActFlag=FORUM_EDIT_MODE&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId
strClew3 = "确认修改本帖子?"
If GBL_objPubDB.objPubRS("TOPICS_REPLY_FORBID") = 0 Then
str4 = GBL_strHomeURL & "forum/forum_status.asp?action=MdyTopicsStatus&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&pstForbid=1&ACT_MODE=ACT_FORBID"
strClew4 = "确定该帖子禁止回复?"
strForbid = "设为禁止回复"
Else
str4 = GBL_strHomeURL & "forum/forum_status.asp?action=MdyTopicsStatus&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&pstForbid=0&ACT_MODE=ACT_FORBID"
strClew4 = "确定该帖子打开回复?"
strForbid = "打开帖子回复"
End If
str5 = GBL_strHomeURL & "forum/forum_move.asp?action=FormTopicsMove&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&pstTitle=" & GBL_objPubDB.objPubRS("TOPICS_TITLE")
strClew5 = "确定移动该帖子到别的论坛?"
str8 = GBL_strHomeURL & "forum/forum_move.asp?action=FormTopicsMove&ACT_MODE=ACT_SUJECT_MODE&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&pstTitle=" & GBL_objPubDB.objPubRS("TOPICS_TITLE")
strClew8 = "确定把该贴放入专题?"
If GBL_objPubDB.objPubRS("TOPICS_GOOD") = 1 Then
str6 = GBL_strHomeURL & "forum/forum_good.asp?action=SetTopicsGood&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&ACT_MODE=ACT_UN_GOOD"
strClew6 = "确定将该帖解除精华?"
strGood = "解除精华状态"
Else
str6 = GBL_strHomeURL & "forum/forum_good.asp?action=SetTopicsGood&TopicsId=" & GBL_objPubDB.objPubRS("TOPICS_ID") & "&ForumId=" & ForumId & "&ACT_MODE=ACT_SET_GOOD"
strClew6 = "确定将该帖设为精华?"
strGood = "将本贴设为精华"
End If
%>
<script language=javascript>
function MasterSelect(selValue)
{
switch (selValue)
{
case '1' :
if (!confirm("确定删除该帖子及其所有回复?"))
return false;
else
document.location.href = '<%=GBL_strHomeURL%>forum/forum_del.asp?action=DelTopics&TopicsId=<%=GBL_objPubDB.objPubRS("TOPICS_ID")%>&ForumId=<%=ForumId%>';
return true;
case '2' :
if (!confirm("<%=strClew2%>"))
return false;
else
document.location.href = '<%=str2%>';
return true;
case '3' :
if (!confirm("<%=strClew3%>"))
return false;
else
document.location.href = '<%=str3%>';
return true;
case '4' :
if (!confirm("<%=strClew4%>"))
return false;
else
document.location.href = '<%=str4%>';
return true;
case '5' :
if (!confirm("<%=strClew5%>"))
return false;
else
document.location.href = '<%=str5%>';
return true;
case '6' :
if (!confirm("<%=strClew6%>"))
return false;
else
document.location.href = '<%=str6%>';
return true;
case '7' :
if (!confirm("<%=strClew7%>"))
return false;
else
document.location.href = '<%=str7%>';
return true;
case '8' :
if (!confirm("<%=strClew8%>"))
return false;
else
document.location.href = '<%=str8%>';
return true;
}
return true;
}
</script>
<%
strSelect = "<select name=selMasterMgr onChange=MasterSelect(this.options[this.selectedIndex].value);>"
strSelect = strSelect & "<option>版主管理</option>"
strSelect = strSelect & "<option value='1'>删除该贴</option>"
strSelect = strSelect & "<option value='2'>" & strStatus & "</option>"
If GBL_strUserAuthen = 1 Then
strSelect = strSelect & "<option value='7'>" & strAll & "</option>"
End If
strSelect = strSelect & "<option value='3'>修改该贴内容</option>"
strSelect = strSelect & "<option value='4'>" & strForbid & "</option>"
strSelect = strSelect & "<option value='5'>移动该贴</option>"
strSelect = strSelect & "<option value='6'>" & strGood & "</option>"
'strSelect = strSelect & "<option value='8'>添加到专题</option>"
strSelect = strSelect & "</select>"
End If
%>
</td>
<td width="*" align="right"><%=strSelect%><font color="#999999"><b>楼主</b></font></td>
</tr>
<tr width="100%">
<td width="100%" style="line-height:15pt;" colspan="2">
<%
Response.Write "<br> " & UbbCode(GBL_objPubDB.objPubRS("TOPICS_CONTENT"))
If GBL_objPubDB.objPubRS("TOPICS_REPLY_FORBID") = 1 Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -