forked from featherbb/featherbb
/
Index.php
36 lines (31 loc) · 1.15 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
<?php
/**
* Copyright (C) 2015 FeatherBB
* based on code by (C) 2008-2015 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
namespace FeatherBB\Controller;
use FeatherBB\Core\Utils;
class Index
{
public function __construct()
{
$this->feather = \Slim\Slim::getInstance();
$this->model = new \FeatherBB\Model\Index();
load_textdomain('featherbb', $this->feather->forum_env['FEATHER_ROOT'].'featherbb/lang/'.$this->feather->user->language.'/index.mo');
}
public function display()
{
$this->feather->template->setPageInfo(array(
'title' => array(Utils::escape($this->feather->forum_settings['o_board_title'])),
'active_page' => 'index',
'is_indexed' => true,
'index_data' => $this->model->print_categories_forums(),
'stats' => $this->model->collect_stats(),
'online' => $this->model->fetch_users_online(),
'forum_actions' => $this->model->get_forum_actions(),
'cur_cat' => 0
))->addTemplate('index.php')->display();
}
}