Constants.php 48.2 KB
Newer Older
1
2
3
4
5
6
7
8
<?php
/**
 * Created by PhpStorm.
 * User: crose
 * Date: 1/1/16
 * Time: 8:35 PM
 */

9
const EXT_KEY = 'qfq';
10
const CONFIG_INI = "config.qfq.ini";  // QFQ configuration file: db access
Carsten  Rose's avatar
Carsten Rose committed
11

12
const GFX_INFO = 'typo3conf/ext/qfq/Resources/Public/icons/note.gif';
13
const API_DIR = 'typo3conf/ext/qfq/qfq/api';
14

Carsten  Rose's avatar
Carsten Rose committed
15
16
const QFQ_LOG = 'qfq.log';

17
18
const MAX_LENGTH_IPV6 = 45;

19
const SESSION_LIFETIME_SECONDS = 86400;
20
const SESSION_NAME = 'qfq';
21
22
23
const SESSION_FE_USER_UID = 'feUserUid';
const SESSION_FE_USER = 'feUser';
const SESSION_FE_USER_GROUP = 'feUserGroup';
24

Carsten  Rose's avatar
Carsten Rose committed
25
26
27
const TABLE_NAME_FORM = 'Form';
const TABLE_NAME_FORM_ELEMENT = 'FormElement';

28
29
const FORM_LOAD = 'form_load';
const FORM_SAVE = 'form_save';
Carsten  Rose's avatar
Carsten Rose committed
30
const FORM_UPDATE = 'form_update';
31
const FORM_DELETE = 'form_delete';
32
33
34
35
36
const FORM_PERMISSION_SIP = 'sip';
const FORM_PERMISSION_LOGGED_IN = 'logged_id';
const FORM_PERMISSION_LOGGED_OUT = 'logged_out';
const FORM_PERMISSION_ALWAYS = 'always';
const FORM_PERMISSION_NEVER = 'never';
37
38
const FORM_BUTTON_NEW = 'new';
const FORM_BUTTON_DELETE = 'delete';
39
40
const FORM_BUTTON_CLOSE = 'close';
const FORM_BUTTON_SAVE = 'save';
41

42
43
const F_BS_COLUMNS = 'bsColumns';

44
45
46
47
const F_BS_LABEL_COLUMNS = 'bsLabelColumns';
const F_BS_INPUT_COLUMNS = 'bsInputColumns';
const F_BS_NOTE_COLUMNS = 'bsNoteColumns';

48
49
const RETURN_URL = 'return_url';
const RETURN_SIP = 'return_sip';
50
const RETURN_ARRAY = 'return_array';
51

Carsten  Rose's avatar
Carsten Rose committed
52
53
const SQL_FORM_ELEMENT_SPECIFIC_CONTAINER = "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.feIdContainer = ? AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
const SQL_FORM_ELEMENT_ALL_CONTAINER = "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
54
const SQL_FORM_ELEMENT_SIMPLE_ALL_CONTAINER = "SELECT fe.id, fe.feIdContainer, fe.name, fe.label, fe.type, fe.encode, fe.checkType, fe.checkPattern, fe.mode, fe.modeSql, fe.parameter, fe.dynamicUpdate FROM FormElement AS fe, Form AS f WHERE f.name = ? AND f.id = fe.formId AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
Carsten  Rose's avatar
Carsten Rose committed
55
const SQL_FORM_ELEMENT_CONTAINER_TEMPLATE_GROUP = "SELECT fe.id, fe.name, fe.label, fe.maxLength, fe.parameter FROM FormElement AS fe, Form AS f WHERE f.name = ? AND f.id = fe.formId AND fe.deleted = 'no' AND fe.class = 'container' AND fe.type='templateGroup' AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
56
57
58
const SQL_FORM_ELEMENT_TEMPLATE_GROUP_FE_ID = "SELECT * FROM FormElement AS fe WHERE fe.id = ? AND fe.deleted = 'no' AND fe.class = 'container' AND fe.type='templateGroup' AND fe.enabled='yes' ";
const SQL_FORM_ELEMENT_NATIVE_TG_COUNT = "SELECT fe.*, IFNULL(feTg.maxLength,0) AS _tgCopies FROM FormElement AS fe LEFT JOIN FormElement AS feTg ON fe.feIdContainer=feTg.id AND feTg.deleted = 'no' AND feTg.class = 'container' AND feTg.type='templateGroup' AND feTg.enabled='yes' WHERE fe.formId = ? AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes'";

Carsten  Rose's avatar
Carsten Rose committed
59
const NAME_TG_COPIES = '_tgCopies';  // Number of templatesGroup copies to create on the fly. Also used in SQL_FORM_ELEMENT_NATIVE_TG_COUNT.
60
const FE_TG_INDEX = '_tgIndex'; // Index of the current copy of a templateGroup FE.
61

Carsten  Rose's avatar
Carsten Rose committed
62
63
64
// SANITIZE Classifier
const SANITIZE_ALLOW_ALNUMX = "alnumx";
const SANITIZE_ALLOW_DIGIT = "digit";
65
const SANITIZE_ALLOW_NUMERICAL = "numerical";
66
const SANITIZE_ALLOW_EMAIL = "email";
67
68
69
const SANITIZE_ALLOW_MIN_MAX = "min|max";
const SANITIZE_ALLOW_MIN_MAX_DATE = "min|max date";
const SANITIZE_ALLOW_PATTERN = "pattern";
Carsten  Rose's avatar
Carsten Rose committed
70
const SANITIZE_ALLOW_ALLBUT = "allbut";
Carsten  Rose's avatar
Carsten Rose committed
71
72
const SANITIZE_ALLOW_ALL = "all";
const SANITIZE_DEFAULT = SANITIZE_ALLOW_DIGIT;
73

74
75
const SANITIZE_EXCEPTION = 'exception';
const SANITIZE_EMPTY_STRING = 'empty string';
76

77
78
79
80
81
82
// Index wrap setup table
const WRAP_SETUP_TITLE = 'title';
const WRAP_SETUP_ELEMENT = 'element';
const WRAP_SETUP_LABEL = 'label';
const WRAP_SETUP_INPUT = 'input';
const WRAP_SETUP_NOTE = 'note';
83
const WRAP_SETUP_SUBRECORD = 'subrecord';
84
const WRAP_SETUP_IN_FIELDSET = 'inFieldset';
85
const WRAP_SETUP_IN_TEMPLATE_GROUP = 'inTemplateGroup';
86
const WRAP_SETUP_START = 'start';
87
const WRAP_SETUP_CLASS = 'class';
88
89
const WRAP_SETUP_END = 'end';

90
91
92
// dbQuerySimple
const ROW_REGULAR = "regular";
const ROW_IMPLODE_ALL = "implode_all";
93
94
95
96
const ROW_EXPECT_0 = "expect_0";
const ROW_EXPECT_1 = "expect_1";
const ROW_EXPECT_0_1 = "expect_0_1";
const ROW_EXPECT_GE_1 = "expect_ge_1";
97
const ROW_KEYS = "keys";
98

99
// KeyValueParser
100
101
const KVP_IF_VALUE_EMPTY_COPY_KEY = 'if_value_empty_copy_key';
const KVP_VALUE_GIVEN = 'value_given';
102

103
// QFQ Error Codes
Carsten  Rose's avatar
Carsten Rose committed
104
const ERROR_UNKNOW_SANITIZE_CLASS = 1001;
105

106
const ERROR_CODE_SHOULD_NOT_HAPPEN = 1003;
107
108
const ERROR_SIP_MALFORMED = 1005;
const ERROR_SIP_INVALID = 1006;
109
const ERROR_MISSING_RECORD_ID = 1007;
110
const ERROR_IN_SQL_STATEMENT = 1008;
111
const ERROR_MISSING_REQUIRED_PARAMETER = 1009;
112

