forked from featherbb/featherbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.php
More file actions
71 lines (55 loc) · 2.09 KB
/
Copy pathoptions.php
File metadata and controls
71 lines (55 loc) · 2.09 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Copyright (C) 2015 FeatherBB
* based on code by (C) 2008-2012 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
namespace controller\admin;
class options
{
public function __construct()
{
$this->feather = \Slim\Slim::getInstance();
$this->start = $this->feather->start;
$this->config = $this->feather->config;
$this->user = $this->feather->user;
$this->request = $this->feather->request;
$this->header = new \controller\header();
$this->footer = new \controller\footer();
$this->model = new \model\admin\options();
}
public function __autoload($class_name)
{
require FEATHER_ROOT . $class_name . '.php';
}
public function display()
{
global $lang_common, $lang_admin_common;
require FEATHER_ROOT.'include/common_admin.php';
if ($this->user->g_id != FEATHER_ADMIN) {
message($lang_common['No permission'], '403');
}
define('FEATHER_ADMIN_CONSOLE', 1);
// Load the admin_options.php language file
require FEATHER_ROOT.'lang/'.$admin_language.'/options.php';
if ($this->feather->request->isPost()) {
$this->model->update_options();
}
$page_title = array(feather_escape($this->config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Options']);
define('FEATHER_ACTIVE_PAGE', 'admin');
$this->header->setTitle($page_title)->display();
generate_admin_menu('options');
$this->feather->render('admin/options.php', array(
'lang_admin_options' => $lang_admin_options,
'feather_config' => $this->config,
'feather_user' => $this->user,
'languages' => forum_list_langs(),
'styles' => $this->model->get_styles(),
'times' => $this->model->get_times(),
'feather' => $this->feather,
)
);
$this->footer->display();
}
}