-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
36 lines (29 loc) · 987 Bytes
/
index.php
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
<?php
include './config.php';
include './classes/Helper.class.php';
$GLOBALS['site'] = "start";
if(isset($_GET['site']) && is_string($_GET['site'])){
$name = basename(preg_replace('/[^(\x20-\x7F)]*/', '',$_GET['site']));
if(file_exists('./module/'.$name.'.php')){
$GLOBALS['site'] = $name;
}
}
Helper::loadClasses();
$GLOBALS['template'] = new raintpl();
raintpl::configure( 'tpl_dir','./templates/');
raintpl::configure( 'cache_dir','./cache/templates/');
include './module/'.$GLOBALS['site'].'.php';
$content = Routing::getInstance()->render();
$GLOBALS['template']->assign('content',$content);
include './boxes/login.php';
include './boxes/status.php';
include './boxes/navigation.php';
include './boxes/ping.php';
$GLOBALS['template']->assign('box_news',file_get_contents('boxes/news.php'));
if(isset($GLOBALS['just_content']) && $GLOBALS['just_content'] == true){
$GLOBALS['template']->draw( "index_just_content" );
}
else{
$GLOBALS['template']->draw( "index" );
}
?>