source: extensions/CommentEditor/trunk/administration.php @ 7576

Last change on this file since 7576 was 3554, checked in by Criss, 15 years ago

Move current code to trunk

  • Property svn:eol-style set to LF
File size: 1.6 KB
Line 
1<?php
2/* $Id: administration.php,v 1.3 2009/06/29 11:43:18 Criss Exp $ */
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
5
6$config_tabs[]='config';
7
8global $template, $page;
9// Include language advices
10load_language('plugin.lang', CE_PATH);
11
12$ce_plugin = get_plugin_data($plugin_id);
13$ce_config = $ce_plugin->getConfig();
14
15// Tabs management
16if (!isset($_GET['tab'])) {
17    $page['tab'] = $config_tabs[0];
18} else {
19    $page['tab'] = $_GET['tab'];
20}
21
22if (!in_array($page['tab'], $config_tabs)) {
23    $page['tab'] = $config_tabs[0];
24}
25
26
27$base_admin_url = get_admin_plugin_menu_link(__FILE__);
28
29$tabsheet = new tabsheet();
30
31foreach ($config_tabs as $current_tab) {
32    $tab_name = 'ce_tab_'.$current_tab;
33    $tabsheet->add($current_tab,
34                   l10n($tab_name),
35                   $base_admin_url.'&amp;tab='.$current_tab);
36}
37$tabsheet->select($page['tab']);
38$tabsheet->assign();
39
40// Define common values
41$template->set_filenames(array(
42                            'plugin_admin_content' => CE_AMDIN_TPL
43                                                      . $page['tab']
44                                                      . '.tab.tpl'
45                          )
46                      );
47
48
49// Define common values
50$ce_common = array(
51    'version' => $ce_plugin->getVersion(),
52    'title'   => $ce_plugin->plugin_id,
53);
54$template->assign('CE', $ce_common);
55
56// Include specific tab
57include_once (CE_ADMIN . $page['tab'] . '.tab.php');
58
59$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
60
61?>
Note: See TracBrowser for help on using the repository browser.