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
9// +-----------------------------------------------------------------------+
10// |                           initialization                              |
11// +-----------------------------------------------------------------------+
12
13define('PHPWG_ROOT_PATH','./');
14define('PWG_HELP', true);
15include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
16
17// +-----------------------------------------------------------------------+
18// | Check Access and exit when user status is not ok                      |
19// +-----------------------------------------------------------------------+
20check_status(ACCESS_GUEST);
21
22$page['body_id'] = 'thePopuphelpPage';
23$title = l10n('Piwigo Help');
24$page['page_banner'] = '';
25$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
26include(PHPWG_ROOT_PATH.'include/page_header.php');
27
28if
29  (
30    isset($_GET['page'])
31    and preg_match('/^[a-z_]*$/', $_GET['page'])
32  )
33{
34  $help_content =
35    load_language('help/'.$_GET['page'].'.html', '', array('return'=>true) );
36
37  if ($help_content == false)
38  {
39    $help_content = '';
40  }
41
42  $help_content = trigger_change(
43    'get_popup_help_content', $help_content, $_GET['page']);
44}
45else
46{
47  die('Hacking attempt!');
48}
49
50$template->set_filename('popuphelp','popuphelp.tpl');
51
52$template->assign(
53  array
54  (
55    'HELP_CONTENT' => $help_content
56  ));
57
58// +-----------------------------------------------------------------------+
59// |                           html code display                           |
60// +-----------------------------------------------------------------------+
61
62$template->pparse('popuphelp');
63
64include(PHPWG_ROOT_PATH.'include/page_tail.php');
65
66?>