source: extensions/piwigo-openstreetmap/admin/admin.php @ 24677

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

[extensions] - piwigo-openstreetmap - add file for translate

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