mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
FileManager stuff
This commit is contained in:
parent
5c8e3d3489
commit
7565e8217f
13 changed files with 514 additions and 60 deletions
|
@ -57,20 +57,24 @@ if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) {
|
|||
if ($fn) {
|
||||
$f = fopen ($fn, 'w+');
|
||||
fwrite($f, $_POST['contents']);
|
||||
fclose($f);
|
||||
|
||||
chmod($fn, 0644);
|
||||
|
||||
if ($f) {
|
||||
//copy($fn, $path);
|
||||
exec (VESTA_CMD . "v-copy-fs-file {$user} {$fn} {$path}", $output, $return_var);
|
||||
|
||||
$error = check_return_code($return_var, $output);
|
||||
if ($return_var != 0) {
|
||||
var_dump(VESTA_CMD . "v-copy-fs-file {$user} {$fn} {$path}");
|
||||
/*var_dump(VESTA_CMD . "v-copy-fs-file {$user} {$fn} {$path}");
|
||||
var_dump($path);
|
||||
var_dump($output);
|
||||
var_dump($output);*/
|
||||
die('<p style="color: white">Error while saving file</p>');//echo '0';
|
||||
}
|
||||
}
|
||||
unlink($fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// $content = file_get_contents($path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue