source: extensions/ConcoursPhoto/admin/admin.php @ 24311

Last change on this file since 24311 was 9370, checked in by tiico, 14 years ago
  • Add help page for the plugin (on admin page)
  • Some Corrections
File size: 2.1 KB
RevLine 
[8946]1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $template, $conf, $user;
6
7load_language('plugin.lang', CONCOURS_PATH);
8include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
9include_once(CONCOURS_PATH . 'admin/functions.inc.php');
10$my_base_url = get_admin_plugin_menu_link(__FILE__);
11
12// +-----------------------------------------------------------------------+
13// |                            Tabsheet
14// +-----------------------------------------------------------------------+
15if (!isset($_GET['tab']))
16    $page['tab'] = 'manage';
17else
18    $page['tab'] = $_GET['tab'];
19
20$tabsheet = new tabsheet();
21$tabsheet->add('manage',
22               l10n('concours_management'),
23               $my_base_url.'&amp;tab=manage');
24
25$tabsheet->add('add_concours',
26               l10n('concours_add'),
27               $my_base_url.'&amp;tab=add_concours&amp;action=new');
28
29$tabsheet->add('config',
30               l10n('concours_config'),
31               $my_base_url.'&amp;tab=config');
32
33$tabsheet->add('params',
34               l10n('concours_params'),
35               $my_base_url.'&amp;tab=params');
[9370]36/*
[8946]37$tabsheet->add('audit',
38               l10n('concours_audit'),
39               $my_base_url.'&amp;tab=audit');
[9370]40*/
[8946]41
[9370]42$tabsheet->add('help',
43               l10n('concours_help'),
44               $my_base_url.'&amp;tab=help');
45
[8946]46$tabsheet->select($page['tab']);
47$tabsheet->assign();
48
[8965]49if (isset($_GET['concours']))
50{
51    // Get informations from base for concours_id
52    $concours = new Concours($_GET['concours']);
53}
[8946]54
[8965]55
56// Add informations from previous pages if present
57if (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    }
[9364]67}
[8965]68           
[9364]69$template->assign( 'CONCOURS_VERSION', l10n('concoursphoto')." (<i>Version ".CONCOURS_VERSION.'</i>)');
[8965]70
71
[8946]72// Include file
73include(CONCOURS_PATH.'admin/'.$page['tab'].'.php');
74
[3905]75?>
Note: See TracBrowser for help on using the repository browser.