mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 13:01:51 -07:00
list dir
This commit is contained in:
parent
ac7de9d619
commit
15a3d9486e
2 changed files with 26 additions and 1 deletions
|
@ -39,7 +39,8 @@ fi
|
||||||
|
|
||||||
# Listing directory
|
# Listing directory
|
||||||
sudo -u $user find "$path" -maxdepth 1 \
|
sudo -u $user find "$path" -maxdepth 1 \
|
||||||
-printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n" 2>/dev/null
|
-printf "%y|%m|%TY-%Tm-%Td|%TH:%TM|%u|%g|%s|%P\n" 2>/dev/null
|
||||||
|
# -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n" 2>/dev/null
|
||||||
|
|
||||||
# Exiting
|
# Exiting
|
||||||
exit $?
|
exit $?
|
||||||
|
|
24
web/list/directory/index.php
Normal file
24
web/list/directory/index.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
include($_SERVER['DOCUMENT_ROOT'] . "/inc/main.php");
|
||||||
|
|
||||||
|
if (empty($panel)) {
|
||||||
|
$command = VESTA_CMD."v-list-user '".$user."' 'json'";
|
||||||
|
exec ($command, $output, $return_var);
|
||||||
|
if ( $return_var > 0 ) {
|
||||||
|
header("Location: /error/");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$panel = json_decode(implode('', $output), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$path_a = !empty($_REQUEST['dir_a']) ? $_REQUEST['dir_a'] : '';
|
||||||
|
$path_b = !empty($_REQUEST['dir_b']) ? $_REQUEST['dir_b'] : '';
|
||||||
|
$GLOBAL_JS = '<script type="text/javascript">GLOBAL.START_DIR_A = "' . $path_a . '";</script>';
|
||||||
|
$GLOBAL_JS .= '<script type="text/javascript">GLOBAL.START_DIR_B = "' . $path_b . '";</script>';
|
||||||
|
$GLOBAL_JS .= '<script type="text/javascript">GLOBAL.ROOT_DIR = "' . $panel[$user]['HOME'] . '";</script>';
|
||||||
|
|
||||||
|
// Footer
|
||||||
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/file_manager/main.php');
|
Loading…
Add table
Add a link
Reference in a new issue