📄 user_collection.asp
字号:
<%
'===================================================================
'= ASP FILENAME : /user/user_collection.asp
'= CREATED TIME : Oct,08,2004
'= LAST MODIFIED: Oct,08,2004
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : show user collection
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/inc_class_def.asp" -->
<!-- #include file = "../inc/inc_db_func.asp" -->
<!-- #include file = "../class/class_db.asp" -->
<!-- #include file = "../inc/inc_pub_func.asp" -->
<!-- #include file = "../inc/inc_ubb.asp" -->
<!-- #include file = "../inc/inc_data_check.asp" -->
<!-- #include file = "../class/class_html_form.asp" -->
<!-- #include file = "../class/class_html_table.asp" -->
<!-- #include file = "../main_func.asp" -->
<!-- #include file = "./user_inc.asp" -->
<!-- #include file = "../js/comm_func.js" -->
<%
Const CONST_PAGE_FILE = "user/user_collection.asp"
GBL_strHomeURL = "../"
Dim clsPubDB
Set clsPubDB = New classDBOprt
Call SiteHead("我的收藏")
Call ExecOrShowSwitch(CONST_PAGE_FILE,"UL")
Set clsPubDB = Nothing
%>
<%
'===================================================================
'= Sub : ShowUserCollection()
'= Time : Created At Oct,08,2004
'= Input : None
'= Called by :
'= Calls :
'= Description : Show user's collection at web
'===================================================================
Sub ShowUserCollection()
Dim strAct
strAct = Trim(Request.QueryString("ACT_MODE"))
Select Case strAct
Case "ACT_FRIEND" :
Response.Write "<p align=left> <img src=" & GBL_strHomeURL & "images/new/myfriend.gif border=0></p>"
Call ShowUserFriend()
Case "ACT_TOPICS" :
Response.Write "<p align=left> <img src=" & GBL_strHomeURL & "images/new/mygoodtopics.gif border=0></p>"
Call ShowUserTopics()
Case "ACT_ALBUM" :
Response.Write "<p align=left> <img src=" & GBL_strHomeURL & "images/new/mygoodalbum.gif border=0></p>"
Call ShowUserAlbum()
Case else :
Response.Write "<p align=left> <img src=" & GBL_strHomeURL & "images/new/myfriend.gif border=0></p>"
Call ShowUserFriend()
End Select
End Sub
'============== End of Sub ShowUserCollection() ====================
'===================================================================
'= Sub : ShowContentTopics(objRSCont,intMaxPerPage)
'= Time : Created At Jan,29,2004
'= Input : objRSCont : rs
'= intMaxPerPage :
'= Called by :
'= Calls :
'= Table : Qurey CLASS_TOPICS,
'= Description : Show per topics
'===================================================================
Sub ShowContentTopics(objRSCont,intMaxPerPage)
Dim i
Dim clsTable '== the object of table
Dim strHtmlCode,strTmp,strNowTitle
strNowTitle = ""
Set clsTable = New classTable
'== Set table prameters
clsTable.Border = "0"
clsTable.CellPadding = "2"
clsTable.CellSpacing = "1"
clsTable.Width = "98%"
clsTable.ClassType = "CSS_TR4 style='background-color:#E0DCD3' "
clsTable.Align = "center"
strQuery = Trim(Request("pstAddType"))
clsTable.PostFile = "user_info_active.asp?action=ShowContentTopics&pstAddType="
clsTable.MakeTable()
i = 0
'== Set table header
clsTable.AddTitleTr GBL_cssFormTitleTd
clsTable.AddTitleTd "ID",GBL_cssListTd2,"5%"
clsTable.AddTitleTd "主 题",GBL_cssListTd2,"40%"
clsTable.AddTitleTd "版 面",GBL_cssListTd2,"12%"
clsTable.AddTitleTd "回复/人气",GBL_cssListTd2,"12%"
clsTable.AddTitleTd "最后更新 | 回复人",GBL_cssListTd2,""
clsTable.AddTitleTd "删",GBL_cssListTd2,"5%"
Do While Not objRSCont.Eof
i = i + 1
clsTable.AddTr GBL_cssListTitleTr & " onmouseover=BgChange(this,'CSS_TD_CENTER2') onmouseout=BgReset(this,'CSS_TD_CENTER1') "
Select Case objRSCont("TOPICS_STATUS")
Case 0 : strHtmlCode = MakeImg(GBL_strImgIco & "forum_comm.gif","编号" & objRSCont("TOPICS_ID"))
strNowTitle = ""
If objRSCont("TOPICS_REPLY_FORBID") = 1 Then
strHtmlCode = MakeImg(GBL_strImgIco & "forum_forbid.gif","编号" & objRSCont("TOPICS_ID"))
ElseIf objRSCont("TOPICS_REPLIES") > 10 Or objRSCont("TOPICS_HITS") > 30 Then
strHtmlCode = MakeImg(GBL_strImgIco & "forum_hot.gif","编号" & objRSCont("TOPICS_ID"))
End If
Case 9 : strHtmlCode = MakeImg(GBL_strImgIco & "forum_top.gif","编号" & objRSCont("TOPICS_ID"))
strNowTitle = "[置顶贴]"
Case 10 : strHtmlCode = MakeImg(GBL_strImgIco & "forum_alltop.gif","编号" & objRSCont("TOPICS_ID"))
strNowTitle = "[公共贴]"
Case else : strHtmlCode = "不正常"
End Select
clsTable.AddTd strHtmlCode,GBL_cssListTd2
strTmp = ""
If Instr(objRSCont("TOPICS_CONTENT"),"[IMG]") > 0 And Instr(objRSCont("TOPICS_CONTENT"),"[/IMG]") > 0 Then
strTmp = MakeImg(GBL_strImgIco & "forum_img.gif","")
End If
If Instr(objRSCont("TOPICS_CONTENT"),"[RM") > 0 And Instr(objRSCont("TOPICS_CONTENT"),"[/RM]") > 0 Then
strTmp = MakeImg(GBL_strImgIco & "forum_rm.gif","")
End If
strHtmlCode = "<a href='" & GBL_strHomeURL & "forum/forum_show.asp?action=ShowForumContent&TopicsId=" & objRSCont("TOPICS_ID") & "&ForumId=" & objRSCont("TOPICS_FORUM_ID") & "' title='浏览该贴子' target=_blank><font color=red>" & strNowTitle & "</font>" & objRSCont("TOPICS_TITLE") & "</a>"
clsTable.AddTd " " & strHtmlCode,"CSS_TD_LEFT3"
clsTable.AddTd objRSCont("FORUM_NAME"),GBL_cssListTd2
clsTable.AddTd objRSCont("TOPICS_REPLIES") & "/" & objRSCont("TOPICS_HITS"),"CSS_TD_CENTER3"
strTmp = FormatDateTime(objRSCont("TOPICS_LAST_POST"),vbShortDate)
strTmp = Right(strTmp,Len(strTmp) - 2)
strTmp = strTmp & " " & FormatDateTime(objRSCont("TOPICS_LAST_POST"),vbShortTime)
If Day(objRSCont("TOPICS_LAST_POST")) = Day(now) Then
strTmp = "<font color=red>" & strTmp & "</font>"
End If
clsTable.AddTd " " & strTmp & " | " & objRSCont("TOPICS_LAST_POSTER"),"CSS_TD_LEFT2"
clsTable.AddTd "<a href='" & GBL_strHomeURL & "user/user_collection.asp?action=DelCollection&pstType=1&OID=" & objRSCont("TOPICS_ID") & "' onclick=""return confirm('您确认删除该记录?')""><font color=red>删</font></a>","CSS_TD_CENTER2"
If i >= intMaxPerPage Then Exit Do
objRSCont.MoveNext
Loop
clsTable.OutPutTable()
Response.Write "<br>"
Set clsTable = Nothing
End Sub
'=============== End of Sub ShowContentTopics() ====================
'===================================================================
'= Sub : ShowUserTopics()
'= Time : Created At June,29,2004
'= Input : None
'= Called by :
'= Calls :
'= Table : Qurey CLASS_TOPICS,
'= Description : show forum topics list
'===================================================================
Sub ShowUserTopics()
Dim strFileName
Dim intMaxPerPage
Dim strHtmlCode
Dim intCurPage,intTotalPut
Dim i
Dim intClass,GetRSId
intMaxPerPage = GBL_intMaxPerAddress
intMaxPerPage = 20
If Not IsEmpty(Request("intPageNow")) Then
intCurPage = Cint(Request("intPageNow"))
Else
intCurPage = 1
End If
strFileName = GBL_strHomeURL & "user/user_collection.asp?action=ShowUserCollection&ACT_MODE=ACT_TOPICS"
clsPubDB.Clear()
clsPubDB.AllSQL = "SELECT TOPICS_LAST_POSTER,TOPICS_LAST_POST,TOPICS_REPLY_FORBID,FORUM_NAME,TOPICS_FORUM_ID,TOPICS_CONTENT,TOPICS_OWNER,TOPICS_TITLE,TOPICS_ID,TOPICS_STATUS,TOPICS_HITS,TOPICS_REPLIES FROM CLASS_TOPICS,CLASS_FORUM WHERE TOPICS_ID IN (SELECT COLLECTION_OID FROM CLASS_COLLECTION WHERE COLLECTION_OWNER_ID=" & GBL_intUserId & " AND COLLECTION_TYPE=1) AND TOPICS_FORUM_ID=FORUM_ID ORDER BY TOPICS_STATUS DESC,TOPICS_FORUM_ID DESC,TOPICS_LAST_POST DESC"
'== Get data
clsPubDB.SQLRSExecute()
Call ResultExecute(clsPubDB.intErrNum,"show user topics list"&clspubdb.returnsql,"ES_ERR")
If clsPubDB.intRSNum > 0 Then
intTotalPut = clsPubDB.intRSNum
If intCurPage < 1 then
intCurPage = 1
End If
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 ShowContentTopics(clsPubDB.objPubRS,intMaxPerPage)
Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
Else
If (intCurPage - 1) * intMaxPerPage < intTotalPut Then
clsPubDB.objPubRS.Move (intCurPage - 1) * intMaxPerPage
Dim BookMark
BookMark = clsPubDB.objPubRS.BookMark
Call ShowContentTopics(clsPubDB.objPubRS,intMaxPerPage)
Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
Else
intCurPage = 1
Call ShowContentTopics(clsPubDB.objPubRS,intMaxPerPage)
Call ShowPage(intTotalPut,intMaxPerPage,intCurPage,strFileName)
End If
End If
Else
Response.Write "<p align=center>目前没有任何好帖收集</p>"
End If
clsPubDB.Clear()
End Sub
'=============== End of Sub ShowUserTopics() ========================
'===================================================================
'= Sub : ShowUserFriend()
'= Time : Created At June,29,2004
'= Input : None
'= Called by :
'= Calls :
'= Table : Qurey CLASS_TOPICS,
'= Description : show forum topics list
'===================================================================
Sub ShowUserFriend()
Dim strFileName
Dim intMaxPerPage
Dim strHtmlCode
Dim intCurPage,intTotalPut
Dim i
Dim intClass,GetRSId
intMaxPerPage = GBL_intMaxPerAddress
intMaxPerPage = 20
If Not IsEmpty(Request("intPageNow")) Then
intCurPage = Cint(Request("intPageNow"))
Else
intCurPage = 1
End If
strFileName = GBL_strHomeURL & "user/user_collection.asp?action=ShowUserCollection&ACT_MODE=ACT_FRIEND"
clsPubDB.Clear()
clsPubDB.AllSQL = "SELECT USER_ACCOUNT,USER_ID,USER_REALNAME,USER_LOGIN_COUNT,USER_ADD_DATE FROM CLASS_USER,CLASS_COLLECTION WHERE COLLECTION_OID=USER_ID AND COLLECTION_TYPE=0 AND COLLECTION_OWNER_ID=" & GBL_intUserId
'== Get data
clsPubDB.SQLRSExecute()
Call ResultExecute(clsPubDB.intErrNum,"show user friends list"&clspubdb.returnsql,"ES_ERR")
If clsPubDB.intRSNum > 0 Then
intTotalPut = clsPubDB.intRSNum
If intCurPage < 1 then
intCurPage = 1
End If
If (intCurPage - 1) * intMaxPerPage > intTotalPut Then
If (intTotalPut Mod intMaxPerPage) = 0 Then
intCurPage = intTotalPut \ intMaxPerPage
Else
intCurPage = intTotalPut \ intMaxPerPage + 1
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -