1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | global $template, $conf, $user; |
---|
6 | |
---|
7 | load_language('plugin.lang', CONCOURS_PATH); |
---|
8 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
9 | include_once(CONCOURS_PATH . 'admin/functions.inc.php'); |
---|
10 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
11 | |
---|
12 | // +-----------------------------------------------------------------------+ |
---|
13 | // | Tabsheet |
---|
14 | // +-----------------------------------------------------------------------+ |
---|
15 | if (!isset($_GET['tab'])) |
---|
16 | $page['tab'] = 'manage'; |
---|
17 | else |
---|
18 | $page['tab'] = $_GET['tab']; |
---|
19 | |
---|
20 | $tabsheet = new tabsheet(); |
---|
21 | $tabsheet->add('manage', |
---|
22 | l10n('concours_management'), |
---|
23 | $my_base_url.'&tab=manage'); |
---|
24 | |
---|
25 | $tabsheet->add('add_concours', |
---|
26 | l10n('concours_add'), |
---|
27 | $my_base_url.'&tab=add_concours&action=new'); |
---|
28 | |
---|
29 | $tabsheet->add('config', |
---|
30 | l10n('concours_config'), |
---|
31 | $my_base_url.'&tab=config'); |
---|
32 | |
---|
33 | $tabsheet->add('params', |
---|
34 | l10n('concours_params'), |
---|
35 | $my_base_url.'&tab=params'); |
---|
36 | /* |
---|
37 | $tabsheet->add('audit', |
---|
38 | l10n('concours_audit'), |
---|
39 | $my_base_url.'&tab=audit'); |
---|
40 | */ |
---|
41 | |
---|
42 | $tabsheet->add('help', |
---|
43 | l10n('concours_help'), |
---|
44 | $my_base_url.'&tab=help'); |
---|
45 | |
---|
46 | $tabsheet->select($page['tab']); |
---|
47 | $tabsheet->assign(); |
---|
48 | |
---|
49 | if (isset($_GET['concours'])) |
---|
50 | { |
---|
51 | // Get informations from base for concours_id |
---|
52 | $concours = new Concours($_GET['concours']); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | // Add informations from previous pages if present |
---|
57 | if (isset($_GET['infos']) && isset($concours)) |
---|
58 | { |
---|
59 | $infos = $_GET['infos']; |
---|
60 | switch($infos) |
---|
61 | { |
---|
62 | case "0" : |
---|
63 | array_push($page['infos'], sprintf( l10n('concours_saved'), $concours->concours_id, $concours->concours_infos['name'])); |
---|
64 | break; |
---|
65 | |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | $template->assign( 'CONCOURS_VERSION', l10n('concoursphoto')." (<i>Version ".CONCOURS_VERSION.'</i>)'); |
---|
70 | |
---|
71 | |
---|
72 | // Include file |
---|
73 | include(CONCOURS_PATH.'admin/'.$page['tab'].'.php'); |
---|
74 | |
---|
75 | ?> |
---|