% sHEImagePath = "common/htmleditor2/" %> <% ' Generic Table Manager (GTM) : gtm.asp ' ' The GTM is a powerful tool that dramatically reduces the time spent in building CREATE, ' UPDATE, DELETE and RETRIEVE screens for database catalogues. Programmers usually don't ' need to work with this file. They need to edit the tabledef.inc file and GTM will do the ' rest. ' ' I will post a Programmer's Reference document of this tool later. ' ' HISTORY AND BUG REVISION ' ------------------------ ' ' I added support of images to GTM. ' ' 1.1.5 (11/12/2002) ' Carlos A. Madrigal ' ' I added the F_UNIQUE flag to control fields with unique values. This enhancement was needed ' to correct an IMM bug. ' ' If you are using this version of GTM with IMM, please add the following line to your IMM ' tabledef.inc file: ' ' ****** SetFieldFlag "mmSubscribers", "Email", F_UNIQUE, True ' ' 1.1.4 (11/06/2002) ' Carlos A. Madrigal ' ' I fixed a bug on the ONE TO MANY control. That caused that some values were marked by ' default even though there weren't records on the table. I also enhaced the error mechanism. ' ' 1.1.3 (11/06/2002) ' Carlos A. Madrigal ' ' I made modifications to GTM to be able to integrate to SBIIA 1.1. ' ' 1.1.2 (07/20/2002) ' Carlos A. Madrigal ' ' NO HISTORY AVAILABLE ' ' 1.1.1 (05/15/2002) ' Carlos A. Madrigal ' ' NO HISTORY AVAILABLE ' ' 1.1.0 (04/24/2002) ' Julio César Martínez ' ' NO HISTORY AVAILABLE ' ' 1.0.0 (11/27/2001) ' Carlos A. Madrigal ' ' Copyright © 1999-2003 Infolink Aplicaciones, S.A. de C.V. ' All rights reserved ' Derechos de Autor © 1999-2003 Infolink Aplicaciones, S.A. de C.V. ' Derechos Reservados. ' '**Start Encode** ' Constants Const F_FIELD_NAME = "FieldName" Const F_VALUE = "Value" Const F_DESC = "Description" Const F_ISKEY = "IsKey?" Const F_USEQUOTES = "UseQuotes?" Const F_INLIST = "InList?" Const F_UPDATABLE = "CanBeUpdated?" Const F_HIDDEN = "IsHidden?" Const F_SEARCHABLE = "IsSearchable?" Const F_NULLABLE = "Nullable" Const F_TYPE = "Type" Const F_TEXT = "Text" Const F_MEMO = "Memo" Const F_NUMBER = "Number" Const F_SELECT = "Select" Const F_VALUESELECT = "ComboFromValue" Const F_VALUEOPTIONS = "OptionsFromValue" Const F_VALUEEMPTY = "SelectNullOrEmpty" Const F_INT = "Integer" Const F_EMAIL = "EMail" Const F_SIZEW = "SizeW" Const F_SIZEH = "SizeH" Const F_SOURCE = "Source" Const F_NEWMSG = "NewMsg" Const F_EDITMSG = "EditMsg" Const F_FILE = "File" Const F_DATE_MMDDYYYY = "Date" Const F_US_PHONE = "USPhone" Const F_BOOL = "Bool" Const F_FILEPATH = "FilePath" Const F_DATAFORMAT = "DataFormat" Const F_TIME_HHMM = "Time" Const F_AUTOGEN = "AutoGenerated" Const F_HTML_FORMAT ="HTMLFormat" Const F_HINTTEXT = "HintText" Const F_TABLELISTTEXT = "TableListText" Const F_RECORDLISTTEXT = "RecordListText" Const F_RECORDEDITTEXT = "RecordEditText" Const F_RECORDLISTORDER = "RecordListOrder" Const F_FILTERBYLANG = "FilterByLang" Const F_ACTIONSALLOWED = "ActionsAllowed" Const F_SECADD = "A" Const F_SECDEL = "D" Const F_SECEDIT = "E" Const F_SECRETR = "R" Const F_SECPICK = "P" Const F_SECALL = "ADERP" Const F_ONETOMANY = "OneToManyRelationship" Const F_MANYVALUES = "ManyValues" Const F_FIELDLEN = "FieldLength" Const F_UNIQUE = "IsThisValueUnique" Const IMAGE_FOLDER = "../images/" Const IMAGE_FOLDER_TRANSFORMED = "images/" ' User-defined variables Dim sGTMMailTo, sGTMSolution, sGTMFontFace, sGTMFontSize, sGTMFieldBG, sGTMSizeW, sGTMSizeH Dim lGTMRecsPerPage Dim sCmd, sPage, sBTUFieldBG Dim dicTables, dicField, sTable, cmdIsSafeToDelete, sQuery, rsStoringDate Dim sProgrammer, sSolution, sData, bIsImage, sFileLookup, sFieldLookup, sFilePath, bShowSearchForm, sDataFormat Dim sTableName, sFieldName, sFields, dicKeyFields, dicWorkFields, lPage, bBOF, bEOF, lRecIndex, iHTMLCounter Dim bEnableErrors %> <% Sub RaiseGTMError(sFunction, sError) If Err.Number <> 0 Then %>
A GTM error has occured
The following function failed: <%=sFunction%>.
The reported error is:
<%=sError%>
| <% If bolDisplayNewEditor Then %> <%Else HTMLEdit sFieldName, "htmlContent" & iHTMLCounter, iControlHt End If%> |
| "
If InStr(1, dicField(F_VALUE), " " & CStr(.Fields(0).Value) & " ") > 0 Then sChecked = " checked" Else sChecked = ""
Response.Write " " & AddFontTag(.Fields(1)) & " " .MoveNext Response.Write " | "
If iCount Mod 2 = 1 Then Response.Write "
| <%HTMLEdit sFieldName, "htmlContent" & iHTMLCounter, 300%> |
" + _
"
") + _
"SQL: " & sLookupSQL & "
Filter: " & SQLCriteria(sFirstField, sFieldData, dicField(F_USEQUOTES), "=") & "