uawdijnntqw1x1x1
IP : 216.73.216.10
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
files
/
need-2-delete
/
.
/
mini-borishof.ru1
/
.
/
bitrix
/
modules
/
main
/
lib
/
.
/
ui
/
fileinputunclouder.php
/
/
<?php namespace Bitrix\Main\UI; use \Bitrix\Main\Security\Sign\Signer; use \Bitrix\Main\Security\Sign\BadSignatureException; class FileInputUnclouder { protected $id; protected $signature; protected $file; protected static $salt = "fileinput"; public static function getSrc($file = array()) { $src = $file['SRC']; if ($file['HANDLER_ID'] > 0) { $src = "/".\COption::GetOptionString("main", "upload_dir", "upload")."/".$file["SUBDIR"]."/".$file["FILE_NAME"]; $path = $_SERVER["DOCUMENT_ROOT"].$src; if (!(is_file($path) && file_exists($path))) { $sign = new Signer(); $s = $sign->sign($file["ID"], self::$salt); $src = \COption::GetOptionString("main.fileinput", "entryPointUrl", "/bitrix/tools/upload.php")."?". http_build_query(array( "action" => "uncloud", "file" => $file["ID"], "signature" => $s )); } } else { $src = \Bitrix\Main\IO\Path::convertLogicalToUri($src); } return $src; } public static function getSrcWithResize($file = array(), $size = array()) { $file1 = \CFile::ResizeImageGet($file["ID"], $size, BX_RESIZE_IMAGE_PROPORTIONAL, false); $src = $file1['src']; if ($file['HANDLER_ID'] > 0) { $src = "/".\COption::GetOptionString("main", "upload_dir", "upload")."/".$file["SUBDIR"]."/".$file["FILE_NAME"]; $path = $_SERVER["DOCUMENT_ROOT"].$src; if (!(is_file($path) && file_exists($path))) { $sign = new Signer(); $s = $sign->sign($file["ID"] . "x" . $size["width"]. "x" . $size["height"], self::$salt); $src = \COption::GetOptionString("main.fileinput", "entryPointUrl", "/bitrix/tools/upload.php")."?". http_build_query(array( "action" => "uncloud", "mode" => "resize", "file" => $file["ID"], "width" => $size["width"], "height" => $size["height"], "signature" => $s )); } } else { $src = \Bitrix\Main\IO\Path::convertLogicalToUri($src); } return $src; } public function setValue($id) { $this->id = (int) $id; return $this; } public function setSignature($signature) { $this->signature = $signature; return $this; } protected function check($params = array()) { $sign = new Signer; $str = (string) $sign->unsign($this->signature, self::$salt); $str2 = (string) $this->id; if (is_array($params) && array_key_exists("width", $params) && $params["width"] > 0 && array_key_exists("height", $params) && $params["height"] > 0) { $str2 = $this->id . "x" . $params["width"] . "x" . $params["height"]; } return ($str == $str2); } public function exec($mode = "basic", $params = array()) { $res = $this->check($params); if ($this->check($params)) { $this->file = \CFile::getByID($this->id)->fetch(); if ($mode == "resize" && ($file = \CFile::ResizeImageGet($this->id, $params, BX_RESIZE_IMAGE_PROPORTIONAL, true)) && $file) { $this->file["SRC"] = $file["src"]; $this->file["WIDTH"] = $file["width"]; $this->file["HEIGHT"] = $file["height"]; $this->file["FILE_SIZE"] = $file["size"]; } \CFile::ViewByUser($this->file, array("force_download" => false, 'cache_time' => 0)); } } }
/var/files/need-2-delete/./mini-borishof.ru1/./bitrix/modules/main/lib/./ui/fileinputunclouder.php