www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > meet/meet_joinlist_pop.asp

    <%
'===================================================================
'= ASP FILENAME	: /meet/meet_joinlist_pop.asp
'= CREATED TIME : Feb,10,2004
'= LAST MODIFIED: Feb,10,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 = "./meet_inc.asp" -->
<!-- #include file = "../inc/logic/logic_meet.asp" -->

<%
'========================================================
'==   Action参数设置
'========================================================
'== 页面名
Const CONST_PAGE_FILE	= "meet/meet_joinlist_pop.asp"

'== 页面标题/功能
Const CONST_PAGE_TITLE	= "聚会报名表"

'== 功能函数名字空间
Const CONST_ACTION_FUNC	= "ShowJoinListPopCtl"

'== 相对根目录路径 
GBL_strHomeURL			= "../"

'== 页面构造
Call ActionBuild()

'== 在模板中引用的标签变量
Dim TAG_strVerifyCode	'== 表单校验
Dim TAG_strPageNav		'== 翻页导航


'== 请求校验与过滤
Call ActionFilter(CONST_PAGE_FILE,CONST_ACTION_FUNC)
 

'== 页面析构
Call ActionOver()
%>

<%
''===================================================================
'= Function    : LoadPageTpl()
'= Time		   : Created At 2006-5-7
'= Description : 加载页面模块
'==================================================================='
Function LoadPageTpl()
%>
	<!-- #include file = "../template_c/page_meet_join_pop.html.asp" --> 
<%
End Function

'===================================================================
'= Function	   : ShowJoinListPopCtl()
'= Time		   : Created At 2006-5-7
'= Input       : None
'= Description : 聚会报名表
'===================================================================
Function ShowJoinListPopCtl()
	Dim strFileName 
	Dim intMaxPerPage
	Dim strSql
	Dim intCurPage,intTotalPut
	Dim intMeetId,strAddType

	strAddType = Trim(Request.QueryString("pstAddType"))
	If strAddType <> "1" And strAddType <> "2" And strAddType <> "0" Then
		Response.Write "<p align=center>错误:表态类型</p>" 
		Exit Function
	End If

	intMeetId = FmtFormData(Request.QueryString("intMeetId"))

	intMaxPerPage = GBL_intMaxPerPage
	intMaxPerPage = 15

	strFileName = "meet_joinlist_pop.asp?pstAddType=" & strAddType & "&intMeetId=" & intMeetId

	'== 取报名表
	strSql = " AND MEET_JOIN_MEET_ID=" & intMeetId
	If Not GetMeetJoinsLogic(strSql) Then Exit Function
	
	If GBL_objPubDB.intRSNum > 0 Then
		intTotalPut = GBL_objPubDB.intRSNum
		intCurPage = GetCurPage(intMaxPerPage,intTotalPut)

		If intCurPage = 1 Then
			Call ShowContentJoin(GBL_objPubDB.objPubRS,intMaxPerPage,strAddType)
			Call ShowPage2(intTotalPut,intMaxPerPage,intCurPage,strFileName,1)
		Else
			If (intCurPage - 1) * intMaxPerPage < intTotalPut Then
				GBL_objPubDB.objPubRS.Move  (intCurPage - 1) * intMaxPerPage
				Dim BookMark
				BookMark = GBL_objPubDB.objPubRS.BookMark
				Call ShowContentJoin(GBL_objPubDB.objPubRS,intMaxPerPage,strAddType)
				Call ShowPage2(intTotalPut,intMaxPerPage,intCurPage,strFileName,1)
			Else
				intCurPage = 1
				Call ShowContentJoin(GBL_objPubDB.objPubRS,intMaxPerPage,strAddType)
				Call ShowPage2(intTotalPut,intMaxPerPage,intCurPage,strFileName,1)
			End If

		End If
	Else
		Response.Write "<p align=center>目前没有任何人做此表态</p>"
	End If

	GBL_objPubDB.Clear()

