-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
106 lines (97 loc) · 3.45 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/**
* jQuery for CMSimple
*
* Admin-interface for configuring the plugin
* via the standard-functions of pluginloader.
*
* Version: 1.6.8
* Build: 2024101401
* Copyright: Holger Irmler
* Email: [email protected]
* Website: http://CMSimple.HolgerIrmler.de
* Copyright: CMSimple_XH developers
* Website: https://www.cmsimple-xh.org/?About-CMSimple_XH/The-XH-Team
* */
if (!defined('CMSIMPLE_XH_VERSION')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
/*
* Register the plugin menu items.
*/
if (function_exists('XH_registerStandardPluginMenuItems')) {
XH_registerStandardPluginMenuItems(false);
}
if (isset($_GET['jquery'])) {
//Helper-functions
function jquery_getCoreVersions() {
global $pth;
$versions = array();
$handle = opendir($pth['folder']['plugins'] . 'jquery/lib/jquery/');
while (false !== ($entry = readdir($handle))) {
if ($entry != '.' && $entry != '..') {
$versions[] = $entry;
}
}
closedir($handle);
sort($versions);
return $versions;
}
function jquery_getUiVersions() {
global $pth;
$versions = array();
$handle = opendir($pth['folder']['plugins'] . 'jquery/lib/jquery_ui/');
while (false !== ($entry = readdir($handle))) {
if ($entry != '.' && $entry != '..') {
$versions[] = $entry;
}
}
closedir($handle);
sort($versions);
return $versions;
}
function jquery_getMigrateVersions() {
global $pth;
$temp = glob($pth['folder']['plugins'] . 'jquery/lib/migrate/*.js');
$versions = array();
foreach ($temp as $version) {
$versions[] = basename($version);
}
return $versions;
}
$admin = isset($_POST['admin']) ? $_POST['admin'] : $admin = isset($_GET['admin']) ? $_GET['admin'] : '';
$action = isset($_POST['action']) ? $_POST['action'] : $action = isset($_GET['action']) ? $_GET['action'] : '';
$plugin = basename(dirname(__FILE__), "/");
include_once($pth['folder']['plugins'] . 'jquery/jquery.inc.php');
include_jQuery();
include_jQueryUI();
$o .= print_plugin_admin('off');
if ($admin <> 'plugin_main') {
$o .= plugin_admin_common($action, $admin, $plugin);
}
if ($admin == 'plugin_main') {
$o .= plugin_admin_common($action, $admin, $plugin);
}
if ($admin == '') {
$o .= "\n" . '<div>';
$o .= "\n" . '<h1>jQuery for CMSimple</h1>';
$o .= "\n" . '<p>Version 1.6.8 - 2024-10-14</p>';
$o .= "\n" . '<p>©2011-2023 <a href="http://cmsimple.holgerirmler.de/" target="_blank">http://CMSimple.HolgerIrmler.de</a></p>';
$o .= "\n" . '<p>©2024 <a href="https://www.cmsimple-xh.org/?About-CMSimple_XH/The-XH-Team" target="_blank">The CMSimple_XH developers</a></p>';
$o .= "\n" . '<p>';
$o .= "\n" . 'jQuery Version: ';
$o .= '<script>
var migrate = " & Migrate-Plugin";
if (typeof jQuery.migrateWarnings === \'undefined\') {
migrate = "";
}
document.write(jQuery.fn.jquery + migrate)
</script>';
$o .= "\n" . '<br>';
$o .= "\n" . 'jQueryUI Version: ';
$o .= '<script>document.write(jQuery.ui.version)</script>';
$o .= "\n" . '</p>';
$o .= "\n" . '</div>';
}
}