source: extensions/Media_Icon/admin.php @ 24705

Last change on this file since 24705 was 19736, checked in by julien1311, 12 years ago

admin link modification

  • Property svn:eol-style set to LF
File size: 961 bytes
RevLine 
[19325]1<?php
2//Chech whether we are indeed included by Piwigo.
3if (!defined('MEDIA_ICON_PATH')) die('Hacking attempt!');
4
5//Load globals
6global $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', MEDIA_ICON_PATH);
13
14//Check access and exit when user status is not ok
15check_status(ACCESS_ADMINISTRATOR);
16
17//Tab management
[19736]18if (empty($conf['Media_Icon_tabs'])) {
19  $conf['Media_Icon_tabs'] = array('general', 'advanced', 'help');
20}
[19325]21
[19736]22$page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $conf['Media_Icon_tabs'][0];
23
24if (!in_array($page['tab'], $conf['Media_Icon_tabs'])) die('Hacking attempt!'); 
25
[19325]26$tabsheet = new tabsheet();
[19736]27foreach ($conf['Media_Icon_tabs'] as $tab) {
28  $tabsheet->add($tab, l10n(ucfirst($tab)), MEDIA_ICON_ADMIN.'-'.$tab);
29}
[19325]30$tabsheet->select($page['tab']);
31$tabsheet->assign();
32
[19736]33include_once(MEDIA_ICON_PATH.'/admin/admin_'.$page['tab'].'.php');
[19325]34?>
Note: See TracBrowser for help on using the repository browser.