-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.php
More file actions
46 lines (36 loc) · 965 Bytes
/
init.php
File metadata and controls
46 lines (36 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/*
* (c) Arefiev Artem, Sidorov Andrew
* License for snote project
*/
use ST\Database;
use ST\VariablesRegistry;
$this_dir = dirname(__FILE__);
$config = require ($this_dir . '/config.php');
// Auto-load uses classes
require($this_dir . '/application/lib/classloader/Loader.php');
Loader::addClasses('ST', $this_dir . '/application/core');
$fn_list = array(
'fn.common.php',
// 'fn.init.php',
// 'main.php',
// 'connect_session.php',
// 'connect_server.php',
// 'users_privileges.php',
// 'active_tab_setting.php',
// 'background_get.php',
// 'tables_list_output.php',
// 'stickers_output.php',
// 'users.php',
// 'class.login.php'
);
foreach ($fn_list as $file_name) {
require ($config['dir']['functions'] . $file_name);
}
if (!Database::connect($config)) {
die('Can\'t connect to database');
}
// Save config
VariablesRegistry::set('config', $config);
unset($config);
//fn_dispatch($_REQUEST);