source: extensions/User_Info_Tracking/admin.php @ 32255

Last change on this file since 32255 was 19700, checked in by Charles2012, 12 years ago

Upload to SVN.

File size: 1.3 KB
Line 
1<?php
2/**
3 * This is the main administration page, if you have only one admin page you can put
4 * directly its code here or using the tabsheet system like bellow
5 */
6
7defined('USER_INFO_TRACKING_PATH') or die('Hacking attempt!');
8 
9global $template, $page, $conf;
10
11
12// get current tab
13$page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'home';
14
15// plugin tabsheet is not present on photo page
16if ($page['tab'] != 'photo')
17{
18  // tabsheet
19  include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
20  $tabsheet = new tabsheet();
21  $tabsheet->set_id('skeleton');
22 
23  $tabsheet->add('home', l10n('Data'), USER_INFO_TRACKING_ADMIN . '-home');
24  $tabsheet->add('config', l10n('Configuration'), USER_INFO_TRACKING_ADMIN . '-config');
25  $tabsheet->select($page['tab']);
26  $tabsheet->assign();
27}
28
29// include page
30include(USER_INFO_TRACKING_PATH . 'admin/' . $page['tab'] . '.php');
31
32// template vars
33$template->assign(array(
34  'USER_INFO_TRACKING_PATH'=> get_root_url() . USER_INFO_TRACKING_PATH, // used for images, scripts, ... access
35  'USER_INFO_TRACKING_ABS_PATH'=> realpath(USER_INFO_TRACKING_PATH),    // used for template inclusion (Smarty needs a real path)
36  'USER_INFO_TRACKING_ADMIN' => USER_INFO_TRACKING_ADMIN,
37  ));
38 
39// send page content
40$template->assign_var_from_handle('ADMIN_CONTENT', 'user_info_tracking_content');
41
42?>
Note: See TracBrowser for help on using the repository browser.