[881] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
[8728] | 3 | // | Piwigo - a PHP based photo gallery | |
---|
[2297] | 4 | // +-----------------------------------------------------------------------+ |
---|
[19703] | 5 | // | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | |
---|
[2297] | 6 | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | |
---|
| 7 | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | |
---|
| 8 | // +-----------------------------------------------------------------------+ |
---|
| 9 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 10 | // | it under the terms of the GNU General Public License as published by | |
---|
| 11 | // | the Free Software Foundation | |
---|
| 12 | // | | |
---|
| 13 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 14 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 15 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 16 | // | General Public License for more details. | |
---|
| 17 | // | | |
---|
| 18 | // | You should have received a copy of the GNU General Public License | |
---|
| 19 | // | along with this program; if not, write to the Free Software | |
---|
| 20 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 21 | // | USA. | |
---|
| 22 | // +-----------------------------------------------------------------------+ |
---|
[881] | 23 | |
---|
[5920] | 24 | // +-----------------------------------------------------------------------+ |
---|
| 25 | // | initialization | |
---|
| 26 | // +-----------------------------------------------------------------------+ |
---|
[881] | 27 | |
---|
[5920] | 28 | define('PHPWG_ROOT_PATH', '../'); |
---|
| 29 | define('PWG_HELP', true); |
---|
| 30 | define('IN_ADMIN', true); |
---|
| 31 | include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); |
---|
[1072] | 32 | |
---|
[881] | 33 | // +-----------------------------------------------------------------------+ |
---|
[1072] | 34 | // | Check Access and exit when user status is not ok | |
---|
| 35 | // +-----------------------------------------------------------------------+ |
---|
| 36 | check_status(ACCESS_ADMINISTRATOR); |
---|
| 37 | |
---|
[5920] | 38 | $page['body_id'] = 'thePopuphelpPage'; |
---|
| 39 | $title = l10n('Piwigo Help'); |
---|
| 40 | $page['page_banner'] = '<h1>'.$title.'</h1>'; |
---|
| 41 | $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); |
---|
| 42 | include(PHPWG_ROOT_PATH.'include/page_header.php'); |
---|
[881] | 43 | |
---|
[5920] | 44 | if |
---|
| 45 | ( |
---|
| 46 | isset($_GET['page']) |
---|
| 47 | and preg_match('/^[a-z_]*$/', $_GET['page']) |
---|
| 48 | ) |
---|
| 49 | { |
---|
| 50 | $help_content = |
---|
| 51 | load_language('help/'.$_GET['page'].'.html', '', array('return'=>true) ); |
---|
[881] | 52 | |
---|
[5920] | 53 | if ($help_content == false) |
---|
[881] | 54 | { |
---|
[5920] | 55 | $help_content = ''; |
---|
[881] | 56 | } |
---|
[5920] | 57 | |
---|
| 58 | $help_content = trigger_event( |
---|
| 59 | 'get_popup_help_content', $help_content, $_GET['page']); |
---|
[881] | 60 | } |
---|
[5920] | 61 | else |
---|
| 62 | { |
---|
| 63 | die('Hacking attempt!'); |
---|
| 64 | } |
---|
[881] | 65 | |
---|
[5920] | 66 | $template->set_filename('popuphelp','popuphelp.tpl'); |
---|
[881] | 67 | |
---|
[2223] | 68 | $template->assign( |
---|
[5920] | 69 | array |
---|
| 70 | ( |
---|
| 71 | 'HELP_CONTENT' => $help_content |
---|
| 72 | )); |
---|
| 73 | |
---|
[881] | 74 | // +-----------------------------------------------------------------------+ |
---|
[5920] | 75 | // | html code display | |
---|
[881] | 76 | // +-----------------------------------------------------------------------+ |
---|
| 77 | |
---|
[5920] | 78 | $template->pparse('popuphelp'); |
---|
[881] | 79 | |
---|
[5920] | 80 | include(PHPWG_ROOT_PATH.'include/page_tail.php'); |
---|
[881] | 81 | |
---|
[5920] | 82 | ?> |
---|