113
114
115
116
117
const ERROR_BROKEN_PARAMETER = 1011;
const ERROR_FE_USER_UID_CHANGED = 1012;
const ERROR_SIP_NOT_FOUND = 1013;
const ERROR_SIP_NOT_ALLOWED_AS_PARAM = 1014;
const ERROR_SIP_NEEDED_FOR_THIS_FORM = 1015;
Carsten  Rose's avatar
Carsten Rose committed
118
119
120
121
const ERROR_SIP_EXIST_BUT_OTHER_PARAM_GIVEN_BY_CLIENT = 1016;
const ERROR_USER_NOT_LOGGED_IN = 1017;
const ERROR_USER_LOGGED_IN = 1018;
const ERROR_FORM_FORBIDDEN = 1019;
122
const ERROR_FORM_UNKNOWN_PERMISSION_MODE = 1020;
Carsten  Rose's avatar
Carsten Rose committed
123
const ERROR_MULTI_SQL_MISSING = 1021;
124

Carsten  Rose's avatar
Carsten Rose committed
125
const ERROR_RECURSION_TOO_DEEP = 1023;
126
const ERROR_CHECKBOXMODE_UNKNOWN = 1024;
127
const ERROR_MISSING_SQL1 = 1025;
128
const ERROR_CHECKBOX_EQUAL = 1026;
129
const ERROR_MISSING_ITEM_LIST = 1027;
130
const ERROR_UNKNOWN_FORM_RENDER = 1028;
Carsten  Rose's avatar
Carsten Rose committed
131
const ERROR_NAME_LABEL_EMPTY = 1029;
132

Carsten  Rose's avatar
Carsten Rose committed
133
const ERROR_DEBUG = 1031;
134
135
136
const ERROR_UNKNOWN_MODE = 1032;
const ERROR_NOT_IMPLEMENTED = 1033;
const ERROR_RESERVED_KEY_NAME = 1034;
137

138
const ERROR_UNKNOWN_FORWARD_MODE = 1036;
139

Carsten  Rose's avatar
Carsten Rose committed
140
const ERROR_MISSING_HIDDEN_FIELD_IN_SIP = 1038;
141

Carsten  Rose's avatar
Carsten Rose committed
142
143
144
145
146
147
148
149
150
const ERROR_MISSING_MIN_MAX = 1040;
const ERROR_MIN_MAX_VIOLATION = 1041;
const ERROR_UNKNOWN_CHECKTYPE = 1042;
const ERROR_PATTERN_VIOLATION = 1043;
const ERROR_RECORDID_0_FORBIDDEN = 1044;
const ERROR_LOG_NOT_WRITABLE = 1045;
const ERROR_UNNOWN_STORE = 1046;
const ERROR_GET_STORE_ZERO = 1047;
const ERROR_SET_STORE_ZERO = 1048;
151
const ERROR_INVALID_OR_MISSING_PARAMETER = 1050;
152
const ERROR_UNKNOWN_SQL_LOG_MODE = 1051;
Carsten  Rose's avatar
Carsten Rose committed
153
const ERROR_FORM_NOT_FOUND = 1052;
154
const ERROR_DATE_TIME_FORMAT_NOT_RECOGNISED = 1053;
155
const ERROR_SANATIZE_INVALID_VALUE = 1054;
156
const ERROR_REQUIRED_VALUE_EMPTY = 1055;
157
const ERROR_DATE_UNEXPECTED_FORMAT = 1056;
158
const ERROR_UNEXPECTED_TYPE = 1057;
159
const ERROR_NOT_APPLICABLE = 1058;
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
const ERROR_FORMELEMENT_TYPE = 1059;
const ERROR_MISSING_OPEN_DELIMITER = 1060;
const ERROR_MISSING_CLOSE_DELIMITER = 1061;
const ERROR_EXPECTED_ARRAY = 1062;
const ERROR_REPORT_FAILED_ACTION = 1063;
const ERROR_MISSING_MESSAGE_FAIL = 1064;
const ERROR_MISSING_TABLE_NAME = 1065;
const ERROR_MISSING_TABLE = 1066;
const ERROR_RECORD_NOT_FOUND = 1067;
const ERROR_INVALID_EDITOR_PROPERTY_NAME = 1068;
const ERROR_UNKNOWN_ESCAPE_MODE = 1069;
const ERROR_MISSING_CONFIG_INI_VALUE = 1070;
const ERROR_SENDMAIL = 1071;
const ERROR_SENDMAIL_MISSING_VALUE = 1072;
const ERROR_OVERWRITE_RECORD_ID = 1073;
175
const ERROR_MISSING_SLAVE_ID_DEFINITION = 1074;
176
const ERROR_MISSING_INTL = 1075;
177
const ERROR_HTML_TOKEN_TOO_SHORT = 1076;
178
const ERROR_MISSING_PRINTF_ARGUMENTS = 1077;
179
const ERROR_MISSING_DEFINITON = 1078;
180
const ERROR_QFQ_VERSION = 1079;
Carsten  Rose's avatar
Carsten Rose committed
181
const ERROR_PLAY_SQL_FILE = 1080;
182

183
// Subrecord
184
const ERROR_SUBRECORD_MISSING_COLUMN_ID = 1100;
185
const ERROR_SUBRECORD_DETAIL_COLUMN_NOT_FOUND = 'Column not found in primary record or current row';
186
// Store
187
188
const ERROR_STORE_VALUE_ALREADY_CODPIED = 1200;
const ERROR_STORE_KEY_EXIST = 1201;
189

190
// I/O Error
191
192
193
194
195
196
197
198
199
const ERROR_IO_READ_FILE = 1300;
const ERROR_IO_WRITE = 1303;
const ERROR_IO_OPEN = 1304;
const ERROR_IO_UNLINK = 1305;
const ERROR_IO_FILE_EXIST = 1306;
const ERROR_IO_RENAME = 1307;
const ERROR_IO_INVALID_LINK = 1308;
const ERROR_IO_DIR_EXIST_AS_FILE = 1309;
const ERROR_IO_CHDIR = 1310;
200
const ERROR_IO_CREATE_FILE = 1311;
Carsten  Rose's avatar
Carsten Rose committed
201
const ERROR_IO_COPY_FILE = 1312;
202

203
//Report
204
205
const ERROR_UNKNOWN_LINK_QUALIFIER = 1400;
const ERROR_UNDEFINED_RENDER_CONTROL_COMBINATION = 1401;
206
207
208
209
210
211
212
213
const ERROR_MISSING_REQUIRED_DELETE_QUALIFIER = 1402;
const ERROR_MISSING_VALUE = 1403;
const ERROR_INVALID_VALUE = 1404;
const ERROR_MULTIPLE_DEFINITION = 1405;
const ERROR_MULTIPLE_URL_PAGE_MAILTO_DEFINITION = 1406;
const ERROR_UNKNOWN_TOKEN = 1407;
const ERROR_TOO_FEW_PARAMETER_FOR_SENDMAIL = 1408;
const ERROR_TOO_MANY_PARAMETER = 1409;
214

215
// Upload
216
const ERROR_UPLOAD = 1500;
217
218
219
const ERROR_UPLOAD_TOO_BIG = 1501;
const ERROR_UPLOAD_FILE_TYPE = 1502;
const ERROR_UPLOAD_GET_MIME_TYPE = 1503;
Carsten  Rose's avatar
Carsten Rose committed
220
const ERROR_UPLOAD_UNKNOWN_ACTION = 1504;
221
const ERROR_NO_TARGET_PATH_FILE_NAME = 1505;
222

Carsten  Rose's avatar
Carsten Rose committed
223
// LDAP
224
const ERROR_LDAP_CONNECT = 1600;
225
const ERROR_MISSING_TYPE_AHEAD_LDAP_SEARCH = 1601;
226
227
const ERROR_MISSING_TYPE_AHEAD_LDAP_SEARCH_PREFETCH = 1602;
const ERROR_LDAP_BIND = 1603;
228

Carsten  Rose's avatar
Carsten Rose committed
229
230
231
232
233
// Download
const ERROR_DOWNLOAD_CREATE_NEW_FILE = 1700;
const ERROR_DOWNLOAD_NO_FILES = 1701;
const ERROR_DOWNLOAD_NOTHING_TO_DO = 1702;
const ERROR_DOWNLOAD_UNEXPECTED_MIMETYPE = 1703;
Carsten  Rose's avatar
Carsten Rose committed
234
const ERROR_DOWNLOAD_UNEXPECTED_NUMBER_OF_SOURCES = 1704;
Carsten  Rose's avatar
Carsten Rose committed
235

