Project

General

Profile

1
<?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: index.php 2098 2014-02-11 01:37:03Z darkviper $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/access/index.php $
14
 * @lastmodified    $Date: 2014-02-11 02:37:03 +0100 (Tue, 11 Feb 2014) $
15
 *
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
$template = new Template(dirname($admin->correct_theme_source('access.htt')));
26
// $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
$oTrans = Translate::getInstance();
32
$oTrans->enableAddon('admin\\access');
33
$template->set_var($oTrans->getLangArray());
34

    
35
// Insert values into the template object
36
$template->set_var(array(
37
		'ADMIN_URL' => ADMIN_URL,
38
		'THEME_URL' => THEME_URL,
39
		'WB_URL'    => WB_URL
40
	)
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
		'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
	)
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
?>
    (1-1/1)