Project

General

Profile

1 1529 Luisehahne
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         access
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13 2070 darkviper
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15 1529 Luisehahne
 *
16
 *
17
 */
18
19
require('../../config.php');
20
require_once(WB_PATH.'/framework/class.admin.php');
21
$admin = new admin('Access', 'access');
22
23
// Setup template object, parse vars to it, then parse it
24
// Create new template object
25 1625 Luisehahne
$template = new Template(dirname($admin->correct_theme_source('access.htt')));
26 1529 Luisehahne
// $template->debug = true;
27
$template->set_file('page', 'access.htt');
28
$template->set_block('page', 'main_block', 'main');
29
$template->set_block('main_block', 'users_block', 'user');
30
$template->set_block('main_block', 'groups_block', 'group');
31 2098 darkviper
$oTrans = Translate::getInstance();
32
$oTrans->enableAddon('admin\\access');
33
$template->set_var($oTrans->getLangArray());
34 1529 Luisehahne
35
// Insert values into the template object
36
$template->set_var(array(
37
		'ADMIN_URL' => ADMIN_URL,
38
		'THEME_URL' => THEME_URL,
39 2098 darkviper
		'WB_URL'    => WB_URL
40 1529 Luisehahne
	)
41
);
42
43
/**
44
 *	Insert permission values into the template object
45
 *	Deprecated - as we are using blocks.
46
 */
47
$display_none = "style=\"display: none;\"";
48
if($admin->get_permission('users') != true)	$template->set_var('DISPLAY_USERS', $display_none);
49
if($admin->get_permission('groups') != true) $template->set_var('DISPLAY_GROUPS', $display_none);
50
51
// Insert section names and descriptions
52
$template->set_var(array(
53 2098 darkviper
		'USERS'           => $oTrans->MENU_USERS,
54
		'GROUPS'          => $oTrans->MENU_GROUPS,
55
		'ACCESS'          => $oTrans->MENU_ACCESS,
56
		'USERS_OVERVIEW'  => $oTrans->OVERVIEW_USERS,
57
		'GROUPS_OVERVIEW' => $oTrans->OVERVIEW_GROUPS,
58 1529 Luisehahne
	)
59
);
60
61
if ( $admin->get_permission('users') == true )	$template->parse('main_block', "users_block", true);
62
if ( $admin->get_permission('groups') == true )	$template->parse('main_block', "groups_block", true);
63
64
// Parse template object
65
$template->parse('main', 'main_block', false);
66
$template->pparse('output', 'page');
67
68
// Print admin footer
69
$admin->print_footer();
70
71 4 ryan
?>