236
237
// KeyValueParser
const ERROR_KVP_VALUE_HAS_NO_KEY = 1900;
238

239
// DB Errors
240
241
242
243
244
245
246
247
248
249
250
251
const ERROR_DB_OPEN = 2000;
const ERROR_DB_EXECUTE = 2001;
const ERROR_DB_PREPARE = 2002;
const ERROR_DB_BIND = 2003;
const ERROR_DB_QUERY = 2004;
const ERROR_DB_GENERIC_CHECK = 2005;
const ERROR_DB_TOO_FEW_ROWS = 2006;
const ERROR_DB_TOO_MANY_ROWS = 2007;
const ERROR_DB_COUNT_DO_NOT_MATCH = 2008;
const ERROR_DB_CLOSE_MYSQLI_RESULT = 2009;
const ERROR_DB_CLOSE_MYSQLI_STMT = 2010;
const ERROR_DB_UNKNOWN_COLUMN = 2011;
252
253
254
const ERROR_DB_UNKNOWN_COMMAND = 2012;
const ERROR_DB_MISSING_COLUMN_ID = 2013;
const ERROR_DB_COLUMN_NOT_FOUND_IN_TABLE = 2014;
255
const ERROR_DB_SET_CHARSET = 2015;
Carsten  Rose's avatar
Carsten Rose committed
256
const ERROR_DB_MULTI_QUERY_FAILED = 2016;
Carsten  Rose's avatar
Carsten Rose committed
257
258
259
260

// onArray
const ERROR_SUBSTITUTE_FOUND = 2100;

Carsten  Rose's avatar
Carsten Rose committed
261
// Dirty
Carsten  Rose's avatar
Carsten Rose committed
262
263
264
const ERROR_DIRTY_MISSING_FORM_IN_SIP = 2200;
const ERROR_DIRTY_DELETE_RECORD = 2201;
const ERROR_DIRTY_UNKNOWN_ACTION = 2202;
265
266
const ERROR_DIRTY_MISSING_LOCK = 2203;
const ERROR_DIRTY_ALREADY_LOCKED = 2204;
Carsten  Rose's avatar
Carsten Rose committed
267
const ERROR_DIRTY_RECORD_MODIFIED = 2205;
Carsten  Rose's avatar
Carsten Rose committed
268

269
270
271
// Language
const ERROR_LANGUAGE_NOT_CONFIGURED_IN_QFQ = 2300;

272
273
274
275
// Session
const ERROR_MISSING_SESSIONNAME = 2400;
const ERROR_QFQ_SESSION_MISSING = 2401;
const ERROR_SESSION_BROKEN_SCRIPT_PATH = 2402;
276

277
278
279
//
// Store Names: Identifier
//
280
281
const STORE_FORM = "F";  // form, still not saved in database
const STORE_SIP = "S"; // SIP
Carsten  Rose's avatar
Carsten Rose committed
282
const STORE_RECORD = "R"; // selected record from primary table.
283
const STORE_BEFORE = "B"; // selected record from primary table before any modifcations.
284
const STORE_PARENT_RECORD = "P"; // on multi forms the recent record of the outer query (multi).
285
286
const STORE_TABLE_DEFAULT = "D"; // definition of primary table.
const STORE_TABLE_COLUMN_TYPES = "M"; // column types of primary table.
287
const STORE_CLIENT = "C"; // Client: POST variable, if not found: GET variable
288
const STORE_TYPO3 = "T"; // Typo3 > Page content record > bodytext
289
const STORE_VAR = "V"; // Generic Vars
290
const STORE_ZERO = "0"; // value: 0, might helpfull if variable is empty but used in an SQL statement, which might produce a SQL error otherwise if substituted with an empty string
291
const STORE_EMPTY = "E"; // value: '', might helpfull if variable is not defined and should result in an empty string instead of {{...}} (cause not replaced)
Carsten  Rose's avatar
Carsten Rose committed
292
const STORE_SYSTEM = "Y"; // various system values like db connection credentials
Carsten  Rose's avatar
Carsten Rose committed
293
const STORE_EXTRA = 'X'; // Persistent Store: contains arrays! Not Usefull for user. Used by system.
294
const STORE_ADDITIONAL_FORM_ELEMENTS = 'A'; // Internal Store to collect FormElements. Typically for 'hidden' elements of radio and checkbox. Helps render those elements at the end of the whole form rendering.
295
const STORE_LDAP = 'L';
296

297
const STORE_USE_DEFAULT = "FSRVD";
298

299
//
Carsten  Rose's avatar
Carsten Rose committed
300
// Store: Definitions / Members
301
302
//

Carsten  Rose's avatar
Carsten Rose committed
303
// URL variables
304
305
const CLIENT_FORM = 'form';
const CLIENT_SIP = 's';
306
const CLIENT_RECORD_ID = 'r';
307
308
const CLIENT_KEY_SEM_ID = 'keySemId';
const CLIENT_KEY_SEM_ID_USER = 'keySemIdUser';
309
310
311
const CLIENT_PAGE_ID = 'id';
const CLIENT_PAGE_TYPE = 'type';
const CLIENT_PAGE_LANGUAGE = 'L';
312
const CLIENT_UPLOAD_FE_NAME = 'name';
Carsten  Rose's avatar
Carsten Rose committed
313

314
315
const CLIENT_SIP_FOR_FORM = '_sipForForm';
const CLIENT_FE_NAME = '_feName';
316
const CLIENT_TYPO3VARS = '_sipForTypo3Vars';
317

318
319
320
321
322
323
324
// ALL $_SERVER variables: http://php.net/manual/en/reserved.variables.server.php
// The following exist and might be the most used ones.
const CLIENT_SCRIPT_URL = 'SCRIPT_URL';
const CLIENT_SCRIPT_URI = 'SCRIPT_URI';
const CLIENT_HTTP_HOST = 'HTTP_HOST';
const CLIENT_HTTP_USER_AGENT = 'HTTP_USER_AGENT';
const CLIENT_SERVER_NAME = 'SERVER_NAME';
325
const CLIENT_SERVER_ADDRESS = 'SERVER_ADDR';
326
const CLIENT_SERVER_PORT = 'SERVER_PORT';
327
const CLIENT_REMOTE_ADDRESS = 'REMOTE_ADDR';
328
329
330
331
332
333
334
const CLIENT_REQUEST_SCHEME = 'REQUEST_SCHEME';
const CLIENT_SCRIPT_FILENAME = 'SCRIPT_FILENAME';
const CLIENT_QUERY_STRING = 'QUERY_STRING';
const CLIENT_REQUEST_URI = 'REQUEST_URI';
const CLIENT_SCRIPT_NAME = 'SCRIPT_NAME';
const CLIENT_PHP_SELF = 'PHP_SELF';

335
// _COOKIE
Carsten  Rose's avatar
Carsten Rose committed
336
337
const CLIENT_COOKIE_QFQ = 'cookieQfq';

Carsten  Rose's avatar
Carsten Rose committed
338
// T3 Bodytext Keywords
339
const TYPO3_FORM = CLIENT_FORM;
340
const TYPO3_RECORD_ID = CLIENT_RECORD_ID;
341
const TYPO3_BE_USER_LOGGED_IN = 'beUserLoggedIn';   // 'yes' | 'no'
342
343
344
const TYPO3_FE_USER = 'feUser';
const TYPO3_FE_USER_UID = 'feUserUid';
const TYPO3_FE_USER_GROUP = 'feUserGroup';
345
const TYPO3_TT_CONTENT_UID = 'ttcontentUid';
346
const TYPO3_PAGE_ID = 'pageId';
347
348
const TYPO3_PAGE_ALIAS = 'pageAlias';
const TYPO3_PAGE_TITLE = 'pageTitle';
349
const TYPO3_PAGE_TYPE = 'pageType';
350

351
const TYPO3_PAGE_LANGUAGE = 'pageLanguage';
352
const TYPO3_DEBUG_SHOW_BODY_TEXT = 'debugShowBodyText';
353
354
const TYPO3_SQL_LOG = 'sqlLog';
const TYPO3_SQL_LOG_MODE = 'sqlLogMode';
355

