Skip to content

Commit 15a3d94

Browse files
committed
list dir
1 parent ac7de9d commit 15a3d94

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

bin/v-list-fs-directory

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ fi
3939

4040
# Listing directory
4141
sudo -u $user find "$path" -maxdepth 1 \
42-
-printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n" 2>/dev/null
42+
-printf "%y|%m|%TY-%Tm-%Td|%TH:%TM|%u|%g|%s|%P\n" 2>/dev/null
43+
# -printf "%y|%m|%TY-%Tm-%Td|%TH:%TM:%TS|%u|%g|%s|%P\n" 2>/dev/null
4344

4445
# Exiting
4546
exit $?

web/list/directory/index.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
session_start();
4+
5+
include($_SERVER['DOCUMENT_ROOT'] . "/inc/main.php");
6+
7+
if (empty($panel)) {
8+
$command = VESTA_CMD."v-list-user '".$user."' 'json'";
9+
exec ($command, $output, $return_var);
10+
if ( $return_var > 0 ) {
11+
header("Location: /error/");
12+
exit;
13+
}
14+
$panel = json_decode(implode('', $output), true);
15+
}
16+
17+
$path_a = !empty($_REQUEST['dir_a']) ? $_REQUEST['dir_a'] : '';
18+
$path_b = !empty($_REQUEST['dir_b']) ? $_REQUEST['dir_b'] : '';
19+
$GLOBAL_JS = '<script type="text/javascript">GLOBAL.START_DIR_A = "' . $path_a . '";</script>';
20+
$GLOBAL_JS .= '<script type="text/javascript">GLOBAL.START_DIR_B = "' . $path_b . '";</script>';
21+
$GLOBAL_JS .= '<script type="text/javascript">GLOBAL.ROOT_DIR = "' . $panel[$user]['HOME'] . '";</script>';
22+
23+
// Footer
24+
include($_SERVER['DOCUMENT_ROOT'].'/templates/file_manager/main.php');

0 commit comments

Comments
 (0)