2016-10-06 15:57:01 +00:00
|
|
|
<?php
|
2021-06-28 13:13:56 +00:00
|
|
|
|
2016-10-06 15:57:01 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2021-06-28 13:13:56 +00:00
|
|
|
if (!defined('CON_FRAMEWORK')) {
|
|
|
|
die('Illegal call');
|
2016-10-06 15:57:01 +00:00
|
|
|
}
|
|
|
|
|
2021-08-23 13:38:26 +00:00
|
|
|
if (!(int) $client > 0) {
|
2021-08-23 18:14:25 +00:00
|
|
|
#if there is no client selected, display empty page
|
|
|
|
$oPage = new cPage();
|
|
|
|
$oPage->render();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
cInclude("includes", "functions.file.php");
|
|
|
|
|
|
|
|
if ($action == "file_delete") {
|
|
|
|
if ($perm->have_perm_area_action($area, $action)) {
|
|
|
|
$path = $cfgClient[$client]["js"]["path"];
|
|
|
|
$sDelFile = filter_input(INPUT_GET, 'delfile', FILTER_SANITIZE_URL);
|
|
|
|
|
|
|
|
if (file_exists($path . $sDelFile)) {
|
|
|
|
unlink($path . $sDelFile);
|
|
|
|
removeFileInformation($client, $sDelFile, 'js', $db);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$notification->displayNotification("error", i18n("Permission denied"));
|
|
|
|
}
|
2021-08-23 13:38:26 +00:00
|
|
|
}
|
|
|
|
|
2016-10-06 15:57:01 +00:00
|
|
|
|
2021-06-28 13:54:32 +00:00
|
|
|
$oDirList = new cGuiFileList($cfgClient[$client]["js"]["path"], 'js');
|
2021-06-28 13:13:56 +00:00
|
|
|
$oDirList->scanDir();
|
2016-10-06 15:57:01 +00:00
|
|
|
|
2021-08-23 18:14:25 +00:00
|
|
|
$oDirList->renderList();
|