mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
#10076 add easy acces on directorys
This commit is contained in:
parent
60756ebb18
commit
27b42d3137
@ -225,67 +225,67 @@ if ($filemanager) {
|
|||||||
$directory = (string) get_parameter('directory');
|
$directory = (string) get_parameter('directory');
|
||||||
if (empty($directory) === true) {
|
if (empty($directory) === true) {
|
||||||
$directory = $fallback_directory;
|
$directory = $fallback_directory;
|
||||||
$base_url = 'index.php?sec=gservers&sec2=godmode/servers/plugin';
|
|
||||||
$setup_url = $base_url.'&filemanager=1&tab=Attachments';
|
|
||||||
$tab = get_parameter('tab', null);
|
|
||||||
$tabs = [
|
|
||||||
'list' => [
|
|
||||||
'text' => '<a href="'.$base_url.'">'.html_print_image(
|
|
||||||
'images/eye_show.png',
|
|
||||||
true,
|
|
||||||
[
|
|
||||||
'title' => __('Plugins'),
|
|
||||||
'class' => 'invert_filter',
|
|
||||||
]
|
|
||||||
).'</a>',
|
|
||||||
'active' => (bool) ($tab != 'Attachments'),
|
|
||||||
],
|
|
||||||
'options' => [
|
|
||||||
'text' => '<a href="'.$setup_url.'">'.html_print_image(
|
|
||||||
'images/collection.png',
|
|
||||||
true,
|
|
||||||
[
|
|
||||||
'title' => __('Attachments'),
|
|
||||||
'class' => 'invert_filter',
|
|
||||||
]
|
|
||||||
).'</a>',
|
|
||||||
'active' => (bool) ($tab == 'Attachments'),
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
if ($tab === 'Attachments') {
|
|
||||||
$helpHeader = '';
|
|
||||||
$titleHeader = __('Index of attachment/plugin');
|
|
||||||
} else {
|
|
||||||
$helpHeader = 'servers_ha_clusters_tab';
|
|
||||||
$titleHeader = __('Plug-ins registered on %s', get_product_name());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Header.
|
|
||||||
ui_print_standard_header(
|
|
||||||
$titleHeader,
|
|
||||||
'images/gm_servers.png',
|
|
||||||
false,
|
|
||||||
$helpHeader,
|
|
||||||
false,
|
|
||||||
$tabs,
|
|
||||||
[
|
|
||||||
[
|
|
||||||
'link' => '',
|
|
||||||
'label' => __('Servers'),
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'link' => '',
|
|
||||||
'label' => __('Plugins'),
|
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$directory = str_replace('\\', '/', $directory);
|
$directory = str_replace('\\', '/', $directory);
|
||||||
$directory = filemanager_safe_directory($directory, $fallback_directory);
|
$directory = filemanager_safe_directory($directory, $fallback_directory);
|
||||||
echo '<h4>'.__('Index of %s', $directory).'</h4>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$base_url = 'index.php?sec=gservers&sec2=godmode/servers/plugin';
|
||||||
|
$setup_url = $base_url.'&filemanager=1&tab=Attachments';
|
||||||
|
$tab = get_parameter('tab', null);
|
||||||
|
$tabs = [
|
||||||
|
'list' => [
|
||||||
|
'text' => '<a href="'.$base_url.'">'.html_print_image(
|
||||||
|
'images/eye_show.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Plugins'),
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
|
).'</a>',
|
||||||
|
'active' => (bool) ($tab != 'Attachments'),
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
'text' => '<a href="'.$setup_url.'">'.html_print_image(
|
||||||
|
'images/collection.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Attachments'),
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
|
).'</a>',
|
||||||
|
'active' => (bool) ($tab == 'Attachments'),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($tab === 'Attachments') {
|
||||||
|
$helpHeader = '';
|
||||||
|
$titleHeader = __('Index of attachment/plugin');
|
||||||
|
} else {
|
||||||
|
$helpHeader = 'servers_ha_clusters_tab';
|
||||||
|
$titleHeader = __('Plug-ins registered on %s', get_product_name());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Header.
|
||||||
|
ui_print_standard_header(
|
||||||
|
$titleHeader,
|
||||||
|
'images/gm_servers.png',
|
||||||
|
false,
|
||||||
|
$helpHeader,
|
||||||
|
false,
|
||||||
|
$tabs,
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Servers'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Plugins'),
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$real_directory = realpath($config['homedir'].'/'.$directory);
|
$real_directory = realpath($config['homedir'].'/'.$directory);
|
||||||
|
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ if ($filemanager) {
|
|||||||
filemanager_file_explorer(
|
filemanager_file_explorer(
|
||||||
$real_directory,
|
$real_directory,
|
||||||
$directory,
|
$directory,
|
||||||
'index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$id_plugin,
|
'index.php?sec=gservers&sec2=godmode/servers/plugin&filemanager=1&id_plugin='.$id_plugin.'&tab=Attachments',
|
||||||
$fallback_directory,
|
$fallback_directory,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user