-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathadmin.php
58 lines (53 loc) · 2 KB
/
admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Back-end Expandcontract_XH.
*
* @category CMSimple_XH Plugin
* @author svasti <[email protected]>
* @copyright 2014-16 by svasti < http://svasti.de >
* @copyright 2022 The CMSimple_XH Community < https://www.cmsimple-xh.org/ >
* @version 1.0 - 2022.03.31
*/
if (!defined('CMSIMPLE_XH_VERSION')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
/**
* Registers the plugin menu items
*/
if (function_exists('XH_registerStandardPluginMenuItems')) {
XH_registerStandardPluginMenuItems(true);
}
if (function_exists('XH_wantsPluginAdministration')
&& XH_wantsPluginAdministration('expandcontract')
|| isset($expandcontract) && $expandcontract == 'true')
{
$o .= print_plugin_admin('on');
if (!$admin || $admin == 'plugin_main') {
$o .= '<h1>Expandcontract_XH</h1>'
. '<p>Version 1.0 - 2022.03.31'
. '<br>© 2014-16 <a href="http://svasti.de" target="_blank">svasti</a>'
. '<br>© 2022 <a href="https://www.cmsimple-xh.org/" target="_blank">The CMSimple_XH Community</a>
. <br>Licence: <a target="_blank" href="https://www.gnu.org/licenses/gpl-3.0.en.html">GPLv3</a></p>'
. '<p>'. $plugin_tx['expandcontract']['plugin_explanation']. '</p>'
. '<h2>'.$plugin_tx['expandcontract']['plugin_call'].'</h2>'
. '<p>'. $plugin_tx['expandcontract']['link_hidden_subpages']. '</p>'
. '<p>'. $plugin_tx['expandcontract']['link_multiple_pages']. '</p>'
. '<p>'. $plugin_tx['expandcontract']['link_single_page']. '</p>';
}
$o .= plugin_admin_common($action, $admin, $plugin);
}
/**
* Helper to fill stylesheet selectlist in config.php
*/
function expandGetCssFiles() {
global $pth;
$temp = glob($pth['folder']['plugins'] . 'expandcontract/css/*.css');
$files = array('');
foreach ($temp as $file) {
if (basename($file) !== 'stylesheet.css') {
$files[] = basename($file);
}
}
return $files;
}