1
|
<?php
|
2
|
/**
|
3
|
*
|
4
|
* @category admin
|
5
|
* @package access
|
6
|
* @author Ryan Djurovich, WebsiteBaker Project
|
7
|
* @author Werner v.d. Decken
|
8
|
* @copyright WebsiteBaker Org. e.V.
|
9
|
* @link http://websitebaker.org/
|
10
|
* @license http://www.gnu.org/licenses/gpl.html
|
11
|
* @platform WebsiteBaker 2.8.3
|
12
|
* @requirements PHP 5.3.6 and higher
|
13
|
* @version $Id: index.php 2 2017-07-02 15:14:29Z Manuela $
|
14
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/admin/access/index.php $
|
15
|
* @lastmodified $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
|
16
|
*
|
17
|
*
|
18
|
*/
|
19
|
if ( !defined( 'WB_PATH' ) ){ require( dirname(dirname((__DIR__))).'/config.php' ); }
|
20
|
if ( !class_exists('admin', false) ) { require(WB_PATH.'/framework/class.admin.php'); }
|
21
|
|
22
|
$admin = new admin('Access', 'access');
|
23
|
|
24
|
// Setup template object, parse vars to it, then parse it
|
25
|
// Create new template object
|
26
|
$template = new Template(dirname($admin->correct_theme_source('access.htt')));
|
27
|
// $template->debug = true;
|
28
|
$template->set_file('page', 'access.htt');
|
29
|
|
30
|
$template->set_block('page', 'main_block', 'main');
|
31
|
|
32
|
// Insert values into the template object
|
33
|
$template->set_var(array(
|
34
|
'ADMIN_URL' => ADMIN_URL,
|
35
|
'THEME_URL' => THEME_URL,
|
36
|
'WB_URL' => WB_URL
|
37
|
)
|
38
|
);
|
39
|
|
40
|
/**
|
41
|
* Insert permission values into the template object
|
42
|
* Deprecated - as we are using blocks.
|
43
|
*/
|
44
|
$display_none = 'style="display: none;"';
|
45
|
if($admin->get_permission('users') != true) { $template->set_var('DISPLAY_USERS', $display_none);}
|
46
|
if($admin->get_permission('groups') != true){ $template->set_var('DISPLAY_GROUPS', $display_none);}
|
47
|
|
48
|
$template->set_block('main_block', 'users_block', 'user');
|
49
|
// Insert section names and descriptions
|
50
|
$template->set_var(array(
|
51
|
'USERS' => $MENU['USERS'],
|
52
|
'USERS_OVERVIEW' => $OVERVIEW['USERS'],
|
53
|
'ACCESS' => $MENU['ACCESS'],
|
54
|
)
|
55
|
);
|
56
|
if ( $admin->get_permission('users') == true ){
|
57
|
$template->parse('main_block', "users_block", true);
|
58
|
} else {
|
59
|
$template->set_block('users', '');
|
60
|
}
|
61
|
|
62
|
$template->set_block('main_block', 'groups_block', 'group');
|
63
|
$template->set_var(array(
|
64
|
'GROUPS' => $MENU['GROUPS'],
|
65
|
'ACCESS' => $MENU['ACCESS'],
|
66
|
'GROUPS_OVERVIEW' => $OVERVIEW['GROUPS'],
|
67
|
)
|
68
|
);
|
69
|
if ( $admin->get_permission('groups') == true ){
|
70
|
$template->parse('main_block', "groups_block", true);
|
71
|
} else {
|
72
|
$template->set_block('groups', '');
|
73
|
}
|
74
|
|
75
|
// Parse template object
|
76
|
$template->parse('main', 'main_block', false);
|
77
|
$template->pparse('output', 'page');
|
78
|
|
79
|
// Print admin footer
|
80
|
$admin->print_footer();
|
81
|
|
82
|
?>
|