-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
51 lines (41 loc) · 2.68 KB
/
admin.php
File metadata and controls
51 lines (41 loc) · 2.68 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
// +-----------------------------------------------------------------------+
// | Piwigo - external authentication plugin |
// | https://github.com/byo/piwigo-extauth |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2012-2013 Bartlomiej (byo) Swiecki |
// +-----------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, but |
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 |
// | USA. |
// +-----------------------------------------------------------------------+
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
load_language( "plugin.lang", dirname(__FILE__).'/' );
$template->set_filename('plugin_admin_content', dirname(__FILE__).'/templates/admin.tpl');
if (!isset($_GET['tab']))
$page['tab'] = 'assoc';
else
$page['tab'] = $_GET['tab'];
$my_base_url = get_admin_plugin_menu_link(__FILE__);
$tabsheet = new tabsheet();
$tabsheet->add( 'assoc', l10n('Associate accounts'), add_url_params( $my_base_url, array('tab'=>'assoc') ) );
$tabsheet->add( 'config', l10n('Configuration'), add_url_params( $my_base_url, array('tab'=>'config') ) );
$tabsheet->select($page['tab']);
$tabsheet->assign();
$my_base_url = $tabsheet->sheets[ $page['tab'] ]['url'];
$template->set_filename( 'tab_data', dirname(__FILE__).'/templates/admin_'.$page['tab'].'.tpl' );
include_once( dirname(__FILE__).'/admin_'.$page['tab'].'.php');
$template->assign_var_from_handle( 'TAB_DATA', 'tab_data');
$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');