source: extensions/piwigo_videojs/admin/admin.php @ 24676

Last change on this file since 24676 was 24676, checked in by ddtddt, 11 years ago

[extensions] - piwigo_videojs - add file for translate

File size: 2.3 KB
Line 
1<?php
2/***********************************************
3* File      :   admin.php
4* Project   :   piwigo-videojs
5* Descr     :   Generate the admin panel
6*
7* Created   :   24.06.2012
8*
9* Copyright 2012-2013 <xbgmsharp@gmail.com>
10*
11*
12* This program is free software: you can redistribute it and/or modify
13* it under the terms of the GNU General Public License as published by
14* the Free Software Foundation, either version 3 of the License, or
15* (at your option) any later version.
16*
17* This program is distributed in the hope that it will be useful,
18* but WITHOUT ANY WARRANTY; without even the implied warranty of
19* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20* GNU General Public License for more details.
21*
22* You should have received a copy of the GNU General Public License
23* along with this program.  If not, see <http://www.gnu.org/licenses/>.
24*
25************************************************/
26
27// Check whether we are indeed included by Piwigo.
28if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
29
30// Check access and exit when user status is not ok
31check_status(ACCESS_ADMINISTRATOR);
32
33// Setup plugin Language
34load_language('plugin.lang', VIDEOJS_PATH);
35
36// Fetch the template.
37global $template, $conf, $lang;
38
39include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
40
41// Add the template to the global template
42$template->set_filename('plugin_admin_content', dirname(__FILE__).'/admin.tpl');
43
44if (!isset($_GET['tab']))
45  $page['tab'] = 'config';
46else
47  $page['tab'] = $_GET['tab'];
48
49$my_base_url = get_admin_plugin_menu_link(__FILE__);
50
51$tabsheet = new tabsheet();
52$tabsheet->add( 'config', l10n('Configuration'), add_url_params( $my_base_url, array('tab'=>'config') ) );
53$tabsheet->add( 'sync', l10n('Synchronize'), add_url_params( $my_base_url, array('tab'=>'sync') ) );
54//$tabsheet->add( 'tech', l10n('Add video'), add_url_params( $my_base_url, array('tab'=>'tech') ) );
55$tabsheet->select($page['tab']);
56
57$tabsheet->assign();
58
59$my_base_url = $tabsheet->sheets[ $page['tab'] ]['url'];
60$template->set_filename( 'tab_data', dirname(__FILE__).'/admin_'.$page['tab'].'.tpl' );
61include_once( dirname(__FILE__).'/admin_'.$page['tab'].'.php');
62$template->assign_var_from_handle( 'TAB_DATA', 'tab_data');
63// Assign the template contents to ADMIN_CONTENT
64$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
65
66?>
Note: See TracBrowser for help on using the repository browser.