| 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 2070 2014-01-03 01:21:42Z darkviper $
 | 
  
    | 13 |  * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/access/index.php $
 | 
  
    | 14 |  * @lastmodified    $Date: 2014-01-03 02:21:42 +0100 (Fri, 03 Jan 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 | 
 | 
  
    | 29 | $template->set_block('page', 'main_block', 'main');
 | 
  
    | 30 | $template->set_block('main_block', 'users_block', 'user');
 | 
  
    | 31 | $template->set_block('main_block', 'groups_block', 'group');
 | 
  
    | 32 | 
 | 
  
    | 33 | // Insert values into the template object
 | 
  
    | 34 | $template->set_var(array(
 | 
  
    | 35 | 		'ADMIN_URL' => ADMIN_URL,
 | 
  
    | 36 | 		'THEME_URL' => THEME_URL,
 | 
  
    | 37 | 		'WB_URL' => WB_URL
 | 
  
    | 38 | 	)
 | 
  
    | 39 | );
 | 
  
    | 40 | 
 | 
  
    | 41 | /**
 | 
  
    | 42 |  *	Insert permission values into the template object
 | 
  
    | 43 |  *	Deprecated - as we are using blocks.
 | 
  
    | 44 |  */
 | 
  
    | 45 | $display_none = "style=\"display: none;\"";
 | 
  
    | 46 | if($admin->get_permission('users') != true)	$template->set_var('DISPLAY_USERS', $display_none);
 | 
  
    | 47 | if($admin->get_permission('groups') != true) $template->set_var('DISPLAY_GROUPS', $display_none);
 | 
  
    | 48 | 
 | 
  
    | 49 | // Insert section names and descriptions
 | 
  
    | 50 | $template->set_var(array(
 | 
  
    | 51 | 		'USERS' => $MENU['USERS'],
 | 
  
    | 52 | 		'GROUPS' => $MENU['GROUPS'],
 | 
  
    | 53 | 		'ACCESS' => $MENU['ACCESS'],
 | 
  
    | 54 | 		'USERS_OVERVIEW' => $OVERVIEW['USERS'],
 | 
  
    | 55 | 		'GROUPS_OVERVIEW' => $OVERVIEW['GROUPS'],
 | 
  
    | 56 | 	)
 | 
  
    | 57 | );
 | 
  
    | 58 | 
 | 
  
    | 59 | if ( $admin->get_permission('users') == true )	$template->parse('main_block', "users_block", true);
 | 
  
    | 60 | if ( $admin->get_permission('groups') == true )	$template->parse('main_block', "groups_block", true);
 | 
  
    | 61 | 
 | 
  
    | 62 | // Parse template object
 | 
  
    | 63 | $template->parse('main', 'main_block', false);
 | 
  
    | 64 | $template->pparse('output', 'page');
 | 
  
    | 65 | 
 | 
  
    | 66 | // Print admin footer
 | 
  
    | 67 | $admin->print_footer();
 | 
  
    | 68 | 
 | 
  
    | 69 | ?>
 |