www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > forum/forum_cate.asp
<% '=================================================================== '= ASP FILENAME : /forum/forum_cate.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 = "./forum_func.asp" --> <!-- #include file = "../main_func.asp" --> <!-- #include file = "../inc/logic/logic_forum.asp" --> <% '======================================================== '== Action参数设置 '======================================================== '== 页面名 Const CONST_PAGE_FILE = "forum/forum_cate.asp" '== 页面标题/功能 Const CONST_PAGE_TITLE = "贴吧板块列表" '== 功能函数名字空间 Const CONST_ACTION_FUNC = "ShowCateListCtl" '== 相对根目录路径 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 : ShowCateListCtl() '= Time : Created At 2006-5-4 '= Input : '= Description : 贴吧板块列表 '==================================================================== Function ShowCateListCtl() Dim i,j Dim clsTable '== the object of table Dim strHtmlCode,strTmp Dim strMaster Dim intLastCate,strQuery Dim arrCateName,arrCateId arrCateName = Split(Application(GBL_strCookieURL & "FORUM_CATE_NAME"),"|||") arrCateId = Split(Application(GBL_strCookieURL & "FORUM_CATE_ID"),"|||") intLastCate = 0 If Not GetForumsLogic("") Then Exit Function If Not ResultExecute(GBL_objPubDB.intRSNum,"目前本贴吧区不存在任何分类和栏目","ES_DB_NO") Then Set clsTable = New classTable '== Set table prameters clsTable.Border = "0" clsTable.CellPadding = "5" clsTable.CellSpacing = "1" clsTable.Width = "100%" clsTable.ClassType = "TBone" clsTable.Align = "center" strQuery = Trim(Request("pstAddType")) clsTable.PostFile = "index.asp?strPostName=ShowContentTopics&pstAddType=" clsTable.MakeTable() i = 0 '== Set table header clsTable.AddTitleTr " style='display:none;word-break:break-all' " clsTable.AddTitleTd ""," style='word-break:break-all' ","10%" clsTable.AddTitleTd ""," style='word-break:break-all' ","40%" clsTable.AddTitleTd ""," style='word-break:break-all' ","10%" clsTable.AddTitleTd ""," style='word-break:break-all' ","40%" Do While Not GBL_objPubDB.objPubRS.Eof i = i + 1 If GBL_objPubDB.objPubRS("FORUM_CATE_ID") <> intLastCate Or i = 1 Then Dim n,strCateName For n = Lbound(arrCateId) To UBound(arrCateId) If GBL_objPubDB.objPubRS("FORUM_CATE_ID") = Cint(arrCateId(n)) Then strCateName = arrCateName(n) Exit For End If Next clsTable.AddTr "TBBG1" clsTable.AddTd " ┈┋<b>" & strCateName & "</b>┋┈","HeadFont style='word-break:break-all' colspan=4 " End If clsTable.AddTr "TBBG9" & " style='word-break:break-all' onmouseover=BgChange(this,'TBBG1') onmouseout=BgChange(this,'TBBG9') " If GBL_objPubDB.objPubRS("FORUM_ADMIN_ONLY") = 1 OR GBL_objPubDB.objPubRS("FORUM_READ_ONLY") = 1 Then clsTable.AddTd "<img alt='该贴吧板块为只读状态' src='" & GBL_strHomeURL & GBL_strImgDir & "ico/forum_2.gif' align=absmiddle>","TBBG1" & " valign=center style='word-break:break-all' " Else clsTable.AddTd "<img src='" & GBL_strHomeURL & GBL_strImgDir & "ico/forum_1.gif' align=absmiddle>","TBBG1" & " valign=center style='word-break:break-all' " End If strMaster = Replace(GetConfig(Application(GBL_strCookieURL & "FORUM_MASTER_NAME"),"Forum" & GBL_objPubDB.objPubRS("FORUM_ID")),"|",", ") If Trim(strMaster) <> "" Then strMaster = " 贴吧版主:" & strMaster Else strMaster = " 贴吧版主:暂无" End If strHtmlCode = "<a href='" & GBL_strHomeURL & "forum/forum_list.asp?ForumId=" & GBL_objPubDB.objPubRS("FORUM_ID") & "'>" & MakeImg(GBL_strImgForum & GBL_objPubDB.objPubRS("FORUM_ICO"),"进入" & GBL_objPubDB.objPubRS("FORUM_NAME")) & "</a>" If GBL_objPubDB.objPubRS("FORUM_ADMIN_ONLY") = 1 Then strHtmlCode = "<table border=0 width=100% style='word-break:break-all'><tr width=100% style='word-break:break-all'><td width=20% style='word-break:break-all'>" & strHtmlCode & "</td><td align=left width=80% style='word-break:break-all'>『 " & MakeLink("forum/forum_list.asp?VIEW_MODE=ADMIN_ONLY&ForumId=" & GBL_objPubDB.objPubRS("FORUM_ID"),GBL_objPubDB.objPubRS("FORUM_NAME"),"进入" & GBL_objPubDB.objPubRS("FORUM_NAME")) & " 』<br> " & GBL_objPubDB.objPubRS("FORUM_DES") & "<br> " & MakeImg(GBL_strImgDir & "ico/forum_master.gif","版主") & strMaster & "</td><td align=right valign=top>" Else strHtmlCode = "<table border=0 width=100% style='word-break:break-all'><tr width=100% style='word-break:break-all'><td width=20% style='word-break:break-all'>" & strHtmlCode & "</td><td align=left width=80% style='word-break:break-all'>『 " & MakeLink("forum/forum_list.asp?ForumId=" & GBL_objPubDB.objPubRS("FORUM_ID"),GBL_objPubDB.objPubRS("FORUM_NAME"),"进入" & GBL_objPubDB.objPubRS("FORUM_NAME")) & " 』<br> " & GBL_objPubDB.objPubRS("FORUM_DES") & "<br> " & MakeImg(GBL_strImgDir & "ico/forum_master.gif","版主") & strMaster & "</td><td align=right valign=top>" End If strTmp = MakeImg(GBL_strImgDir & "ico/forum_new.gif","发新帖") strTmp = MakeLink( "forum/forum_add_topics.asp?ForumId=" & GBL_objPubDB.objPubRS("FORUM_ID"),strTmp,"") strHtmlCode = strHtmlCode & strTmp strTmp = MakeImg(GBL_strImgDir & "ico/forum_elite.gif","浏览精华帖") If GBL_objPubDB.objPubRS("FORUM_ADMIN_ONLY") = 1 Then strTmp = MakeLink( "forum/forum_list.asp?VIEW_MODE=ADMIN_ONLY&ForumId=" & GBL_objPubDB.objPubRS("FORUM_ID") & "&ACT_MODE=ACT_TOPICS_GOOD",strTmp,"") Else strTmp = MakeLink( "forum/forum_list.asp?ForumId=" & GBL_objPubDB.objPubRS("FORUM_ID") & "&ACT_MODE=ACT_TOPICS_GOOD",strTmp,"") End If strHtmlCode = strHtmlCode & "<br>" & strTmp strHtmlCode = strHtmlCode & "</td></tr></table>" clsTable.AddTd strHtmlCode,"CSS_TD_LEFT3 style='word-break:break-all' " strHtmlCode = "主题:<br>" & GBL_objPubDB.objPubRS("FORUM_TOPICS") '& "<br>新帖:" & GBL_objPubDB.objPubRS("FORUM_TOPICS") & "<br>总量:" & GBL_objPubDB.objPubRS("FORUM_TOPICS") clsTable.AddTd strHtmlCode,"CSS_TD_LEFT2 style='word-break:break-all' " strHtmlCode = "主题:" & GBL_objPubDB.objPubRS("FORUM_LAST_TOPICS") & "<br>回复:" & GBL_objPubDB.objPubRS("FORUM_LAST_REPLY") & "<br>时间:" & GBL_objPubDB.objPubRS("FORUM_LAST_POST") '== subject Dim Temp,ForumId Temp = "" ForumID = GBL_objPubDB.objPubRS("FORUM_ID") 'If Not IsEmpty(DEF_FormSubject(ForumID)) Then ' If IsArray(DEF_FormSubject(ForumID)) Then ' Temp = Temp & "<font color=red>专题:</font>" ' arrNowSub = DEF_FormSubject(ForumID) ' For n = Lbound(arrNowSub) To Ubound(arrNowSub) ' Temp = Temp & " <img src='" & GBL_strHomeURL & "images/forum/folder.gif' align=absmiddle> <a href='" & GBL_strHomeURL & "forum/forum_list.asp?strPostName=ShowForumList&ForumId=" & ForumID & "&ACT_MODE=ACT_TOPICS_SUBJECT&Subject=" & n+1 & "'>" & arrNowSub(n) & "</a>" ' Next ' End If 'End If clsTable.AddTd strHtmlCode & "<br>" & Temp,"TBBG9 style='word-break:break-all' " intLastCate = GBL_objPubDB.objPubRS("FORUM_CATE_ID") GBL_objPubDB.objPubRS.MoveNext Loop clsTable.OutPutTable() Set clsTable = Nothing End If End Function %>