source: extensions/scheduler/admin.php @ 25111

Last change on this file since 25111 was 19232, checked in by plg, 12 years ago

initial version of plugin Scheduler

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