removed
[mailer.git] / inc / databases.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 08/25/2003 *
4  * ===============                              Last change: 05/29/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : databases.php                                    *
8  * -------------------------------------------------------------------- *
9  * Short description : Definitions and arrays (hard-coded databases)    *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Definitionen und Datenfelder (hart-codertiert)   *
12  * -------------------------------------------------------------------- *
13  *                                                                      *
14  * -------------------------------------------------------------------- *
15  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
16  * For more information visit: http://www.mxchange.org                  *
17  *                                                                      *
18  * This program is free software; you can redistribute it and/or modify *
19  * it under the terms of the GNU General Public License as published by *
20  * the Free Software Foundation; either version 2 of the License, or    *
21  * (at your option) any later version.                                  *
22  *                                                                      *
23  * This program is distributed in the hope that it will be useful,      *
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
26  * GNU General Public License for more details.                         *
27  *                                                                      *
28  * You should have received a copy of the GNU General Public License    *
29  * along with this program; if not, write to the Free Software          *
30  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
31  * MA  02110-1301  USA                                                  *
32  ************************************************************************/
33
34 // Some security stuff...
35 if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
36 {
37         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
38         require($INC);
39 }
40
41 // System-wide return codes
42 define('CODE_WRONG_PASS'       ,  "1");
43 define('CODE_WRONG_ID'         ,  "2");
44 define('CODE_ID_LOCKED'        ,  "3");
45 define('CODE_ID_UNCONFIRMED'   ,  "4");
46 define('CODE_UNKNOWN_STATUS'   ,  "5");
47 define('CODE_NO_COOKIES'       ,  "6");
48 define('CODE_CNTR_FAILED'      ,  "8");
49 define('CODE_LOGOUT_DONE'      ,  "8");
50 define('CODE_LOGOUT_FAILED'    ,  "9");
51 define('CODE_URL_TLOCK'        , "10");
52 define('CODE_URL_FOUND'        , "11");
53 define('CODE_OVERLENGTH'       , "12");
54 define('CODE_SUBJ_URL'         , "13");
55 define('CODE_BLIST_URL'        , "14");
56 define('CODE_NO_RECS_LEFT'     , "15");
57 define('CODE_INVALID_TAGS'     , "16");
58 define('CODE_MORE_POINTS'      , "18");
59 define('CODE_COOKIES_DISABLED' , "18");
60 define('CODE_DATA_INVALID'     , "19");
61 define('CODE_POSSIBLE_INVALID' , "20");
62 define('CODE_ACCOUNT_LOCKED'   , "21");
63 define('CODE_USER_404'         , "22");
64 define('CODE_STATS_404'        , "23");
65 define('CODE_ALREADY_CONFIRMED', "24");
66 define('CODE_ERROR_MAILID'     , "25");
67 define('CODE_EXTENSION_PROBLEM', "26");
68 define('CODE_MORE_RECEIVERS1'  , "28");
69 define('CODE_MORE_RECEIVERS2'  , "28");
70 define('CODE_MORE_RECEIVERS3'  , "29");
71 define('CODE_INVALID_URL'      , "30");
72 define('CODE_MENU_NOT_VALID'   , "31");
73 define('CODE_LOGIN_FAILED'     , "32");
74
75 // Full version string: /([0-9]){1}\.([0-9]){1}\.([0-9]){1}(-(alpha|beta|pre|rc([1-3]))([0-9]+))?/
76 // If you understand regular expressions ^^^ you may know how I versionize... ;-)
77 define('FULL_VERSION', "0.2.1-FINAL");
78
79 // Replacement strings
80 $REPLACER = array(
81         10 => "%uid%",                  // User-ID
82         11 => "%vorname%",              // Surname
83         12 => "%nachname%",             // Family name
84         13 => "%anrede%",               // Salutation
85 );
86 //
87 // One day
88 define('ONE_DAY', 60*60*24);
89
90 //
91 // Timestamp for yesterday, today ... all at 00:00 am
92 define('START_YDAY', MAKE_TIME(0, 0, 0, time() - ONE_DAY));
93 define('START_TDAY', MAKE_TIME(0, 0, 0, time()));
94
95 $COOKIES = substr(URL, strpos(substr(URL, 8), "/") + 8);
96 if ((strpos($COOKIES, "/") == "0") && (strpos(substr(URL, 8), "/") > 0))
97 {
98         // Script was installed into a sub directory
99         if (substr($COOKIES, -1) != "/") $COOKIES .= "/";
100 }
101  else
102 {
103         // No more sub directories added to URL
104         $COOKIES = "/";
105 }
106
107 // Cookie-Path ( for lame servers... ;-) )
108 define('COOKIE_PATH', $COOKIES);
109
110 // Base directory for access logfiles
111 define('LOGS_BASE', "logs");
112
113 // Base directory for usage statistics
114 define('USAGE_BASE', "usage");
115
116 // Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
117 define('SERVER_URL', "http://www.mxchange.org");
118
119 // This current patch level
120 define('CURR_PATCH_LEVEL', "514");
121
122 // Take a prime number which is long (if you know a longer one please try it out!)
123 define('_PRIME', 591623);
124
125 // Calculate with the prime number (for code generation)
126 define('_ADD', (_PRIME * _PRIME / (pi() * $CONFIG['code_length'] + 1)));
127
128 //
129 ?>