Last change
on this file since 29019 was
19735,
checked in by julien1311, 12 years ago
|
admin link modification
|
-
Property svn:eol-style set to
LF
|
File size:
1003 bytes
|
Rev | Line | |
---|
[19472] | 1 | <?php |
---|
| 2 | //Chech whether we are indeed included by Piwigo. |
---|
| 3 | if (!defined('FILE_UPLOADER_PATH')) die('Hacking attempt!'); |
---|
| 4 | |
---|
| 5 | //Load globals |
---|
| 6 | global $template, $conf, $page; |
---|
| 7 | |
---|
| 8 | //Library for tabs |
---|
| 9 | include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php'); |
---|
| 10 | |
---|
| 11 | //Load translation files |
---|
| 12 | load_language('plugin.lang', FILE_UPLOADER_PATH); |
---|
| 13 | |
---|
| 14 | //Check access and exit when user status is not ok |
---|
| 15 | check_status(ACCESS_ADMINISTRATOR); |
---|
| 16 | |
---|
| 17 | //Tab management |
---|
[19735] | 18 | if (empty($conf['File_Uploader_tabs'])) { |
---|
| 19 | $conf['File_Uploader_tabs'] = array('upload', 'configuration', 'help'); |
---|
| 20 | } |
---|
[19472] | 21 | |
---|
[19735] | 22 | $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $conf['File_Uploader_tabs'][0]; |
---|
| 23 | |
---|
| 24 | if (!in_array($page['tab'], $conf['File_Uploader_tabs'])) die('Hacking attempt!'); |
---|
| 25 | |
---|
[19472] | 26 | $tabsheet = new tabsheet(); |
---|
[19735] | 27 | foreach ($conf['File_Uploader_tabs'] as $tab) { |
---|
| 28 | $tabsheet->add($tab, l10n(ucfirst($tab)), FILE_UPLOADER_ADMIN.'-'.$tab); |
---|
| 29 | } |
---|
[19472] | 30 | $tabsheet->select($page['tab']); |
---|
| 31 | $tabsheet->assign(); |
---|
| 32 | |
---|
[19735] | 33 | include_once(FILE_UPLOADER_PATH.'/admin/admin_'.$page['tab'].'.php'); |
---|
[19472] | 34 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.