source: extensions/File_Uploader/admin.php @ 19472

Last change on this file since 19472 was 19472, checked in by julien1311, 8 years ago

first version

  • Property svn:eol-style set to LF
File size: 1.3 KB
Line 
1<?php
2//Chech whether we are indeed included by Piwigo.
3if (!defined('FILE_UPLOADER_PATH')) die('Hacking attempt!');
4
5//Load globals
6global $template, $conf, $page;
7
8//Library for tabs
9include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
10
11//Load translation files
12load_language('plugin.lang', FILE_UPLOADER_PATH);
13
14//Check access and exit when user status is not ok
15check_status(ACCESS_ADMINISTRATOR);
16
17//Initialization
18$my_base_url = get_admin_plugin_menu_link(__FILE__);
19
20//Tab management
21if (!isset($_GET['tab']))
22    $page['tab'] = 'upload';
23else
24    $page['tab'] = $_GET['tab'];
25
26$tabsheet = new tabsheet();
27$tabsheet->add('upload',
28               l10n('Upload'),
29               $my_base_url.'&amp;tab=upload');
30$tabsheet->add('configuration',
31               l10n('Configuration'),
32               $my_base_url.'&amp;tab=configuration');
33$tabsheet->add('help',
34               l10n('Help'),
35               $my_base_url.'&amp;tab=help');
36$tabsheet->select($page['tab']);
37$tabsheet->assign();
38
39switch ($page['tab']) {
40        case 'configuration':
41                include_once(dirname(__FILE__).'/admin/admin_configuration.php');
42                break;
43        case 'help':
44                include_once(dirname(__FILE__).'/admin/admin_help.php');
45                break;
46        default:
47                include_once(dirname(__FILE__).'/admin/admin_upload.php');
48                break;
49}
50?>
Note: See TracBrowser for help on using the repository browser.