End Function
'===================================================================
'= Function    : ShowContentJoin(objRSCont,intMaxPerPage)
'= Time		   : Created At Feb,11,2004
'= Input       : objRSCont	   : rs 
'= Description : Show per meet join people
'===================================================================
Function ShowContentJoin(objRSCont,intMaxPerPage,strShowType)

	Dim i
	Dim clsTable			'== the object of table
	Dim strHtmlCode,strTmp,strTdClass1,strTdClass2,strTdClass3
	
	GBL_cssListTable = GBL_cssListTable
	GBL_cssListTitleTr = ""
	strTdClass1 = GBL_cssListTd
	strTdClass2 = GBL_cssListTdChange

	Set clsTable = New classTable

	'== Set table prameters
	clsTable.Border = "0"
	clsTable.CellPadding = "2"
	clsTable.CellSpacing = "1"
	clsTable.Width = "156"
	clsTable.ClassType = "list_table"
	clsTable.Align = "center"

	clsTable.MakeTable()

	strTdClass1 = "list_change_td align=left "
	strTdClass2 = "list_change_td align=left "
	strTdClass3 = "list_td align=right "

	i = 0
	'== Set table header
	clsTable.AddTitleTr "list_title_tr"
	clsTable.AddTitleTd "姓名","list_title_td","35%"
	clsTable.AddTitleTd "表态时间","list_title_td","65%"

	Do While Not objRSCont.Eof

		i = i + 1
								
		clsTable.AddTr "list_td"
		strHtmlCode = "<span style='cursor:hand;'  onclick=window.open('" & GBL_strHomeURL & "address/address_userinfo_pop.asp?intUserId=" & objRSCont("USER_ID") & "','','left=5,top=5,width=450,height=410,scrollbars=yes,status=yes');>" & objRSCont("MEET_JOIN_OWNER") & "</span>"
		clsTable.AddTd strHtmlCode,strTdClass1
		clsTable.AddTd FormatDateTime(objRSCont("MEET_JOIN_TIME"),2),strTdClass2

		If  GBL_intUserId = Cstr(objRSCont("USER_ID")) Then
			clsTable.AddTr GBL_cssListTr
			clsTable.AddTd "电话",strTdClass3
			clsTable.AddTd objRSCont("MEET_JOIN_CONTACT"),strTdClass2
		End If

		If i >= intMaxPerPage Then Exit Do
		objRSCont.MoveNext
		
	Loop
	
	Select Case strShowType
		Case	"0"	:	Response.Write "◎ 表态参与成员列表 ◎"
		Case	"2"	:	Response.Write "◎ 表态不参与成员列表 ◎"
		Case	"1"	:	Response.Write "◎ 表态正在考虑成员列表 ◎"
	End Select
	clsTable.OutPutTable()
	Response.Write "◎ 点击姓名查看详细信息"
	Set clsTable = Nothing

End Function

'===================================================================
'= Function    : 						ShowPage2(intTotalNumber,intMaxPerPage,intCurrentPage,strFileName,intShowFlag)
'= Time        : Created At May,17,2003
'= Description : Form feed show 
'===================================================================
Function ShowPage2(intTotalNumber,intMaxPerPage,intCurrentPage,strFileName,intShowFlag)
	Dim n
	Dim strAddType		'== 附加传输值
	
	'== 是否有变量传递
	strAddType = Trim(Request.QueryString("pstAddType"))
	strAddType = ""

	If intToTalNumber Mod intMaxPerPage = 0 Then
		n = intToTalNumber \ intMaxPerPage
	Else
		n = intToTalNumber \ intMaxPerPage + 1
	End If
	Response.Write "<table width=156 ><tr align=center><td align=center>"
	Response.Write "<form  action=" & strFileName & "  name=frmGo2 id='frmGo2' >"
	Response.Write "<p align=center>"
	'Response.Write "共" & n & "页&nbsp;"
	If intCurrentPage < 2 Then
		Response.Write "上一页 "
	Else
		Response.Write "<a href=" & strFileName & "&intPageNow=" & intCurrentPage - 1  & strAddType & ">上一页</a>&nbsp;"
	End If
	If n - intCurrentPage < 1 Then
		Response.Write "下一页&nbsp;"
	Else
		Response.Write "<a href=" & strFileName & "&intPageNow=" & (intCurrentPage + 1) & strAddType & ">"
		Response.Write "下一页</a>&nbsp;"
	End If

	If intShowFlag = 1 Then
		Response.Write "<font color=red>" & intCurrentPage & "</font>/" & n & "页"
	End If

	Response.Write "<br>共" & intTotalNumber & "条&nbsp;" & intMaxPerPage & "条/页&nbsp;"

	If intShowFlag <> 1 Then
		Response.Write "<select name=strPageSelect onchange=""document.location.href='" &  strFileName & "&intPageNow=" & "'+document.frmGo2.strPageSelect.options[document.frmGo2.strPageSelect.selectedIndex].value"">" & strAddType 

		For i = 1 To n
			If i = intCurrentPage Then
				Response.Write "<option value=" & i & " selected>第" & i & "页</option>"
			Else
				Response.Write "<option value=" & i & ">第" & i & "页</option>"
			End If
		Next
		Response.Write "</select>"
	End If

	Response.Write "</p></form>"
	Response.Write "</td></tr></table>"

End Function
%>