1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
//------------------------------------------------------------------------------ |
4
|
|
|
// |
5
|
|
|
// eTraxis - Records tracking web-based system |
6
|
|
|
// Copyright (C) 2004-2011 Artem Rodygin |
7
|
|
|
// |
8
|
|
|
// This program is free software: you can redistribute it and/or modify |
9
|
|
|
// it under the terms of the GNU General Public License as published by |
10
|
|
|
// the Free Software Foundation, either version 3 of the License, or |
11
|
|
|
// (at your option) any later version. |
12
|
|
|
// |
13
|
|
|
// This program is distributed in the hope that it will be useful, |
14
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
|
|
|
// GNU General Public License for more details. |
17
|
|
|
// |
18
|
|
|
// You should have received a copy of the GNU General Public License |
19
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. |
20
|
|
|
// |
21
|
|
|
//------------------------------------------------------------------------------ |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Engine dummy file. |
25
|
|
|
* |
26
|
|
|
* This module contains only eTraxis error codes definition. Also the module includes all other |
27
|
|
|
* modules of eTraxis engine, so this is the only file you have to include in your sources. |
28
|
|
|
* |
29
|
|
|
* @package Engine |
30
|
|
|
*/ |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Engine configuration. |
34
|
|
|
*/ |
35
|
|
|
require_once('../config.php'); |
36
|
|
|
|
37
|
|
|
//------------------------------------------------------------------------------ |
38
|
|
|
// Definitions. |
39
|
|
|
//------------------------------------------------------------------------------ |
40
|
|
|
|
41
|
|
|
/**#@+ |
42
|
|
|
* Error code. |
43
|
|
|
*/ |
44
|
|
|
define('NO_ERROR', 0); |
45
|
|
|
define('ERROR_UNKNOWN', 1); |
46
|
|
|
define('ERROR_NOT_FOUND', 2); |
47
|
|
|
define('ERROR_INCOMPLETE_FORM', 3); |
48
|
|
|
define('ERROR_UNKNOWN_USERNAME', 4); |
49
|
|
|
define('ERROR_ACCOUNT_DISABLED', 5); |
50
|
|
|
define('ERROR_ACCOUNT_LOCKED', 6); |
51
|
|
|
define('ERROR_INVALID_USERNAME', 7); |
52
|
|
|
define('ERROR_ALREADY_EXISTS', 8); |
53
|
|
|
define('ERROR_INVALID_EMAIL', 9); |
54
|
|
|
define('ERROR_PASSWORDS_DO_NOT_MATCH', 10); |
55
|
|
|
define('ERROR_PASSWORD_TOO_SHORT', 11); |
56
|
|
|
define('ERROR_INVALID_INTEGER_VALUE', 12); |
57
|
|
|
define('ERROR_INTEGER_VALUE_OUT_OF_RANGE', 13); |
58
|
|
|
define('ERROR_MIN_MAX_VALUES', 14); |
59
|
|
|
define('ERROR_UPLOAD_INI_SIZE', 15); |
60
|
|
|
define('ERROR_UPLOAD_FORM_SIZE', 16); |
61
|
|
|
define('ERROR_UPLOAD_PARTIAL', 17); |
62
|
|
|
define('ERROR_UPLOAD_NO_FILE', 18); |
63
|
|
|
define('ERROR_UPLOAD_NO_TMP_DIR', 19); |
64
|
|
|
define('ERROR_RECORD_NOT_FOUND', 20); |
65
|
|
|
define('ERROR_INVALID_DATE_VALUE', 21); |
66
|
|
|
define('ERROR_DATE_VALUE_OUT_OF_RANGE', 22); |
67
|
|
|
define('ERROR_INVALID_TIME_VALUE', 23); |
68
|
|
|
define('ERROR_TIME_VALUE_OUT_OF_RANGE', 24); |
69
|
|
|
define('ERROR_UNAUTHORIZED', 25); |
70
|
|
|
define('ERROR_DEFAULT_VALUE_OUT_OF_RANGE', 26); |
71
|
|
|
define('ERROR_UPLOAD_CANT_WRITE', 27); |
72
|
|
|
define('ERROR_UPLOAD_EXTENSION', 28); |
73
|
|
|
define('ERROR_VALUE_FAILS_REGEX_CHECK', 29); |
74
|
|
|
define('ERROR_XML_PARSER', 30); |
75
|
|
|
define('ERROR_INVALID_FLOAT_VALUE', 31); |
76
|
|
|
define('ERROR_FLOAT_VALUE_OUT_OF_RANGE', 32); |
77
|
|
|
/**#@-*/ |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Autodetect a path to filesystem root of eTraxis. |
81
|
|
|
*/ |
82
|
|
|
define('LOCALROOT', dirname(dirname(__FILE__))); |
83
|
|
|
|
84
|
|
|
//------------------------------------------------------------------------------ |
85
|
|
|
// Engine modules. |
86
|
|
|
//------------------------------------------------------------------------------ |
87
|
|
|
|
88
|
|
|
/**#@+ |
89
|
|
|
* Engine module. |
90
|
|
|
*/ |
91
|
|
|
require_once('../engine/debug.php'); |
92
|
|
|
require_once('../engine/timezone.php'); |
93
|
|
|
require_once('../engine/smtp.php'); |
94
|
|
|
require_once('../engine/utility.php'); |
95
|
|
|
require_once('../engine/locale.php'); |
96
|
|
|
require_once('../engine/cookies.php'); |
97
|
|
|
require_once('../engine/dal.php'); |
98
|
|
|
require_once('../engine/ldap.php'); |
99
|
|
|
require_once('../engine/themes.php'); |
100
|
|
|
require_once('../engine/sessions.php'); |
101
|
|
|
require_once('../engine/bbcode.php'); |
102
|
|
|
require_once('../engine/xml.php'); |
103
|
|
|
/**#@-*/ |
104
|
|
|
|
105
|
|
|
?> |
|
|
|
|
106
|
|
|
|
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.