2 /************************************************************************
3 * MXChange v0.2.1 Start: 08/25/2003 *
4 * =============== Last change: 05/29/2004 *
6 * -------------------------------------------------------------------- *
7 * File : databases.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Definitions and arrays (hard-coded databases) *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Definitionen und Datenfelder (hart-codertiert) *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2008 by Roland Haeder *
21 * For more information visit: http://www.mxchange.org *
23 * This program is free software; you can redistribute it and/or modify *
24 * it under the terms of the GNU General Public License as published by *
25 * the Free Software Foundation; either version 2 of the License, or *
26 * (at your option) any later version. *
28 * This program is distributed in the hope that it will be useful, *
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
31 * GNU General Public License for more details. *
33 * You should have received a copy of the GNU General Public License *
34 * along with this program; if not, write to the Free Software *
35 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
37 ************************************************************************/
39 // Some security stuff...
40 if (!defined('__SECURITY')) {
41 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
45 // System-wide return codes
46 addCode('WRONG_PASS' , 0x001);
47 addCode('WRONG_ID' , 0x002);
48 addCode('ID_LOCKED' , 0x003);
49 addCode('ID_UNCONFIRMED' , 0x004);
50 addCode('UNKNOWN_STATUS' , 0x005);
51 addCode('NO_COOKIES' , 0x006);
52 addCode('CNTR_FAILED' , 0x008);
53 addCode('LOGOUT_DONE' , 0x008);
54 addCode('LOGOUT_FAILED' , 0x009);
55 addCode('URL_TLOCK' , 0x00a);
56 addCode('URL_FOUND' , 0x00b);
57 addCode('OVERLENGTH' , 0x00c);
58 addCode('SUBJ_URL' , 0x00d);
59 addCode('BLIST_URL' , 0x00e);
60 addCode('NO_RECS_LEFT' , 0x00f);
61 addCode('INVALID_TAGS' , 0x010);
62 addCode('MORE_POINTS' , 0x011);
63 addCode('COOKIES_DISABLED' , 0x012);
64 addCode('DATA_INVALID' , 0x013);
65 addCode('POSSIBLE_INVALID' , 0x014);
66 addCode('ACCOUNT_LOCKED' , 0x015);
67 addCode('USER_404' , 0x016);
68 addCode('STATS_404' , 0x017);
69 addCode('ALREADY_CONFIRMED', 0x018);
70 addCode('ERROR_MAILID' , 0x019);
71 addCode('EXTENSION_PROBLEM', 0x01a);
72 addCode('MORE_RECEIVERS1' , 0x01b);
73 addCode('MORE_RECEIVERS2' , 0x01c);
74 addCode('MORE_RECEIVERS3' , 0x01d);
75 addCode('INVALID_URL' , 0x01e);
76 addCode('MENU_NOT_VALID' , 0x01f);
77 addCode('LOGIN_FAILED' , 0x020);
78 addCode('BEG_SAME_AS_OWN' , 0x021);
79 addCode('UNHANDLED_STATUS' , 0x022);
81 // Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
82 define('SERVER_URL', "http://www.mxchange.org");
84 // Full version string: /([0-9]){1}\.([0-9]){1}\.([0-9]){1}(-(alpha|beta|pre|rc([1-3]))([0-9]+))?/
85 // If you understand regular expressions ^^^ you may know how I versionize... ;-)
86 define('FULL_VERSION', getActualVersion('Tag'));
88 // Replacement strings
89 $GLOBALS['replacer'] = array(
90 'userid' => "%uid%", // User-ID
91 'surname' => "%vorname%", // Surname
92 'family' => "%nachname%", // Family name
93 'gender' => "%anrede%", // Gender
97 setConfigEntry('one_day', (60*60*24));
100 // Timestamp for yesterday, today ... all at 00:00 am
101 define('START_YDAY', MAKE_TIME(0, 0, 0, time() - getConfig('one_day')));
102 define('START_TDAY', MAKE_TIME(0, 0, 0, time()));
104 // Current SVN revision and date
105 define('CURR_SVN_REVISION', getActualVersion('Revision'));
106 define('CURR_SVN_DATE' , getActualVersion('Date'));
108 // Take a prime number which is long (if you know a longer one please try it out!)
109 define('_PRIME', 591623);
111 // Calculate "entropy" with the prime number (for code generation)
112 define('_ADD', (constant('_PRIME') * constant('_PRIME') / (pi() * getConfig('code_length') + 1)));
114 // Random number for e.g. the "cache-buster" used in OpenX script
115 define('CACHE_BUSTER', mt_rand(1000000, 9999999));
117 // CFG: DEBUG-SQL (if enabled and DEBUG_MODE is enabled all SQL queries will be logged to debug.log)
118 define('DEBUG_SQL', false);
120 // Extra title is empty by default