www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > album/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 %>