forked from omgimfamous/dobox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
58 lines (46 loc) · 1.56 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
require('general.config.php');
bff::sessionStart('u');
require(PATH_CORE.'init.php');
$oBff = bff::i()->init(true);
//check offline status
if(!config::get('enabled', 0) && !bff::$isAjax && !FORDEV) {
$oSm->display('offline.tpl', __FILE__, __FILE__);
exit( );
}
//-----------------------------------------------------------
//authorize if user was remembered
$oSm->assign('userLogined', $oSecurity->isLogined());
//run module method
if(bff::$class == 1)
{
$sCenterArea = $oBff->callModule('bbs_search');
// $sCenterArea = tpl::fetchPHP($aData, TPL_PATH.'index.php');
}
else
{
$sCenterArea = $oBff->callModule(bff::$class.'_'.bff::$event);
Errors::i()->assign();
}
$menu = $oBff->callModule('bbs_menu');
$oBff->Banners_assignFrontendBanners();
$oBff->Bbs_getFavorites();
$oBff->Users_getUserBalance();
$oSm->assign('menu_useful', $oBff->Sitemap_getmenu('useful'));
$oSm->assign('counters', $oBff->Sites_getSiteCounters(true) );
if(!$oSecurity->isLogined() && config::get('tpl_bbs_item_edit')!=1) {
//faq - add questions
$oSm->assign('footer_faq', $oBff->Faq_getFooterQuestions(true) );
} else {
//faq - up questions
$oSm->assign('footer_faq', $oBff->Faq_getFooterQuestions(false) );
}
$oSm->assign_by_ref('center_area', $sCenterArea );
$oSm->assign_by_ref('menu', $menu );
if (bff::$class == 'bbs' && bff::$event == 'add') {
$oSm->display('template-no-menu.tpl', __FILE__, __FILE__);
}
else {
$oSm->display('template.tpl', __FILE__, __FILE__);
}
exit(0);