source: extensions/skeleton/admin.php @ 19885

Last change on this file since 19885 was 18858, checked in by mistic100, 12 years ago

UNIX EOL style

File size: 1.2 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('SKELETON_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('Welcome'), SKELETON_ADMIN . '-home');
24  $tabsheet->add('config', l10n('Configuration'), SKELETON_ADMIN . '-config');
25  $tabsheet->select($page['tab']);
26  $tabsheet->assign();
27}
28
29// include page
30include(SKELETON_PATH . 'admin/' . $page['tab'] . '.php');
31
32// template vars
33$template->assign(array(
34  'SKELETON_PATH'=> get_root_url() . SKELETON_PATH, // used for images, scripts, ... access
35  'SKELETON_ABS_PATH'=> realpath(SKELETON_PATH),    // used for template inclusion (Smarty needs a real path)
36  'SKELETON_ADMIN' => SKELETON_ADMIN,
37  ));
38 
39// send page content
40$template->assign_var_from_handle('ADMIN_CONTENT', 'skeleton_content');
41
42?>
Note: See TracBrowser for help on using the repository browser.