1<?php
2// +-----------------------------------------------------------------------+
3// | This file is part of Piwigo.                                          |
4// |                                                                       |
5// | For copyright and license information, please view the COPYING.txt    |
6// | file that was distributed with this source code.                      |
7// +-----------------------------------------------------------------------+
8
9include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
10include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
11
12// +-----------------------------------------------------------------------+
13// | Check Access and exit when user status is not ok                      |
14// +-----------------------------------------------------------------------+
15check_status(ACCESS_ADMINISTRATOR);
16
17$help_link = get_root_url().'admin.php?page=help&section=';
18$selected = null;
19
20if (!isset($_GET['section']))
21{
22  $selected = 'add_photos';
23}
24else
25{
26  $selected = $_GET['section'];
27}
28
29$tabsheet = new tabsheet();
30$tabsheet->set_id('help');
31$tabsheet->select($selected);
32$tabsheet->assign();
33
34trigger_notify('loc_end_help');
35
36$template->set_filenames(array('help' => 'help.tpl'));
37
38$template->assign(
39  array(
40    'HELP_CONTENT' => load_language(
41      'help/help_'.$tabsheet->selected.'.html',
42      '',
43      array('return'=>true)
44      ),
45    'HELP_SECTION_TITLE' => $tabsheet->sheets[ $tabsheet->selected ]['caption'],
46    )
47  );
48
49// +-----------------------------------------------------------------------+
50// |                           sending html code                           |
51// +-----------------------------------------------------------------------+
52
53$template->assign_var_from_handle('ADMIN_CONTENT', 'help');
54?>
55