source: extensions/PersoAbout/admin/admin.php @ 26228

Last change on this file since 26228 was 26200, checked in by ddtddt, 11 years ago

[extensions] - PersoAbout - only webmaster

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 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', 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// +-----------------------------------------------------------------------+
11check_status(ACCESS_ADMINISTRATOR);
12
13//-------------------------------------------------------- sections definitions
14          if (!is_webmaster())
15  {
16    array_push($page['errors'], l10n('This section is reserved for the webmaster'));
17  }
18  else
19  {
20
21// Gestion des onglets
22if (!isset($_GET['tab']))
23    $page['tab'] = 'gest';
24else
25    $page['tab'] = $_GET['tab'];
26
27$tabsheet = new tabsheet();
28$tabsheet->add('gest',
29               l10n('ppa_tab_gest'),
30               $my_base_url.'&amp;tab=gest');
31$tabsheet->add('help',
32               l10n('ppa_tab_help'),
33               $my_base_url.'&amp;tab=help');
34$tabsheet->select($page['tab']);
35$tabsheet->assign();
36
37// Onglet gest
38switch ($page['tab'])
39{
40  case 'gest':
41
42$template->assign(
43    'gestA',
44    array('PPABASE' => $conf['persoAbout'],));
45
46if (isset($_POST['submitppa']))
47        {
48 conf_update_param('persoAbout', $_POST['perso_about']);
49
50  $template->assign(
51    'gestA',
52    array('PPABASE' => stripslashes($_POST['perso_about']),));
53        }
54  break;
55
56// Tab help
57  case 'help':
58$template->assign(
59    'gestB',
60        array('meta'=>l10n('null'),));
61  break;
62       
63} 
64
65$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl')); 
66$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
67}
68?>
Note: See TracBrowser for help on using the repository browser.