source: extensions/header_manager/admin.php @ 16937

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

ability to define a specific banner for an album + apply to sub-cats
(needs Piwigo 2.4.2 for tabs)

File size: 1.1 KB
Line 
1<?php
2if (!defined('HEADER_MANAGER_PATH')) die('Hacking attempt!');
3
4global $template, $page;
5load_language('plugin.lang', HEADER_MANAGER_PATH);
6
7if (!file_exists(HEADER_MANAGER_DIR)) 
8{
9  mkdir(HEADER_MANAGER_DIR, 0755);
10}
11
12$page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : 'config';
13
14if ($page['tab'] == 'album')
15{
16  include(HEADER_MANAGER_PATH . 'admin/album.php');
17}
18else
19{
20  // tabsheet
21  include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');   
22  $tabsheet = new tabsheet();
23  $tabsheet->add('config', l10n('Configuration'), HEADER_MANAGER_ADMIN . '-config');
24  $tabsheet->add('add', l10n('Add a banner'), HEADER_MANAGER_ADMIN . '-add');
25  $tabsheet->select($page['tab']);
26  $tabsheet->assign();
27
28  // include page
29  include(HEADER_MANAGER_PATH . 'admin/' . $page['tab'] . '.php');
30
31  // template
32  $template->assign(array(
33    'CONFIG_URL' => HEADER_MANAGER_ADMIN . '-config',
34    'ADD_IMAGE_URL' => HEADER_MANAGER_ADMIN . '-add',
35    ));
36}
37
38$template->assign('HEADER_MANAGER_PATH', HEADER_MANAGER_PATH);
39
40$template->assign_var_from_handle('ADMIN_CONTENT', 'header_manager');
41
42?>
Note: See TracBrowser for help on using the repository browser.