Files
oc-server3/htdocs/lib2/logic/const.inc.php
following 1c40b83bd2 v3.0.5 code review: lots of small fixes and cleanup
- fixed nano selection in search form
- removed unused, duplicate thumb replacement pics
- freed mysql result in lib1 helppage-link generation
- fixed logpic-is-on-first-page calculation
- fixed and improved user option set handling
- readded map dragzoom
- improved log pic pages layout
- user pics page counter fix
2013-03-15 15:12:01 +01:00

67 lines
2.8 KiB
PHP

<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* 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('REGEX_USERNAME', '^[a-zA-Z0-9\.\-_@äüöÄÜÖ=)(\/\\\&*+~#][a-zA-Z0-9\.\-_ @äüöÄÜÖ=)(\/\\\&*+~#]{1,58}[a-zA-Z0-9\.\-_@äüöÄÜÖ=)(\/\\\&*+~#]$'); // min. 4 -> 3 chars -- following 2012-8-6
define('REGEX_PASSWORD', '^[a-zA-Z0-9\.\-_ @äüöÄÜÖ=)(\/\\\&*+~#]{3,60}$');
define('REGEX_LAST_NAME', '^[a-zA-Z][a-zA-Z0-9\.\- äüöÄÜÖ]{1,59}$');
define('REGEX_FIRST_NAME', '^[a-zA-Z][a-zA-Z0-9\.\- äüöÄÜÖ]{1,59}$');
define('REGEX_STATPIC_TEXT', '^[a-zA-Z0-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); // approve news entries
define('ADMIN_ROOT', 128 | 127); // root + all previous rights
define('ATTRIB_SELECTED', 1);
define('ATTRIB_UNSELECTED', 2);
define('ATTRIB_UNDEF', 3);
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('MAX_LOGENTRIES_ON_CACHEPAGE', 5);
define('MAX_PICTURES_PER_GALLERY_PAGE', 48); // must be multiple of 6
define('MAX_PICTURES_IN_CACHE_GALLERY', 120); // must be multiple of 6
// As of march 2013, there are a good deal of OC.de caches with 50-100 pics,
// but only one with more (~500 pics). If lots of caches have >100 pics,
// it may pay out to limit the gallery e.g. to 60 pics and implement browsing.
// 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);
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);
?>