356
// System: old style - still used to read old configuration file.
357
358
359
360
const SYSTEM_DB_USER = 'DB_USER';
const SYSTEM_DB_SERVER = 'DB_SERVER';
const SYSTEM_DB_PASSWORD = 'DB_PASSWORD';
const SYSTEM_DB_NAME = 'DB_NAME';
361
362
363
364
365
366

const SYSTEM_DB_1_USER = 'DB_1_USER';
const SYSTEM_DB_1_SERVER = 'DB_1_SERVER';
const SYSTEM_DB_1_PASSWORD = 'DB_1_PASSWORD';
const SYSTEM_DB_1_NAME = 'DB_1_NAME';

367
const SYSTEM_DB_INIT = 'DB_INIT';
368
369
370
371

const SYSTEM_DB_INDEX_DATA = "DB_INDEX_DATA";
const SYSTEM_DB_INDEX_QFQ = "DB_INDEX_QFQ";

372
const SYSTEM_SQL_LOG = 'SQL_LOG'; //  Logging to file
373
const SYSTEM_SQL_LOG_FILE = '../../sql.log';
374
const SYSTEM_SQL_LOG_MODE = 'SQL_LOG_MODE'; // Mode, which statements to log.
375
const SYSTEM_DATE_FORMAT = 'DATE_FORMAT';
376
const SYSTEM_REDIRECT_ALL_MAIL_TO = 'REDIRECT_ALL_MAIL_TO';
377
378

const SYSTEM_SHOW_DEBUG_INFO = 'SHOW_DEBUG_INFO';
379
380
381
382
383
const SYSTEM_SHOW_DEBUG_INFO_YES = 'yes';
const SYSTEM_SHOW_DEBUG_INFO_NO = 'no';
const SYSTEM_SHOW_DEBUG_INFO_AUTO = 'auto';
const SYSTEM_SHOW_DEBUG_INFO_DOWNLOAD = 'download';

384
385
const SYSTEM_CSS_LINK_CLASS_INTERNAL = 'CSS_LINK_CLASS_INTERNAL';
const SYSTEM_CSS_LINK_CLASS_EXTERNAL = 'CSS_LINK_CLASS_EXTERNAL';
386
const SYSTEM_CSS_CLASS_QFQ_CONTAINER = 'CSS_CLASS_QFQ_CONTAINER';
387
const SYSTEM_CSS_CLASS_QFQ_FORM = 'CSS_CLASS_QFQ_FORM';
388
389
const SYSTEM_CSS_CLASS_QFQ_FORM_PILL = 'CSS_CLASS_QFQ_FORM_PILL';
const SYSTEM_CSS_CLASS_QFQ_FORM_BODY = 'CSS_CLASS_QFQ_FORM_BODY';
390

391
392
393
394
395
396
// Textmessages used for Form validation.
const SYSTEM_FORM_DATA_PATTERN_ERROR = 'FORM_DATA_PATTERN_ERROR';
const SYSTEM_FORM_DATA_REQUIRED_ERROR = 'FORM_DATA_REQUIRED_ERROR';
const SYSTEM_FORM_DATA_MATCH_ERROR = 'FORM_DATA_MATCH_ERROR';
const SYSTEM_FORM_DATA_ERROR = 'FORM_DATA_ERROR';

397
398
const SYSTEM_FORM_BS_COLUMNS = 'FORM_BS_COLUMNS';

399
400
401
const SYSTEM_FORM_BS_LABEL_COLUMNS = 'FORM_BS_LABEL_COLUMNS';
const SYSTEM_FORM_BS_INPUT_COLUMNS = 'FORM_BS_INPUT_COLUMNS';
const SYSTEM_FORM_BS_NOTE_COLUMNS = 'FORM_BS_NOTE_COLUMNS';
402

403
404
const SYSTEM_FORM_BUTTON_ON_CHANGE_CLASS = 'FORM_BUTTON_ON_CHANGE_CLASS';

405
406
407
const SYSTEM_BASE_URL_PRINT = 'BASE_URL_PRINT';
const SYSTEM_WKHTMLTOPDF = 'WKHTMLTOPDF';

408
409
const SYSTEM_EDIT_FORM_PAGE = 'EDIT_FORM_PAGE';

410
411
// computed automatically during runtime
const SYSTEM_PATH_EXT = 'EXT_PATH';
412
const SYSTEM_SITE_PATH = 'SITE_PATH';
413

414
415
416
417
418
419
const SYSTEM_LDAP_1_RDN = 'LDAP_1_RDN'; // Credentials to access LDAP
const SYSTEM_LDAP_1_PASSWORD = 'LDAP_1_PASSWORD'; // Credentials to access LDAP

const SYSTEM_ESCAPE_TYPE_DEFAULT = 'ESCAPE_TYPE_DEFAULT';
const SYSTEM_SECURITY_VARS_HONEYPOT = 'SECURITY_VARS_HONEYPOT'; // Fake variables
const SYSTEM_SECURITY_ATTACK_DELAY = 'SECURITY_ATTACK_DELAY'; // Detected attack causes x seconds delay
420
const SYSTEM_SECURITY_ATTACK_DELAY_DEFAULT = 5; // Detected attack causes x seconds delay
421
422
const SYSTEM_SECURITY_SHOW_MESSAGE = 'SECURITY_SHOW_MESSAGE'; // Detected attack shows an error message
const SYSTEM_SECURITY_GET_MAX_LENGTH = 'SECURITY_GET_MAX_LENGTH'; // Trim every character (before conversion) to SECURITY_GET_MAX_LENGTH chars;
423
424
425
426
const SYSTEM_SECURITY_GET_MAX_LENGTH_DEFAULT = 50; // Default max length for get variables

const GET_EXTRA_LENGTH_TOKEN = '_';

427
428
const SYSTEM_GFX_EXTRA_BUTTON_INFO_INLINE = 'GFX_EXTRA_BUTTON_INFO_INLINE';
const SYSTEM_GFX_EXTRA_BUTTON_INFO_BELOW = 'GFX_EXTRA_BUTTON_INFO_BELOW';
429
430
431
const SYSTEM_EXTRA_BUTTON_INFO_POSITION = 'EXTRA_BUTTON_INFO_POSITION';
const SYSTEM_EXTRA_BUTTON_INFO_POSITION_AUTO = 'auto';
const SYSTEM_EXTRA_BUTTON_INFO_POSITION_BELOW = 'below';
432
const SYSTEM_EXTRA_BUTTON_INFO_CLASS = 'EXTRA_BUTTON_INFO_CLASS';
433

434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
const SYSTEM_SAVE_BUTTON_TEXT = 'SAVE_BUTTON_TEXT';
const SYSTEM_SAVE_BUTTON_TOOLTIP = 'SAVE_BUTTON_TOOLTIP';
const SYSTEM_SAVE_BUTTON_CLASS = 'SAVE_BUTTON_CLASS';
const SYSTEM_SAVE_BUTTON_GLYPH_ICON = 'SAVE_BUTTON_GLYPH_ICON';

const SYSTEM_CLOSE_BUTTON_TEXT = 'CLOSE_BUTTON_TEXT';
const SYSTEM_CLOSE_BUTTON_TOOLTIP = 'CLOSE_BUTTON_TOOLTIP';
const SYSTEM_CLOSE_BUTTON_CLASS = 'CLOSE_BUTTON_CLASS';
const SYSTEM_CLOSE_BUTTON_GLYPH_ICON = 'CLOSE_BUTTON_GLYPH_ICON';

const SYSTEM_DELETE_BUTTON_TEXT = 'DELETE_BUTTON_TEXT';
const SYSTEM_DELETE_BUTTON_TOOLTIP = 'DELETE_BUTTON_TOOLTIP';
const SYSTEM_DELETE_BUTTON_CLASS = 'DELETE_BUTTON_CLASS';
const SYSTEM_DELETE_BUTTON_GLYPH_ICON = 'DELETE_BUTTON_GLYPH_ICON';

const SYSTEM_NEW_BUTTON_TEXT = 'NEW_BUTTON_TEXT';
const SYSTEM_NEW_BUTTON_TOOLTIP = 'NEW_BUTTON_TOOLTIP';
const SYSTEM_NEW_BUTTON_CLASS = 'NEW_BUTTON_CLASS';
const SYSTEM_NEW_BUTTON_GLYPH_ICON = 'NEW_BUTTON_GLYPH_ICON';

