-
Notifications
You must be signed in to change notification settings - Fork 46
/
const.inc.php
90 lines (76 loc) · 3.69 KB
/
const.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/***************************************************************************
* For license information see doc/license.txt
*
*
* Business layer constant definitions
***************************************************************************/
define('ID_NEW', - 1);
define('RE_TYPE_INT', 1);
define('RE_TYPE_STRING', 2);
define('RE_TYPE_BOOLEAN', 3);
define('RE_TYPE_DATE', 4);
define('RE_TYPE_FLOAT', 5);
define('RE_TYPE_DOUBLE', 6);
define('RE_INSERT_NOTHING', 0); //
define('RE_INSERT_OVERWRITE', 1); // ignore given values and use function
define('RE_INSERT_IGNORE', 2); // dont use this column on insert
define('RE_INSERT_AUTOINCREMENT', 4); // column is an auto increment column
define('RE_INSERT_AUTOUUID', 8); // if empty, UUID is generated by before insert trigger (not supported for primary key fields)
define('RE_INSERT_NOW', 16); // NOW()
define('EUROPEAN_LETTERS', 'A-Za-zÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ');
// ASCII + ISO-8859-1 0xC0..0xFF
define('REGEX_USERNAME', '^[' . EUROPEAN_LETTERS . '0-9\.\-_@=)(\/\\\&*+~#][' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*+~#]{1,58}[' . EUROPEAN_LETTERS . '0-9\.\-_@=)(\/\\\&*+~#]$');
define('REGEX_PASSWORD', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*+~#]{3,60}$');
define('REGEX_LAST_NAME', '^[' . EUROPEAN_LETTERS . '][' . EUROPEAN_LETTERS . '0-9\.\- ]{0,58}[' . EUROPEAN_LETTERS . '0-9\.]$');
define('REGEX_FIRST_NAME', REGEX_LAST_NAME);
define('REGEX_STATPIC_TEXT', '^[' . EUROPEAN_LETTERS . '0-9\.\-_ @=)(\/\\\&*\$+~#!§%;,-?:\[\]{}¹²³\'\"`\|µ°\%]{0,30}$');
define('ADMIN_TRANSLATE', 1); // edit translation
define('ADMIN_MAINTAINANCE', 2); // check table etc.
define('ADMIN_USER', 4); // drop users, caches etc.
define('ADMIN_NEWS', 8); // obsolete / reserved
define('ADMIN_RESTORE', 16); // restore vandalized listings
define('ADMIN_ROOT', 128 | 127); // root + all previous rights
define('ADMIN_LISTING', 1024); // can edit any cache listings
define('ATTRIB_SELECTED', 1);
define('ATTRIB_UNSELECTED', 2);
define('ATTRIB_UNDEF', 3);
define('ATTRIB_ID_SAFARI', 61);
define('OBJECT_CACHELOG', 1);
define('OBJECT_CACHE', 2);
define('OBJECT_CACHEDESC', 3);
define('OBJECT_USER', 4);
define('OBJECT_TRAVELER', 5);
define('OBJECT_PICTURE', 6);
define('OBJECT_REMOVEDOBJECT', 7);
define('OBJECT_WAYPOINT', 8);
// coordinate types
define('COORDINATE_WAYPOINT', 1);
define('COORDINATE_USERNOTE', 2);
define('MAX_LOGENTRIES_ON_CACHEPAGE', 5);
// threshold for caches to be marked as "new"
// changed from 7 to 14 -- following 2013/6/17
define('NEWCACHES_DAYS', 31);
// constants for user options (must match values in DB!)
define('USR_OPT_GMZOOM', 1);
define('USR_OPT_SHOWSTATS', 5);
define('USR_OPT_MAP_MENU', 6);
define('USR_OPT_MAP_OVERVIEW', 7); // obsolete, no longer supported since Google Maps 3.22
define('USR_OPT_MAP_MAXCACHES', 8);
define('USR_OPT_MAP_ICONSET', 9);
define('USR_OPT_MAP_PREVIEW', 10);
define('USR_OPT_PICSTAT', 11);
define('USR_OPT_TRANSLANG', 12);
define('USR_OPT_OCONLY81', 13);
define('USR_OPT_LOG_AUTOLOAD', 14);
// ID 15 was temporarily used and is reserved, see commit dda7ef0. Continue with 16.
// user.data_license values
define('OLD_DATA_LICSENSE', 0); // before deadline
define('NEW_DATA_LICENSE_ACTIVELY_DECLINED', 1); // declined license
define('NEW_DATA_LICENSE_ACTIVELY_ACCEPTED', 2); // accepted new license on registration
define('NEW_DATA_LICENSE_PASSIVELY_ACCEPTED', 3); // did not decline license until deadline
define('NEW_DATA_LICENSE_PASSIVELY_DECLINED', 4); // could not accept/decline because disabled
//picture upload/resize parameters
define('PICTURE_QUALITY', 85);
define('PICTURE_RESOLUTION', 72);
define('PICTURE_MAX_LONG_SIDE', 1024);