-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.inc
45 lines (38 loc) · 1.37 KB
/
init.inc
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
<?php
// =================================
// START SESSION
// =================================
session_start();
// =================================
// LOAD TRANSLATOR
// =================================
$lang = new translator();
if( isset($_GET['lang']) )
translator::setLanguage($_GET['lang']);
// =================================
// LOAD CUSTOM TEMPLATE
// =================================
if( isset($GLOBALS['CONFIG']['SITE']) && file_exists($GLOBALS['CONFIG']['CLASSPATH'].'template_'.$GLOBALS['CONFIG']['SITE'].'.inc') )
{
$class = 'template_'.$GLOBALS['CONFIG']['SITE'];
$template = new $class();
}
else
$template = template::getDummyImplementation();
// =================================
// LOAD CUSTOM SECURITY
// =================================
if( isset($GLOBALS['CONFIG']['SITE']) && file_exists($GLOBALS['CONFIG']['CLASSPATH'].'security_'.$GLOBALS['CONFIG']['SITE'].'.inc') )
{
$class = 'security_'.$GLOBALS['CONFIG']['SITE'];
$security = new $class();
}
else
$security = security::getDummyImplementation();
// =================================
// LOAD CUSTOM INIT
// =================================
if( isset($GLOBALS['CONFIG']['SITE']) && file_exists($GLOBALS['CONFIG']['CLASSPATH'].'init_'.$GLOBALS['CONFIG']['SITE'].'.inc') )
require_once('init_'.$GLOBALS['CONFIG']['SITE'].'.inc');
define('INIT_LOADED', true);
?>