454
455
456
457
458
const SYSTEM_DB_UPDATE = 'DB_UPDATE';
const SYSTEM_DB_UPDATE_ALWAYS = 'always';
const SYSTEM_DB_UPDATE_NEVER = 'never';
const SYSTEM_DB_UPDATE_AUTO = 'auto';

Carsten  Rose's avatar
Carsten Rose committed
459
460
const SYSTEM_RECORD_LOCK_TIMEOUT_SECONDS = 'RECORD_LOCK_TIMEOUT_SECONDS';
const SYSTEM_RECORD_LOCK_TIMEOUT_SECONDS_DEFAULT = 900; // 15 mins
Carsten  Rose's avatar
Carsten Rose committed
461

462
// Deprecated, replaced by SYSTEM_FILL_STORE_SYSTEM_BY_SQ
463
const SYSTEM_VAR_ADD_BY_SQL = 'VAR_ADD_BY_SQL';
464
//const SYSTEM_VAR_ADD_BY_SQL_DEFAULT = 'SELECT id AS periodId FROM Period WHERE start<=NOW() ORDER BY start DESC LIMIT 1';
465

466
467
468
const SYSTEM_FILL_STORE_SYSTEM_BY_SQL = 'FILL_STORE_SYSTEM_BY_SQL';
const SYSTEM_FILL_STORE_SYSTEM_ERROR_MSG = 'FILL_STORE_SYSTEM_ERROR_MSG';

469
470
471
472
473
474
475
476
477
478
479
480
481
482
const SYSTEM_FORM_LANGUAGE = 'FORM_LANGUAGE';

const SYSTEM_FORM_LANGUAGE_A_ID = 'FORM_LANGUAGE_A_ID';
const SYSTEM_FORM_LANGUAGE_A_LABEL = 'FORM_LANGUAGE_A_LABEL';

const SYSTEM_FORM_LANGUAGE_B_ID = 'FORM_LANGUAGE_B_ID';
const SYSTEM_FORM_LANGUAGE_B_LABEL = 'FORM_LANGUAGE_B_LABEL';

const SYSTEM_FORM_LANGUAGE_C_ID = 'FORM_LANGUAGE_C_ID';
const SYSTEM_FORM_LANGUAGE_C_LABEL = 'FORM_LANGUAGE_C_LABEL';

const SYSTEM_FORM_LANGUAGE_D_ID = 'FORM_LANGUAGE_D_ID';
const SYSTEM_FORM_LANGUAGE_D_LABEL = 'FORM_LANGUAGE_D_LABEL';

483
484
485
const DOCUMENTATION_QFQ = 'DOCUMENTATION_QFQ';
const DOCUMENTATION_QFQ_URL = 'https://docs.typo3.org/typo3cms/drafts/github/T3DocumentationStarter/Public-Info-053/Manual.html';

486

487
// Not stored in config.qfq.ini, but used in STORE_SYSTEM
488
// Information for: Log / Debug / Exception
Carsten  Rose's avatar
Carsten Rose committed
489
490
491
492
const SYSTEM_SQL_RAW = 'sqlRaw';  // Type: SANITIZE_ALL / String. SQL Query (before substitute). Useful for error reporting.
const SYSTEM_SQL_FINAL = 'sqlFinal'; //  Type: SANITIZE_ALL / String. SQL Query (after substitute). Useful for error reporting.
const SYSTEM_SQL_COUNT = 'sqlCount'; //  Type: SANITIZE_DIGIT / Int.Number of rows in SQL ResultSet. Useful for error reporting.
const SYSTEM_SQL_PARAM_ARRAY = 'sqlParamArray'; //  Type: SANITIZE_ALL / Parameter of prepared SQL Statement. Useful for error reporting.
493
494
495
const SYSTEM_FORM = CLIENT_FORM;                        // '<formName> / <formId>'
const SYSTEM_FORM_ELEMENT = 'formElement';              // '<formElementName> / <formElementeId>'
const SYSTEM_FORM_ELEMENT_COLUMN = 'formElementColumn'; // '<columnname of current processed formElement>'
496
const SYSTEM_FORM_ELEMENT_MESSAGE = 'formElementMessage'; // '<columnname of current processed formElement>'
497
498
const SYSTEM_REPORT_COLUMN_INDEX = 'reportColumnIndex'; // Keyname of SQL-column processed at the moment.
const SYSTEM_REPORT_COLUMN_NAME = 'reportColumnName'; // Keyname of SQL-column processed at the moment.
499
500
const SYSTEM_REPORT_COLUMN_VALUE = 'reportColumnValue'; // Keyname of SQL-column processed at the moment.
const SYSTEM_REPORT_FULL_LEVEL = 'reportFullLevel'; // Keyname of SQL-column processed at the moment.
Carsten  Rose's avatar
Carsten Rose committed
501
502
503
504
505
const SYSTEM_DOWNLOAD_POPUP = 'hasDownloadPopup'; // Marker which is set to 'true' if there is at least one Download Link rendered
const DOWNLOAD_POPUP_REQUEST = 'true';
const DOWNLOAD_POPUP_REPLACE_TEXT = '#downloadPopupReplaceText#';
const DOWNLOAD_POPUP_REPLACE_TITLE = '#downloadPopupReplaceTitle#';

506
const SYSTEM_PARAMETER_LANGUAGE_FIELD_NAME = 'parameterLanguageFieldName';
507
508
const CSS_REQUIRED = 'required-field';

509
// die folgenden Elemente sind vermutlich nicht noetig, wenn Store Klassen gloable Vars benutzt.
Carsten  Rose's avatar
Carsten Rose committed
510
511
512
//const SYSTEM_FORM_DEF = 'formDefinition'; // Type: SANITIZE_ALNUMX / AssocArray. Final form to process. Useful for error reporting.
//const SYSTEM_FORM_ELEMENT_DEF = 'formElementDefinition'; // Type: SANITIZE_ALL / AssocArray. Formelement which are processed at the moment. Useful for error reporting.
//const SYSTEM_FORM_ELEMENT_FIELD = 'formElementField'; // Type: SANITIZE_ALNUMX / String. Fieldname of processed Formelement. Useful for error reporting.
513

514
515
516
517
518
519
520
const MODE_HTML = 'html';
const MODE_JSON = 'json';

const MSG_HEADER = 'header';
const MSG_CONTENT = 'content';
const MSG_ERROR_CODE = 'errorCode';

521
const SIP_TOKEN_LENGTH = 13; // length of string returned by `uniqid()`
522
523
const SIP_SIP = CLIENT_SIP;  // s
const SIP_RECORD_ID = CLIENT_RECORD_ID; // r
Carsten  Rose's avatar
Carsten Rose committed
524
const SIP_TARGET_URL = '_targetUrl'; // URL where to jump after delete()
525
const SIP_MODE_ANSWER = '_modeAnswer'; // Mode how delete() will answer to client: MODE_HTML, MODE_JSON
526
const SIP_FORM = CLIENT_FORM;
527
const SIP_TABLE = 'table'; // delete a record from 'table'
528
const SIP_URLPARAM = 'urlparam';
529
const SIP_MAKE_URLPARAM_UNIQ = '_makeUrlParamUniq'; // SIPs for 'new records' needs to be uniq per TAB! Therefore add a uniq parameter
Carsten  Rose's avatar
Carsten Rose committed
530
531
532
533
const SIP_DOWNLOAD_PARAMETER = '_b64_download'; // Parametername, filled in SIP, to hold all download element parameter.

const SIP_PREFIX_BASE64 = '_b64';

534
535
536
537
538
const SIP_EXCLUDE_ID = 'id';
const SIP_EXCLUDE_TYPE = 'type';
const SIP_EXCLUDE_L = 'L';
const SIP_EXCLUDE_XDEBUG_SESSION_START = 'XDEBUG_SESSION_START';

Carsten  Rose's avatar
Carsten Rose committed
539
// FURTHER: all extracted params from 'urlparam
540

541
542
const ACTION_KEYWORD_SLAVE_ID = 'slaveId';

