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