mirror of
https://github.com/serghey-rodin/vesta.git
synced 2024-12-26 05:51:13 -08:00
20 lines
516 B
PHP
20 lines
516 B
PHP
<?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');
|
|
}
|