?? album_list.asp
字號:
<%
''===================================================================
'= ASP FILENAME : /album/album_list.asp
'= CREATED TIME : Feb,08,2004
'= LAST MODIFIED: Feb,08,2004
'= 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 = "../main_func.asp" -->
<!-- #include file = "./album_inc.asp" -->
<!-- #include file = "../inc/logic/logic_album.asp" -->
<%
'========================================================
'== Action參數設置
'========================================================
'== 頁面名
Const CONST_PAGE_FILE = "album/album_list.asp"
'== 頁面標題/功能
Const CONST_PAGE_TITLE = "相冊列表"
'== 功能函數名字空間
Const CONST_ACTION_FUNC = "ShowAllAlbumCtl"
'== 相對根目錄路徑
GBL_strHomeURL = "../"
'== 頁面構造
Call ActionBuild()
'== 在模板中引用的標簽變量
Dim TAG_objDicUnit '== 單列記錄
Dim TAG_strVerifyCode '== 表單校驗
Dim TAG_strPageNav '== 翻頁導航
'== 請求校驗與過濾
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_album_list.html.asp" -->
<%
End Function
''===================================================================
'= Function : ShowAllAlbumCtl()
'= Time : Created At 2006-5-4
'= Input :
'= Description : 相冊列表
'==================================================================='
Function ShowAllAlbumCtl()
Dim strFileName,strSql,strType
Dim intMaxPerPage
Dim intCurPage,intTotalPut
Dim i
'== 取相冊類型
strType = FmtFormData(Request.QueryString("strType"))
strFileName = "album_list.asp?strType=" & strType
intMaxPerPage = 12
TAG_intPerPage = intMaxPerPage
'== 取記錄集
If strType <> "" Then strSql = " AND ALBUM_TYPE='" & strType & "'"
If Not GetAlbumsLogic(strSql) Then Exit Function
If Not ResultExecute(GBL_objPubDB.intRSNum,"該相冊","ES_DB_NO") Then
intTotalPut = GBL_objPubDB.intRSNum
intCurPage = GetCurPage(intMaxPerPage,intTotalPut)
If intCurPage = 1 Then
Call ShowContentAlbum(GBL_objPubDB.objPubRS,intMaxPerPage)
Else
If (intCurPage - 1) * intMaxPerPage < intTotalPut Then
GBL_objPubDB.objPubRS.Move (intCurPage - 1) * intMaxPerPage
Dim BookMark
BookMark = GBL_objPubDB.objPubRS.BookMark
Call ShowContentAlbum(GBL_objPubDB.objPubRS,intMaxPerPage)
Else
intCurPage = 1
Call ShowContentAlbum(GBL_objPubDB.objPubRS,intMaxPerPage)
End If
End If
TAG_strPageNav = ShowPageNav(intTotalPut,intMaxPerPage,intCurPage,strFileName)
End If
End Function
''===================================================================
'= Function : ShowContentAlbum(objRSCont,intMaxPerPage)
'= Time : Created At Nov,09,2003
'= Input : objRSCont : 記錄集
'= intMaxPerPage : 每頁記錄條數
'= Description : Show photo content
'==================================================================='
Function ShowContentAlbum(objRSCont,intMaxPerPage)
Dim clsTable
Dim strHtmlCode,strHtmlCode1
Dim arrTmp
Dim i,intPerCols
Dim intWidth,intHeight
Dim strClass,intPerRows
intPerRows = 3
intWidth = 117
intHeight = 87
strClass = ""
Set clsTable = New classTable
clsTable.Border = "0"
clsTable.CellPadding = "0"
clsTable.CellSpacing = "0"
clsTable.Width = "96%"
clsTable.ClassType = ""
clsTable.Align = "center"
clsTable.MakeTable()
clsTable.AddTitleTr ""
clsTable.AddTitleTd "","",""
clsTable.AddTitleTd "","",""
clsTable.AddTitleTd "","",""
i = 0
'== Make the per photo list's table
strHtmlCode1 = MakeListPhoto()
clsTable.AddTr strClass
Do While Not objRSCont.Eof
strHtmlCode = "相片標題:《" & objRSCont("ALBUM_TITLE") & "》"
strHtmlCode = strHtmlCode & chr(13) & "上 傳 者:" & objRSCont("USER_REALNAME")
strHtmlCode = strHtmlCode & chr(13) & "點 擊 率:" & objRSCont("ALBUM_HITS")
strHtmlCode = strHtmlCode & chr(13) & "評 論 數:" & objRSCont("ALBUM_REVIEW_NUM")
strHtmlCode = strHtmlCode & chr(13) & "上傳時間:" & DateValue(objRSCont("ALBUM_ADD_TIME"))
'== diff the album come from
If objRSCont("ALBUM_STATUS") = 10 Then
strHtmlCode = "<img src='" & objRSCont("ALBUM_IMG_FILE") & "' title='" & strHtmlCode & "' border='0' width=" & intWidth & " height=" & intHeight & " >"
Else
strHtmlCode = "<img src='" & GBL_strHomeURL & GBL_strImgAlbum & objRSCont("ALBUM_IMG_FILE") & "' title='" & strHtmlCode & "' border='0' width=" & intWidth & " height=" & intHeight & " >"
End If
strHtmlCode = MakeLink("album/album_view.asp?intAlbumId=" & objRSCont("ALBUM_ID"),strHtmlCode,"點擊欣賞相片《" & objRSCont("ALBUM_TITLE") & "》")
strHtmlCode = Replace(strHtmlCode1,"[img]",strHtmlCode)
clsTable.AddTd strHtmlCode,strClass
If ((i + 1) Mod intPerRows) = 0 then
clsTable.AddTr strClass
End If
i = i + 1
If i >= intMaxPerPage Then Exit Do
objRSCont.MoveNext
Loop
'== If the photo numbers is low,
If ((i + 1) Mod intPerRows) = 1 Then
clsTable.AddTd "",strClass
clsTable.AddTd "",strClass
ElseIf ((i + 1) Mod intPerRows) = 2 Then
clsTable.AddTd "",strClass
End If
Response.Write "<br>"
clsTable.OutPutTable()
Set clsTable = Nothing
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -