mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
Updated services and fixed minor bugs.
This commit is contained in:
parent
4306a4fb4f
commit
2a12fec5ea
90 changed files with 1706 additions and 3 deletions
19
web/api/v1/view/file/index.php
Normal file
19
web/api/v1/view/file/index.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?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 = htmlspecialchars($_REQUEST['path'], ENT_QUOTES, 'UTF-8');
|
||||
if (!empty($_REQUEST['raw'])) {
|
||||
header('content-type: image/jpeg');
|
||||
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