-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin.php
34 lines (26 loc) · 1016 Bytes
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
defined('SORTORDERS_PATH') or die('Hacking attempt!');
global $template, $page, $conf;
// get current tab
$page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $page['tab'] = 'config';
// plugin tabsheet is not present on photo page
if ($page['tab'] != 'photo')
{
// tabsheet
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$tabsheet = new tabsheet();
$tabsheet->set_id('sortorders');
$tabsheet->add('config', l10n('Configuration'), SORTORDERS_ADMIN . '-config');
$tabsheet->select($page['tab']);
$tabsheet->assign();
}
// include page
include(SORTORDERS_PATH . 'admin/' . $page['tab'] . '.php');
// template vars
$template->assign(array(
'SORTORDERS_PATH'=> SORTORDERS_PATH, // used for images, scripts, ... access
'SORTORDERS_ABS_PATH'=> realpath(SORTORDERS_PATH), // used for template inclusion (Smarty needs a real path)
'SORTORDERS_ADMIN' => SORTORDERS_ADMIN,
));
// send page content
$template->assign_var_from_handle('ADMIN_CONTENT', 'sortorders_content');