543
const VAR_RANDOM = 'random';
544
545
546
const VAR_FILE_DESTINATION = 'fileDestination';
const VAR_SLAVE_ID = ACTION_KEYWORD_SLAVE_ID;
const VAR_FILENAME = 'filename'; // Original filename of an uploaded file.
547

548
// PHP class Typeahead
549
const TYPEAHEAD_API_QUERY = 'query';  // Name of parameter in API call of typeahead.php?query=...&s=... - See also FE_TYPE_AHEAD_SQL
550
const TYPEAHEAD_API_PREFETCH = 'prefetch';  // Name of parameter in API call of typeahead.php?prefetch=...&s=... - See also FE_TYPE_AHEAD_SQL
551
552
const TYPEAHEAD_API_SIP = 'sip';  // Name of parameter in API call of typeahead.php?query=...&s=...
const TYPEAHEAD_DEFAULT_LIMIT = 20;
553
const TYPEAHEAD_SQL_KEY_NAME = 'id';
554

555
556
const DEFAULT_LDAP_TIME_LIMIT = 3;

557
558
const SINGLE_TICK = "'";
const DOUBLE_TICK = '"';
Carsten  Rose's avatar
#2067    
Carsten Rose committed
559

560
// TOKEN evaluate
561
const TOKEN_ESCAPE_CONFIG = 'c';
562
563
const TOKEN_ESCAPE_SINGLE_TICK = 's';
const TOKEN_ESCAPE_DOUBLE_TICK = 'd';
564
565
566
567
const TOKEN_ESCAPE_LDAP_FILTER = 'l';
const TOKEN_ESCAPE_LDAP_DN = 'L';
const TOKEN_ESCAPE_MYSQL = 'm';
const TOKEN_ESCAPE_NONE = '-';
568
569
570
571
572
573
574

// Workaround for PHP < 5.6.0
if (!function_exists('ldap_escape')) {
    define('LDAP_ESCAPE_FILTER', 0x01);
    define('LDAP_ESCAPE_DN', 0x02);
}

575
const TOKEN_FOUND_IN_STORE_QUERY = 'query';
576
const TOKEN_FOUND_AS_DEFAULT = 'default';
577
578
579

const RANDOM_LENGTH = 32;

580
// FORM - copy from table 'form' of processed form
581
//const DEF_FORM_NAME = CLIENT_FORM;
582
583

// FORMELEMENT - copy of all formElements of processed form
584
//const DEF_FORM_ELEMENT_ID = 'id';
585

586
587
588
// SQL logging Modes
const SQL_LOG_MODE_ALL = 'all';
const SQL_LOG_MODE_MODIFY = 'modify';
589
590
const SQL_LOG_MODE_NONE = 'none';
const SQL_LOG_MODE_ERROR = 'error';
591

592
const MODE_LDAP_PREFETCH = 'ldapPrefetch';
593
594
595
const MODE_LDAP_SINGLE = 'ldapSingle';
const MODE_LDAP_MULTI = 'ldapMulti';

596
// api/save.php, api/delete.php, api/load.php
597
const API_DELETE_PHP = 'delete.php';
Carsten  Rose's avatar
Carsten Rose committed
598
const API_DOWNLOAD_PHP = 'download.php';
599

600
601
602
603
const API_STATUS = 'status';
const API_MESSAGE = 'message';
const API_REDIRECT = 'redirect';
const API_REDIRECT_URL = 'redirect-url';
Carsten  Rose's avatar
Carsten Rose committed
604
605
const API_LOCK_ACTION = 'action';
const API_LOCK_TIMEOUT = 'lock_timeout';
606
607
const API_FIELD_NAME = 'field-name';
const API_FIELD_MESSAGE = 'field-message';
Carsten  Rose's avatar
Carsten Rose committed
608
const API_FORM_UPDATE = 'form-update';
609
610
611
612
613
614
const API_FORM_UPDATE_FORM_ELEMENT = 'form-element';
const API_FORM_UPDATE_VALUE = 'value';
const API_FORM_UPDATE_HIDDEN = 'hidden';
const API_FORM_UPDATE_DISABLED = 'disabled';
const API_FORM_UPDATE_REQUIRED = 'required';

615
const API_ELEMENT_UPDATE = 'element-update';
616
617
const API_ELEMENT_ATTRIBUTE = 'attr';
const API_ELEMENT_CONTENT = 'content';
618
619
620
621
const API_SUBMIT_REASON = 'submit_reason';
const API_SUBMIT_REASON_SAVE = 'save';
const API_SUBMIT_REASON_SAVE_CLOSE = 'save,close';

Carsten  Rose's avatar
Carsten Rose committed
622
const API_LOCK_ACTION_LOCK = 'lock';
623
const API_LOCK_ACTION_EXTEND = 'extend';
Carsten  Rose's avatar
Carsten Rose committed
624
625
const API_LOCK_ACTION_RELEASE = 'release';

626
const API_ANSWER_STATUS_SUCCESS = 'success';
Carsten  Rose's avatar
Carsten Rose committed
627
628
const API_ANSWER_STATUS_CONFLICT = 'conflict';
const API_ANSWER_STATUS_CONFLICT_ALLOW_FORCE = 'conflict_allow_force';
629
630
631
632
const API_ANSWER_STATUS_ERROR = 'error';
const API_ANSWER_REDIRECT_CLIENT = 'client';
const API_ANSWER_REDIRECT_NO = 'no';
const API_ANSWER_REDIRECT_URL = 'url';
633
const API_ANSWER_REDIRECT_URL_SKIP_HISTORY = 'url-skip-history';
634

635
636
637
638
639
640
641
const API_TYPEAHEAD_KEY = 'key';
const API_TYPEAHEAD_VALUE = 'value';

const DATA_HIDDEN = 'data-hidden';
const DATA_DISABLED = 'data-disabled';
const DATA_REQUIRED = 'data-required';

Carsten  Rose's avatar
Carsten Rose committed
642
const CLASS_TYPEAHEAD = 'qfq-typeahead';
643
const DATA_TYPEAHEAD_SIP = 'data-typeahead-sip'; // Used for typeAhead
644
645
646

const CLASS_NOTE = 'qfq-note';

647
648
const DATA_ENABLE_SAVE_BUTTON = 'data-enable-save-button';

Carsten  Rose's avatar
Carsten Rose committed
649
650
651
//const CLASS_TYPEAHEAD = 'qfq-type-ahead';
//const DATA_TYPEAHEAD_SIP = 'data-sip'; // Used for typeAhead

652
653
const DATA_TYPEAHEAD_LIMIT = 'data-typeahead-limit';
const DATA_TYPEAHEAD_MINLENGTH = 'data-typeahead-minlength';
654
const DATA_TYPEAHEAD_PEDANTIC = 'data-typeahead-pedantic';
655

656
657
658
const CLASS_CHARACTER_COUNT = 'qfq-character-count';
const DATA_CHARACTER_COUNT_ID = 'data-character-count-id';

659
660
const CLASS_FORM_ELEMENT_EDIT = 'qfq-form-element-edit';

661
// BuildForm
662
663
const SYMBOL_NEW = 'new';
const SYMBOL_EDIT = 'edit';
664
const SYMBOL_SHOW = 'show';
665
const SYMBOL_DELETE = 'delete';
666
667

//CHECKBOX
668
669
670
const ALIGN_HORIZONTAL = 'horizontal';
const ALIGN_VERTICAL = 'vertical';

671
// Subrecord
672
const SUBRECORD_COLUMN_DEFAULT_MAX_LENGTH = 20;
673
674
675
const FORM_ELEMENTS_NATIVE = 'native';
const FORM_ELEMENTS_SUBRECORD = 'subrecord';
const FORM_ELEMENTS_NATIVE_SUBRECORD = 'native_subrecord';
Carsten  Rose's avatar
Carsten Rose committed
676
//const FORM_ELEMENTS_DYNAMIC_UPDATE = 'native_dynamic_update';
677
678
679
680
681
const SUBRECORD_NEW = SYMBOL_NEW;
const SUBRECORD_EDIT = SYMBOL_EDIT;
const SUBRECORD_DELETE = SYMBOL_DELETE;
const SUBRECORD_PARAMETER_FORM = CLIENT_FORM;
const SUBRECORD_PARAMETER_PAGE = 'page';
682
683
const SUBRECORD_PARAMETER_DETAIL = 'detail';

