1 | <?php |
---|
2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
3 | global $template, $conf, $user; |
---|
4 | include_once(PHPWG_ROOT_PATH .'admin/include/tabsheet.class.php'); |
---|
5 | load_language('plugin.lang', PPA_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 | // +-----------------------------------------------------------------------+ |
---|
11 | check_status(ACCESS_ADMINISTRATOR); |
---|
12 | |
---|
13 | //-------------------------------------------------------- sections definitions |
---|
14 | |
---|
15 | // Gestion des onglets |
---|
16 | if (!isset($_GET['tab'])) |
---|
17 | $page['tab'] = 'gest'; |
---|
18 | else |
---|
19 | $page['tab'] = $_GET['tab']; |
---|
20 | |
---|
21 | $tabsheet = new tabsheet(); |
---|
22 | $tabsheet->add('gest', |
---|
23 | l10n('ppa_tab_gest'), |
---|
24 | $my_base_url.'&tab=gest'); |
---|
25 | $tabsheet->add('help', |
---|
26 | l10n('ppa_tab_help'), |
---|
27 | $my_base_url.'&tab=help'); |
---|
28 | $tabsheet->select($page['tab']); |
---|
29 | $tabsheet->assign(); |
---|
30 | |
---|
31 | // Onglet gest |
---|
32 | switch ($page['tab']) |
---|
33 | { |
---|
34 | case 'gest': |
---|
35 | |
---|
36 | $template->assign( |
---|
37 | 'gestA', |
---|
38 | array('PPABASE' => $conf['persoAbout'],)); |
---|
39 | |
---|
40 | if (isset($_POST['submitppa']) and !is_adviser()) |
---|
41 | { |
---|
42 | conf_update_param('persoAbout', $_POST['perso_about']); |
---|
43 | |
---|
44 | $template->assign( |
---|
45 | 'gestA', |
---|
46 | array('PPABASE' => stripslashes($_POST['perso_about']),)); |
---|
47 | } |
---|
48 | break; |
---|
49 | |
---|
50 | // Tab help |
---|
51 | case 'help': |
---|
52 | $template->assign( |
---|
53 | 'gestB', |
---|
54 | array('meta'=>l10n('null'),)); |
---|
55 | break; |
---|
56 | |
---|
57 | } |
---|
58 | |
---|
59 | $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
60 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
61 | ?> |
---|