source: extensions/pwgCumulus/admin.php @ 15612

Last change on this file since 15612 was 11344, checked in by nikrou, 13 years ago

Remove dependency to swfObject
Allow admin to use animation in main menu

File size: 2.7 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | pwgCumulus  - a plugin for Piwigo                                     |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
6// +-----------------------------------------------------------------------+
7// | This program is free software; you can redistribute it and/or modify  |
8// | it under the terms of the GNU General Public License version 2 as     |
9// | published by  the Free Software Foundation                            |
10// |                                                                       |
11// | This program is distributed in the hope that it will be useful, but   |
12// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
13// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
14// | General Public License for more details.                              |
15// |                                                                       |
16// | You should have received a copy of the GNU General Public License     |
17// | along with this program; if not, write to the Free Software           |
18// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
19// | MA 02110-1301 USA                                                     |
20// +-----------------------------------------------------------------------+
21
22if (!defined('PHPWG_ROOT_PATH')) {
23  die('Hacking attempt!');
24}
25
26load_language('plugin.lang', PWG_CUMULUS_PLUGIN_LANG);
27
28include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
29
30$me = get_plugin_data($plugin_id);
31
32$Tabs = array('main' => l10n('Dashboard'),
33              'menu' => l10n('Menu'),
34              'tags' => l10n('Tags page')
35              );
36$default_tab = 'main';
37$cc_base_url = get_admin_plugin_menu_link(__FILE__);
38
39// tabsheet
40if (!isset($_GET['tab']) or !isset($Tabs[$_GET['tab']])) {
41  $page['tab'] = $default_tab;
42} else {
43  $page['tab'] = $_GET['tab'];
44}
45
46$tabsheet = new tabsheet();
47foreach ($Tabs as $key => $label) {
48  $tabsheet->add($key, $label, $cc_base_url.'&amp;tab='.$key);
49}
50$tabsheet->select($page['tab']);
51$tabsheet->assign();
52
53include_once(PWG_CUMULUS_PLUGIN_ROOT . '/include/admin_' . $page['tab'] . '.inc.php');
54
55$template->set_filename('plugin_admin_content', PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin.tpl');
56$template->assign('PWG_CUMULUS_PLUGIN_CSS', PWG_CUMULUS_PLUGIN_CSS);
57$template->assign('PWG_CUMULUS_PLUGIN_JS', PWG_CUMULUS_PLUGIN_JS);
58$template->assign('PWG_CUMULUS_TAB_ACTION', PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin_' . $page['tab'] . '.tpl');
59$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
60?>
Note: See TracBrowser for help on using the repository browser.