source: extensions/Admin_Messages/admin.php @ 29183

Last change on this file since 29183 was 12356, checked in by mistic100, 13 years ago

Reorganize language files

File size: 1.5 KB
Line 
1<?php
2if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4// Langue et configuration
5global $conf;
6load_language('plugin.lang', AM_PATH);
7$conf['admin_messages'] = unserialize($conf['admin_messages']);
8
9
10// +-----------------------------------------------------------------------+
11//        Tabsheet
12// +-----------------------------------------------------------------------+
13include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
14$page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'list';
15 
16$tabsheet = new tabsheet();
17$tabsheet->add('list', l10n('Messages list'), AM_ADMIN . '-list');     // Liste de smessages
18$tabsheet->add('new', l10n('Add a message'), AM_ADMIN . '-new');       // Ajouter un nouveau message
19if ($page['tab'] == 'edit' AND isset($_GET['message_id'])) {       // Editer le message
20  $tabsheet->add('edit', l10n('Edit the message'), AM_ADMIN . '-edit&amp;message_id=' . $_GET['message_id']);
21}
22$tabsheet->add('config', l10n('Configuration'), AM_ADMIN . '-config');   // Configuration
23$tabsheet->select($page['tab']);
24$tabsheet->assign();
25
26
27// +-----------------------------------------------------------------------+
28//        Template
29// +-----------------------------------------------------------------------+
30$template->assign(array(
31  'AM_PATH' => AM_PATH,
32  'AM_ADMIN' => AM_ADMIN,
33));
34
35if ($page['tab'] == 'edit') { $page['tab'] = 'new'; } // L'édition se fait sur la page de création
36include(AM_PATH .'admin/' . $page['tab'] . '.php');
37?>
Note: See TracBrowser for help on using the repository browser.