684
685
686
687
688
689
690
691
692
693
694
const SUBRECORD_COLUMN_TITLE = 'title';
const SUBRECORD_COLUMN_MAX_LENGTH = 'maxLength';
const SUBRECORD_COLUMN_NO_STRIP = 'nostrip';
const SUBRECORD_COLUMN_ICON = 'icon';
const SUBRECORD_COLUMN_LINK = 'link';
const SUBRECORD_COLUMN_URL = 'url';
const SUBRECORD_COLUMN_MAILTO = 'mailto';
const SUBRECORD_COLUMN_ROW_CLASS = '_rowClass';
const SUBRECORD_COLUMN_ROW_TITLE = '_rowTitle';
const SUBRECORD_COLUMN_ROW_TOOLTIP = '_rowTooltip';

695
const GLYPH_ICON = 'glyphicon';
696
697
698
const GLYPH_ICON_EDIT = 'glyphicon-pencil';
const GLYPH_ICON_NEW = 'glyphicon-plus';
const GLYPH_ICON_DELETE = 'glyphicon-trash';
699
700
701
const GLYPH_ICON_HELP = 'glyphicon-question-sign';
const GLYPH_ICON_INFO = 'glyphicon-info-sign';
const GLYPH_ICON_SHOW = 'glyphicon-search';
702
const GLYPH_ICON_TOOL = 'glyphicon-wrench';
703
704
const GLYPH_ICON_CHECK = 'glyphicon-ok';
const GLYPH_ICON_CLOSE = 'glyphicon-remove';
705
const GLYPH_ICON_TASKS = 'glyphicon-tasks';
Carsten  Rose's avatar
Carsten Rose committed
706
const GLYPH_ICON_DUPLICATE = 'glyphicon-duplicate';
Carsten  Rose's avatar
Carsten Rose committed
707
const GLYPH_ICON_VIEW = 'glyphicon-eye-open';
Carsten  Rose's avatar
Carsten Rose committed
708
const GLYPH_ICON_FILE = 'glyphicon-file';
709

710
// FORM columns: real
711
const F_ID = 'id';
712
const F_NAME = 'name';
713
const F_TITLE = 'title';
714
const F_TABLE_NAME = 'tableName';
715
716
const F_REQUIRED_PARAMETER_NEW = 'requiredParameterNew';
const F_REQUIRED_PARAMETER_EDIT = 'requiredParameterEdit';
717
718
const F_EXTRA_DELETE_FORM = 'extraDeleteForm';
const F_FINAL_DELETE_FORM = 'finalDeleteForm';
Carsten  Rose's avatar
Carsten Rose committed
719
const F_DIRTY_MODE = 'dirtyMode';
720

721
const F_SUBMIT_BUTTON_TEXT = 'submitButtonText';
722
const F_BUTTON_ON_CHANGE_CLASS = 'buttonOnChangeClass';
723

724
725
const F_ESCAPE_TYPE_DEFAULT = 'escapeTypeDefault';

726
const F_CLASS = 'class';
727
728
729
const F_CLASS_PILL = 'classPill';
const F_CLASS_BODY = 'classBody';

Carsten  Rose's avatar
Carsten Rose committed
730
731
const F_SHOW_BUTTON = 'showButton';

732
733
734
const F_FORWARD_MODE = 'forwardMode';
const F_FORWARD_PAGE = 'forwardPage';

735
736
const F_FORWARD_MODE_CLIENT = API_ANSWER_REDIRECT_CLIENT;
const F_FORWARD_MODE_NO = API_ANSWER_REDIRECT_NO;
Carsten  Rose's avatar
Carsten Rose committed
737
738
739
740
const F_FORWARD_MODE_URL = API_ANSWER_REDIRECT_URL;
const F_FORWARD_MODE_URL_SKIP_HISTORY = API_ANSWER_REDIRECT_URL_SKIP_HISTORY;
const F_FORWARD_MODE_URL_SIP = 'url-sip';
// client', 'no', 'url', 'url-skip-history'
741

742
743
const F_RECORD_LOCK_TIMEOUT_SECONDS = 'recordLockTimeoutSeconds';

744
745
746
747
748
const F_FE_DATA_PATTERN_ERROR = 'data-pattern-error';
const F_FE_DATA_REQUIRED_ERROR = 'data-required-error';
const F_FE_DATA_MATCH_ERROR = 'data-match-error';
const F_FE_DATA_ERROR = 'data-error';

749
750
const F_PARAMETER = 'parameter';    // valid for F_ and FE_

751
// Form columns: via parameter field
752
753
754
const F_DB_INDEX_DATA = 'dbIndexData';
const DB_INDEX_DATA_DEFAULT = "1";

755
756
757
const F_LDAP_SERVER = 'ldapServer';
const F_LDAP_BASE_DN = 'ldapBaseDn';
const F_LDAP_SEARCH = 'ldapSearch';
758
759
const F_LDAP_ATTRIBUTES = 'ldapAttributes';
const F_LDAP_TIME_LIMIT = 'ldapTimeLimit';
760
const F_LDAP_USE_BIND_CREDENTIALS = 'ldapUseBindCredentials';
761
762
const F_TYPEAHEAD_LIMIT = 'typeAheadLimit';
const F_TYPEAHEAD_MINLENGTH = 'typeAheadMinLength';
763
const F_TYPEAHEAD_PEDANTIC = 'typeAheadPedantic';
764
const F_TYPEAHEAD_LDAP_VALUE_PRINTF = 'typeAheadLdapValuePrintf';
765
const F_TYPEAHEAD_LDAP_ID_PRINTF = 'typeAheadLdapIdPrintf';
766
const F_TYPEAHEAD_LDAP_SEARCH = 'typeAheadLdapSearch';
767
const F_TYPEAHEAD_LDAP_SEARCH_PREFETCH = 'typeAheadLdapSearchPrefetch';
768
const F_TYPEAHEAD_LDAP_SEARCH_PER_TOKEN = 'typeAheadLdapSearchPerToken';
769

Carsten  Rose's avatar
Carsten Rose committed
770
771
const F_MODE = 'mode';
const F_MODE_READONLY = 'readonly';
772
const F_MODE_REQUIRED_OFF = 'requiredOff';
773
const F_MODE_GLOBAL = 'formModeGlobal';
Carsten  Rose's avatar
Carsten Rose committed
774

775
776
const F_SAVE_BUTTON_ACTIVE = 'saveButtonActive';

777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
const F_SAVE_BUTTON_TEXT = 'saveButtonText';
const F_SAVE_BUTTON_TOOLTIP = 'saveButtonTooltip';
const F_SAVE_BUTTON_CLASS = 'saveButtonClass';
const F_SAVE_BUTTON_GLYPH_ICON = 'saveButtonGlyphIcon';

const F_CLOSE_BUTTON_TEXT = 'closeButtonText';
const F_CLOSE_BUTTON_TOOLTIP = 'closeButtonTooltip';
const F_CLOSE_BUTTON_CLASS = 'closeButtonClass';
const F_CLOSE_BUTTON_GLYPH_ICON = 'closeButtonGlyphIcon';

const F_DELETE_BUTTON_TEXT = 'deleteButtonText';
const F_DELETE_BUTTON_TOOLTIP = 'deleteButtonTooltip';
const F_DELETE_BUTTON_CLASS = 'deleteButtonClass';
const F_DELETE_BUTTON_GLYPH_ICON = 'deleteButtonGlyphIcon';

const F_NEW_BUTTON_TEXT = 'newButtonText';
const F_NEW_BUTTON_TOOLTIP = 'newButtonTooltip';
const F_NEW_BUTTON_CLASS = 'newButtonClass';
const F_NEW_BUTTON_GLYPH_ICON = 'newButtonGlyphIcon';

797
798
799
800
// FORM_ELEMENT_STATI
const FE_MODE_SHOW = 'show';
const FE_MODE_READONLY = 'readonly';
const FE_MODE_REQUIRED = 'required';
801
const FE_MODE_HIDDEN = 'hidden';
802

