AspMaker调用的自定义包

源代码在线查看: aspcommon-table.asp

软件大小: 94 K
上传用户: enterjqk
关键词: AspMaker 自定义
下载地址: 免注册下载 普通下载 VIP

相关代码

				
								' Common variables
				sTblVar = TABLE.TblVar
				
				' Config CSS
				If TABLE.TblUseGlobal Then
					sRecPerPageList = ewRecPerPageList(PROJ.RecPerPageList, PROJ.RecPerPage)
					iRecPerPage = PROJ.RecPerPage
					bExportHtml = PROJ.ExportHtml
					bExportWord = PROJ.ExportWord
					bExportExcel = PROJ.ExportExcel
					bExportXml = PROJ.ExportXml
					bExportCsv = PROJ.ExportCsv
					iRecPerRow = PROJ.RecPerRow
					bMultiDelete = PROJ.MultiDelete
					iSortType = PROJ.SortType
					iPagerStyle = PROJ.PagerStyle
					bTopPageLink = PROJ.TopPageLink
					bLinkOnLeft = PROJ.LinkOnLeft
					bInlineDelete = PROJ.InlineDelete
					bShowBlankListPage = PROJ.ShowBlankListPage
				Else
					sRecPerPageList = ewRecPerPageList(TABLE.TblRecPerPageList, TABLE.TblRecPerPage)
					iRecPerPage = TABLE.TblRecPerPage
					bExportHtml = TABLE.TblExportHtml
					bExportWord = TABLE.TblExportWord
					bExportExcel = TABLE.TblExportExcel
					bExportXml = TABLE.TblExportXml
					bExportCsv = TABLE.TblExportCsv
					iRecPerRow = TABLE.TblRecPerRow
					bMultiDelete = TABLE.TblMultiDelete
					iSortType = TABLE.TblSortType
					iPagerStyle = TABLE.TblPagerStyle
					bTopPageLink = TABLE.TblTopPageLink
					bLinkOnLeft = TABLE.TblLinkOnLeft
					bInlineDelete = TABLE.TblInlineDelete
					bShowBlankListPage = TABLE.TblShowBlankListPage
				End If
				
				' No Alternate Color for Multi Column
				If iRecPerRow > 0 Then
					ewCSSTableAltRowClass = ewCSSTableRowClass
				End If
				
				' Config Form
				sFormName = "f" & TABLE.TblVar & CTRL.CtrlID ' Form Name
				sFormNameBasicSearch = "f" & TABLE.TblVar & CTRL.CtrlID & "srch" ' Basic Search Form Name
				If ewCond_DHtmlEditor() Then ' DHtml Editor
					sFormSubmit = ""
					sListFormSubmit = "EW_submitForm(document." & sFormName & ");"
					sButtonType = "button"
					sButtonSubmit = " onClick=""EW_submitForm(this.form);"""
				Else
					sFormSubmit = " onSubmit=""return EW_checkMyForm(this);"""
					sListFormSubmit = "if (EW_checkMyForm(document." & sFormName & ")) document." & sFormName & ".submit();"
					sButtonType = "submit"
					sButtonSubmit = ""
				End If
				If ewCond_HasFileField() Then
					sEncType = " enctype=""multipart/form-data"""
				Else
					sEncType = ""
				End If
				
				' Master Details
				bMasterTableExist = (TABLE.TblMasterTbl  "" And TABLE.TblMasterFld  "" And TABLE.TblDetailFld  "")
				bUserID = ((PROJ.SecType = "Both" Or PROJ.SecType = "Use Table") And (DB.SecuUserIDFld  ""))
				bTableHasUserIDFld = ((bUserID) And (TABLE.TblUserIDFld  ""))
				If bTableHasUserIDFld Then
					Set FIELD = TABLE.Fields(TABLE.TblUserIDFld)
					sTableUserIDFldName = ewFieldName()
				End If
				bParentUserID = (DB.SecuParentUserIDFld  "")
				bMasterTableHasUserIDFld = False
				If bMasterTableExist Then
					Set MASTERTABLE = DB.Tables(TABLE.TblMasterTbl)
					arMasterFlds = Split(TABLE.TblMasterFld, ",")
					arDetailFlds = Split(TABLE.TblDetailFld, ",")
					sMasterFldList = ""
					sDetailFldList = ""
					For i = 0 to UBound(arMasterFlds)
						Set FIELD = MASTERTABLE.Fields(arMasterFlds(i))
						sMasterFldName = ewFieldName()
						Set FIELD = TABLE.Fields(arDetailFlds(i))
						sDetailFldName = ewFieldName()
						If sMasterFldList  "" Then sMasterFldList = sMasterFldList & ","
						sMasterFldList = sMasterFldList & sMasterFldName
						If sDetailFldList  "" Then sDetailFldList = sDetailFldList & ","
						sDetailFldList = sDetailFldList & sDetailFldName
					Next
					arMasterFldNames = Split(sMasterFldList, ",")
					arDetailFldNames = Split(sDetailFldList, ",")
					bMasterTableHasUserIDFld = ((bUserID) And (MASTERTABLE.TblUserIDFld  ""))
				End If
				
				If bMasterTableHasUserIDFld Then
					Set FIELD = MASTERTABLE.Fields(MASTERTABLE.TblUserIDFld)
					sTblUserIDFldName = ewFieldName
					If MASTERTABLE.TblType = "CUSTOMVIEW" Then
						sFromPart = ewSQLPart(MASTERTABLE.TblCustomSQL, "FROM")
					Else
						sFromPart = DB.DBQuoteS & MASTERTABLE.TblName & DB.DBQuoteE
					End If
				End If
				
				' User Level Security
				bUserTable = (PROJ.SecType = "Both" Or PROJ.SecType = "Use Table")
				bStaticUserLevel = bUserTable And (Not DB.UseDynamicUserLevel And DB.SecUserLevelFld  "" And TABLE.TblSecurity  "")
				bDynamicUserLevel = bUserTable And (DB.UseDynamicUserLevel And DB.UserLevelTbl  "" And DB.SecUserLevelFld  "")
				bUserLevel = bStaticUserLevel Or bDynamicUserLevel
				
				' Use SubQuery
				bUseSubQuery = (InStr(UCase(DB.DBDBMSName), "MYSQL") 				##-->
				
				
				
								' Report
				If TABLE.TblType = "REPORT" Then
				##-->
				
				
								End If
				##-->
				
								' Initialize common variables
								For i = 1 to TABLE.Fields.Count
					Set WRKFIELD = TABLE.Fields.Seq(i)
					sFldVar = WRKFIELD.FldVar
					oFldVar = "o" & sFldVar
					sFldOpr = "z_" & Mid(sFldVar, 3)
					sFldCond = "v_" & Mid(sFldVar, 3)
					sFldSrchOpr2 = WRKFIELD.FldSrchOpr2
					If WRKFIELD.FldSrchOpr = "BETWEEN" Then sFldSrchOpr2 = "AND"
					sFldVar2 = "y_" & Mid(sFldVar, 3)
					sFldOpr2 = "w_" & Mid(sFldVar, 3)
					If Not PROJ.OptionExplicit Then
				##-->
				 = Null:  = Null:  = Null
				
				 = Null:  = Null
				
										If WRKFIELD.FldHtmlTag = "FILE" Then
				##-->
				fs_ = 0: fn_ = "": ct_ = ""
				wd_ = 0: ht_ = 0: a_ = ""
										End If
					Else
				##-->
				Dim , , 
				Dim ar_, ari_, lst_, chk_, cbo__js
				
				Dim , , 
				Dim ar_, ari_, lst_, chk_, cbo__js
				
										If WRKFIELD.FldHtmlTag = "FILE" Then
				##-->
				Dim fs_, fn_, ct_,  wd_, ht_, a_
										End If
					End If
				Next
				
				If PROJ.OptionExplicit Then
					If ewCond_HasFileField() Then ' Blob Field Exists
				##-->
				Dim EW_Max_File_Size, oStream
									End If
				##-->
				Dim sSqlWrk, sWhereWrk
				Dim rswrk, datawrk, rowswrk, rowcntwrk
								End If
				##-->
				%>
				
								          (Ctrl.CtrlID = "list" Or Ctrl.CtrlID = "report") Then ##-->
								sExport = Request.QueryString("export") ' Load Export Request
				
				If sExport = "html" Then
					' Printer Friendly
				End If
				
				
				If sExport = "excel" Then
					Response.ContentType = "application/vnd.ms-excel"
					Response.AddHeader "Content-Disposition", "attachment; filename=" & ewTblVar & ".xls"
				End If
				
				
				If sExport = "word" Then
					Response.ContentType = "application/vnd.ms-word"
					Response.AddHeader "Content-Disposition:", "attachment; filename=" & ewTblVar & ".doc"
				End If
				
				
				If sExport = "xml" Then
					Response.ContentType = "text/xml"
					Response.AddHeader "Content-Disposition:", "attachment; filename=" & ewTblVar & ".xml"
				End If
				
				
				If sExport = "csv" Then
					Response.ContentType = "application/csv"
					Response.AddHeader "Content-Disposition:", "attachment; filename=" & ewTblVar & ".csv"
				End If
				
				%>
				
				
							

相关资源