mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
FM changes
This commit is contained in:
parent
f064c09667
commit
d207b7a752
9 changed files with 117 additions and 136 deletions
|
@ -1,11 +1,18 @@
|
|||
<?php
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
$user = $_SESSION['user'];
|
||||
if (($_SESSION['user'] == 'admin') && (!empty($_SESSION['look']))) {
|
||||
$user=$_SESSION['look'];
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['path'])) {
|
||||
$path = $_REQUEST['path'];
|
||||
if (is_readable($path)) {
|
||||
header("Content-disposition: attachment;filename=".basename($path));
|
||||
readfile($path);
|
||||
exit;
|
||||
}
|
||||
header("Content-type: application/octet-stream");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header("Content-disposition: attachment;filename=".basename($path));
|
||||
passthru (VESTA_CMD . "v-open-fs-file " . $user . " " . escapeshellarg($path));
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
die('File not found');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue