12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- require dirname(__FILE__).'/inc/prepend.php';
- $auth->check(1);
- include dirname(__FILE__).'/inc/connexion.php';
- $p = (!empty($_GET['p'])) ? $_GET['p'] : 'index';
- $p = preg_replace('/[.]{2,}/','',$p);
- $plugin = (!empty($_GET['plugin'])) ? $_GET['plugin'] : '';
- $plugin = preg_replace('/[.]{2,}/','',$plugin);
- if ($plugin != '' && is_dir(dirname(__FILE__).'/tools/'.$plugin)) {
- $plugin = '/tools/'.$plugin;
- } else {
- $plugin = '';
- }
- $page_title = '';
- $page_content = '<p>No file</p>';
- $help_path = dirname(__FILE__).$plugin.'/help/';
- $content = l10n::getHtmlFile($help_path,$p.'.html',DC_LANG,dc_encoding);
- if (preg_match('|<title[^>]*?>(.*?)</title>.*<body[^>]*?>(.*?)</body>|ms',
- $content,$matches)) {
- $page_title = $matches[1];
- $page_content = $matches[2];
- }
- openPopup($page_title.' - '.__('help'));
- echo $page_content;
- closePopup();
- ?>
|