/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
20.1.1 by galaxyAbstractor
* Added an simple admin panel to the codeviewer-cmssy stuff
1
<?php
57.2.1 by Gustav Hartvigsson
Fixed encoding problems.
2
 # Set PHP's internal character encoding to UTF-8
3
mb_internal_encoding('UTF-8');
4
5
# Set the character encoding to UTF-8 for all page output
6
header('Content-type: text/html; charset=UTF-8');
20.1.1 by galaxyAbstractor
* Added an simple admin panel to the codeviewer-cmssy stuff
7
8
/*
9
 *---------------------------------------------------------------
10
 * APPLICATION ENVIRONMENT
11
 *---------------------------------------------------------------
12
 *
13
 * You can load different configurations depending on your
14
 * current environment. Setting the environment also influences
15
 * things like logging and error reporting.
16
 *
17
 * This can be set to anything, but default usage is:
18
 *
19
 *     development
20
 *     testing
21
 *     production
22
 *
23
 * NOTE: If you change these, also change the error_reporting() code below
24
 *
25
 */
26
	define('ENVIRONMENT', 'development');
27
/*
28
 *---------------------------------------------------------------
29
 * ERROR REPORTING
30
 *---------------------------------------------------------------
31
 *
32
 * Different environments will require different levels of error reporting.
33
 * By default development will show errors but testing and live will hide them.
34
 */
35
36
if (defined('ENVIRONMENT'))
37
{
38
	switch (ENVIRONMENT)
39
	{
40
		case 'development':
41
			error_reporting(E_ALL);
42
		break;
43
	
44
		case 'testing':
45
		case 'production':
46
			error_reporting(0);
47
		break;
48
49
		default:
50
			exit('The application environment is not set correctly.');
51
	}
52
}
53
54
/*
55
 *---------------------------------------------------------------
56
 * SYSTEM FOLDER NAME
57
 *---------------------------------------------------------------
58
 *
59
 * This variable must contain the name of your "system" folder.
60
 * Include the path if the folder is not in the same  directory
61
 * as this file.
62
 *
63
 */
64
	$system_path = 'system';
65
66
/*
67
 *---------------------------------------------------------------
68
 * APPLICATION FOLDER NAME
69
 *---------------------------------------------------------------
70
 *
71
 * If you want this front controller to use a different "application"
72
 * folder then the default one you can set its name here. The folder
73
 * can also be renamed or relocated anywhere on your server.  If
74
 * you do, use a full server path. For more info please see the user guide:
75
 * http://codeigniter.com/user_guide/general/managing_apps.html
76
 *
77
 * NO TRAILING SLASH!
78
 *
79
 */
80
	$application_folder = 'application';
81
82
/*
83
 * --------------------------------------------------------------------
84
 * DEFAULT CONTROLLER
85
 * --------------------------------------------------------------------
86
 *
87
 * Normally you will set your default controller in the routes.php file.
88
 * You can, however, force a custom routing by hard-coding a
89
 * specific controller class/function here.  For most applications, you
90
 * WILL NOT set your routing here, but it's an option for those
91
 * special instances where you might want to override the standard
92
 * routing in a specific front controller that shares a common CI installation.
93
 *
94
 * IMPORTANT:  If you set the routing here, NO OTHER controller will be
95
 * callable. In essence, this preference limits your application to ONE
96
 * specific controller.  Leave the function name blank if you need
97
 * to call functions dynamically via the URI.
98
 *
99
 * Un-comment the $routing array below to use this feature
100
 *
101
 */
102
	// The directory name, relative to the "controllers" folder.  Leave blank
103
	// if your controller is not in a sub-folder within the "controllers" folder
104
	// $routing['directory'] = '';
105
106
	// The controller class file name.  Example:  Mycontroller
107
	// $routing['controller'] = '';
108
109
	// The controller function you wish to be called.
110
	// $routing['function']	= '';
111
112
113
/*
114
 * -------------------------------------------------------------------
115
 *  CUSTOM CONFIG VALUES
116
 * -------------------------------------------------------------------
117
 *
118
 * The $assign_to_config array below will be passed dynamically to the
119
 * config class when initialized. This allows you to set custom config
120
 * items or override any default config values found in the config.php file.
121
 * This can be handy as it permits you to share one application between
122
 * multiple front controller files, with each file containing different
123
 * config values.
124
 *
125
 * Un-comment the $assign_to_config array below to use this feature
126
 *
127
 */
128
	// $assign_to_config['name_of_config_item'] = 'value of config item';
129
130
131
132
// --------------------------------------------------------------------
133
// END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
134
// --------------------------------------------------------------------
135
136
/*
137
 * ---------------------------------------------------------------
138
 *  Resolve the system path for increased reliability
139
 * ---------------------------------------------------------------
140
 */
141
142
	// Set the current directory correctly for CLI requests
143
	if (defined('STDIN'))
144
	{
145
		chdir(dirname(__FILE__));
146
	}
147
148
	if (realpath($system_path) !== FALSE)
149
	{
150
		$system_path = realpath($system_path).'/';
151
	}
152
153
	// ensure there's a trailing slash
154
	$system_path = rtrim($system_path, '/').'/';
155
156
	// Is the system path correct?
157
	if ( ! is_dir($system_path))
158
	{
159
		exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
160
	}
161
162
/*
163
 * -------------------------------------------------------------------
164
 *  Now that we know the path, set the main path constants
165
 * -------------------------------------------------------------------
166
 */
167
	// The name of THIS file
168
	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
169
170
	// The PHP file extension
171
	// this global constant is deprecated.
172
	define('EXT', '.php');
173
174
	// Path to the system folder
175
	define('BASEPATH', str_replace("\\", "/", $system_path));
176
177
	// Path to the front controller (this file)
178
	define('FCPATH', str_replace(SELF, '', __FILE__));
179
180
	// Name of the "system folder"
181
	define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
182
183
184
	// The path to the "application" folder
185
	if (is_dir($application_folder))
186
	{
187
		define('APPPATH', $application_folder.'/');
188
	}
189
	else
190
	{
191
		if ( ! is_dir(BASEPATH.$application_folder.'/'))
192
		{
193
			exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
194
		}
195
196
		define('APPPATH', BASEPATH.$application_folder.'/');
197
	}
198
199
/*
200
 * --------------------------------------------------------------------
201
 * LOAD THE BOOTSTRAP FILE
202
 * --------------------------------------------------------------------
203
 *
204
 * And away we go...
205
 *
206
 */
207
require_once BASEPATH.'core/CodeIgniter.php';
208
209
/* End of file index.php */
57.2.1 by Gustav Hartvigsson
Fixed encoding problems.
210
/* Location: ./index.php */