source: extensions/add_head_element/admin/admin.php @ 15907

Last change on this file since 15907 was 14969, checked in by ddtddt, 12 years ago

[extensions] - add_head_element - clean code

File size: 1.4 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3global $template, $conf, $user;
4include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php');
5load_language('plugin.lang', AHE_PATH);
6$my_base_url = get_admin_plugin_menu_link(__FILE__);
7
8// +-----------------------------------------------------------------------+
9// | Check Access and exit when user status is not ok                      |
10// +-----------------------------------------------------------------------+
11check_status(ACCESS_ADMINISTRATOR);
12
13//-------------------------------------------------------- sections definitions
14
15// Gestion des onglets
16if (!isset($_GET['tab']))
17    $page['tab'] = 'Management';
18else
19    $page['tab'] = $_GET['tab'];
20
21$tabsheet = new tabsheet();
22$tabsheet->add('Management',
23               l10n('Management'),
24               $my_base_url.'&amp;tab=Management');
25$tabsheet->select($page['tab']);
26$tabsheet->assign();
27
28switch ($page['tab'])
29{
30  case 'Management':
31global $template, $conf;
32   
33  $template->assign(
34    'gestA',
35    array('AHEBASE' => $conf['add_head_element'],));
36
37if (isset($_POST['submitahe']))
38        {
39  conf_update_param('add_head_element', $_POST['ahe']);
40  $template->assign(
41    'gestA',
42    array('AHEBASE' => stripslashes($_POST['ahe']),));
43        }
44 break;
45} 
46
47$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
48$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
49?>
Note: See TracBrowser for help on using the repository browser.