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