803
804
805
806
const FE_CLASS_NATIVE = 'native';
const FE_CLASS_ACTION = 'action';
const FE_CLASS_CONTAINER = 'container';

807
// FormElement columns: real
808
const FE_ID = 'id';
Carsten  Rose's avatar
Carsten Rose committed
809
const FE_ID_CONTAINER = 'feIdContainer';
Carsten  Rose's avatar
Carsten Rose committed
810
const FE_FORM_ID = 'formId';
811
const FE_NAME = 'name';
812
const FE_TYPE = 'type';
813
const FE_MODE = 'mode';
814
const FE_MODE_SQL = 'modeSql';
815
const FE_DYNAMIC_UPDATE = 'dynamicUpdate';
816
const FE_VALUE = 'value';
817
const FE_CLASS = 'class';
818
819
const FE_LABEL = 'label';
const FE_NOTE = 'note';
820
821
822
const FE_BS_LABEL_COLUMNS = F_BS_LABEL_COLUMNS;
const FE_BS_INPUT_COLUMNS = F_BS_INPUT_COLUMNS;
const FE_BS_NOTE_COLUMNS = F_BS_NOTE_COLUMNS;
Carsten  Rose's avatar
Recode    
Carsten Rose committed
823
const FE_WRAP_ROW_LABEL_INPUT_NOTE = 'rowLabelInputNote';
824
const FE_MAX_LENGTH = 'maxLength';
825
const FE_PARAMETER = 'parameter';
826
827
828
const FE_ENCODE = 'encode';
const FE_CHECK_TYPE = 'checkType';
const FE_CHECK_PATTERN = 'checkPattern';
829
830
831
832
833
const FE_TOOLTIP = 'tooltip';
const FE_SIZE = 'size';
const FE_SUBRECORD_OPTION = 'subrecordOption';
const FE_SQL1 = 'sql1';
const FE_PLACEHOLDER = 'placeholder';
834

835
836
837
// FormElement columns: via parameter field
const FE_DATE_FORMAT = 'dateFormat';  // value: FORMAT_DATE_INTERNATIONAL | FORMAT_DATE_GERMAN
const FE_SHOW_SECONDS = 'showSeconds';  // value: 0|1
838
839
const FE_SHOW_ZERO = 'showZero';  // 0|1 - Used for 'date/datime/time': in case of fe.value='0' shows corresponding '00-00-0000'|'00:00:00'
const FE_HIDE_ZERO = 'hideZero';  // 0|1 - In case of fe.value=0|'0', an empty string is shown.
840
const FE_FILE_DESTINATION = 'fileDestination'; // Target pathFilename for an uploaded file.
841
842
const FE_FILE_REPLACE_MODE = 'fileReplace'; // Target pathFilename for an uploaded file.
const FE_FILE_REPLACE_MODE_ALWAYS = 'always'; // Target pathFilename for an uploaded file.
843
844
const FE_FILE_MIME_TYPE_ACCEPT = 'accept'; // Target pathFilename for an uploaded file.
const FE_FILE_MAX_FILE_SIZE = 'maxFileSize'; // Target pathFilename for an uploaded file.
845
const FE_FILE_CAPTURE = 'capture'; // On a smartphone opens the camera
846
const FE_IMAGE_SOURCE = 'imageSource'; // On a smartphone opens the camera
847
848
849
const FE_SQL_VALIDATE = 'sqlValidate'; // Action: Query to validate form load
const FE_EXPECT_RECORDS = 'expectRecords'; // Action: expected number of rows of FE_SQL_VALIDATE
const FE_MESSAGE_FAIL = 'messageFail'; // Action: Message to display, if FE_SQL_VALIDATE fails.
850
const FE_REQUIRED_LIST = 'requiredList'; // Optional list of FormElements which have to be non empty to make this 'action'-FormElement active.
851
const FE_SLAVE_ID = 'slaveId'; // Action; Value or Query to compute id of slave record.
852
853
const FE_SQL_AFTER = 'sqlAfter'; // Action: Always fired
const FE_SQL_BEFORE = 'sqlBefore'; // Action: Always fired
854
855
856
const FE_SQL_UPDATE = 'sqlUpdate'; // Action: Update Statement for slave record
const FE_SQL_INSERT = 'sqlInsert'; // Action: Insert Statement to create slave record.
const FE_SQL_DELETE = 'sqlDelete'; // Action: Delete Statement to delete unused slave record.
857
const FE_SQL_HONOR_FORM_ELEMENTS = 'sqlHonorFormElements'; // Action: Honor given list of FormElements for sqlInsert|Update|Delete
Carsten  Rose's avatar
Carsten Rose committed
858
const FE_EDITOR_PREFIX = 'editor-'; // TinyMCE configuration settings.
859
860
861
862
863
864
865
866
867
const FE_SENDMAIL_TO = 'sendMailTo'; // Receiver email adresses. Separate multiple by comma.
const FE_SENDMAIL_CC = 'sendMailCc'; // CC Receiver email adresses. Separate multiple by comma.
const FE_SENDMAIL_BCC = 'sendMailBcc'; // BCC Receiver email adresses. Separate multiple by comma.
const FE_SENDMAIL_FROM = 'sendMailFrom'; // Sender email address.
const FE_SENDMAIL_SUBJECT = 'sendMailSubject'; // Email subject
const FE_SENDMAIL_REPLY_TO = 'sendMailReplyTo'; // Reply to email address
const FE_SENDMAIL_FLAG_AUTO_SUBMIT = 'sendMailFlagAutoSubmit'; // on|off - if 'on', suppresses OoO answers from receivers.
const FE_SENDMAIL_GR_ID = 'sendMailGrId'; // gr_id: used to classify mail log entries ind table mailLog
const FE_SENDMAIL_X_ID = 'sendMailXId'; // x_id: used to classify mail log entries ind table mailLog
868
869
const FE_SENDMAIL_X_ID2 = 'sendMailXId2'; // x_id: used to classify mail log entries ind table mailLog
const FE_SENDMAIL_X_ID3 = 'sendMailXId3'; // x_id: used to classify mail log entries ind table mailLog
870
const FE_AUTOFOCUS = 'autofocus'; // value: <none>|0|1  , <none>==1, this element becomes the focus during form load.
871
872
873
const FE_RETYPE = 'retype'; // value: <none>|0|1  , <none>==1, this element becomes the focus during form load.
const FE_RETYPE_LABEL = 'retypeLabel'; // value: label text for retype FormElement
const FE_RETYPE_NOTE = 'retypeNote'; // value: note text for retype FormElement
874
const FE_RETYPE_SOURCE_NAME = '_retypeSourceName'; // QFQ internal reference to name of source FormElement.
875
876
877
878
const FE_WRAP_ROW = 'wrapRow';
const FE_WRAP_LABEL = 'wrapLabel';
const FE_WRAP_INPUT = 'wrapInput';
const FE_WRAP_NOTE = 'wrapNote';
879
880
881
882
883
884
885
const FE_HTML_BEFORE = 'htmlBefore';
const FE_HTML_AFTER = 'htmlAfter';
const FE_TEMPLATE_GROUP_ADD_CLASS = 'tgAddClass';
const FE_TEMPLATE_GROUP_ADD_TEXT = 'tgAddText';
const FE_TEMPLATE_GROUP_REMOVE_CLASS = 'tgRemoveClass';
const FE_TEMPLATE_GROUP_REMOVE_TEXT = 'tgRemoveText';
const FE_TEMPLATE_GROUP_CLASS = 'tgClass';
Carsten  Rose's avatar
Carsten Rose committed
886
const FE_TEMPLATE_GROUP_DEFAULT_MAX_LENGTH = 5;
887
const FE_TEMPLATE_GROUP_NAME_PATTERN = '%d';
888
const FE_TEMPLATE_GROUP_NAME_PATTERN_0 = '%D';
889
const FE_TEMPLATE_GROUP_CURRENT_IDX = 'tgCurentIndex';
890
const FE_BUTTON_CLASS = 'buttonClass';
891
892
893
const FE_LDAP_SERVER = F_LDAP_SERVER;
const FE_LDAP_BASE_DN = F_LDAP_BASE_DN;
const FE_LDAP_SEARCH = F_LDAP_SEARCH;