[9745] | 1 | <?php |
---|
| 2 | if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
[9975] | 4 | if (is_string($conf['ContestResults'])) { |
---|
| 5 | $conf['ContestResults'] = unserialize($conf['ContestResults']); |
---|
| 6 | } |
---|
| 7 | |
---|
[9745] | 8 | // +-----------------------------------------------------------------------+ |
---|
| 9 | // Tabsheet |
---|
| 10 | // +-----------------------------------------------------------------------+ |
---|
| 11 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
| 12 | $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : $page['tab'] = 'manage'; |
---|
| 13 | |
---|
| 14 | $tabsheet = new tabsheet(); |
---|
| 15 | $tabsheet->add('manage', l10n('CR_manage_tab'), CR_ADMIN . '-manage'); // Gestion des concours |
---|
| 16 | $tabsheet->add('new', l10n('CR_new_tab'), CR_ADMIN . '-new'); // Ajouter un nouveau concours |
---|
[9975] | 17 | if (isset($_GET['contest_id'])) { // Editer le concours | Résultats du concours |
---|
[9745] | 18 | $tabsheet->add($page['tab'], l10n('CR_'.$page['tab'].'_tab'), CR_ADMIN . '-' . $page['tab'] . '&contest_id=' . $_GET['contest_id']); |
---|
| 19 | } |
---|
| 20 | $tabsheet->add('config', l10n('Configuration'), CR_ADMIN . '-config'); // Configuration |
---|
| 21 | $tabsheet->select($page['tab']); |
---|
| 22 | $tabsheet->assign(); |
---|
| 23 | |
---|
| 24 | // +-----------------------------------------------------------------------+ |
---|
| 25 | // Template |
---|
| 26 | // +-----------------------------------------------------------------------+ |
---|
| 27 | $template->assign(array( |
---|
| 28 | 'CR_VERSION' => CR_NAME . ' ' . CR_VERSION, |
---|
| 29 | 'CR_PATH' => CR_PATH, |
---|
| 30 | 'CR_ADMIN' => CR_ADMIN, |
---|
| 31 | )); |
---|
| 32 | |
---|
[9975] | 33 | if ($page['tab'] == 'edit') { $page['tab'] = 'new'; } // L'édition se fait sur la page de création |
---|
[9745] | 34 | include(CR_PATH.'admin/' . $page['tab'] . '.php'); |
---|
| 35 | |
---|
| 36 | ?> |
---|