<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:02:03
 namespace App\Http\Controllers; use App\Media; use ImageCross; class MediaController extends Controller { private $_filePath; private $_readingMode; public function __construct() { $this->_filePath = public_path("\165\160\154\157\141\144\x73\x2f\x66\x69\154\x65\x73\x2f"); $this->_readingMode = ["\x69\155\141\x67\x65\x2f\152\160\145\x67", "\x69\x6d\x61\x67\145\57\152\x70\x67", "\151\x6d\x61\147\145\57\x70\x6e\x67", "\151\155\x61\147\145\x2f\167\145\x62\160", "\x69\155\141\x67\x65\x2f\147\x69\x66", "\166\151\x64\x65\157\57\x6d\160\64"]; } public function file($OZrMv = '') { goto wSbki; kBKyU: exit; FA0Ir: if (!in_array($FqUUT->file_type, $this->_readingMode)) { goto wbOyq; } goto sHXOx; sHXOx: return response()->file($this->_filePath . $FqUUT->file, ["\103\157\x6e\x74\x65\156\x74\x2d\124\171\160\x65" => $FqUUT->file_type]); wbOyq: return response()->download($this->_filePath . $FqUUT->file, $FqUUT->name, ["\103\157\156\164\145\156\x74\x2d\x54\171\160\145" => $FqUUT->file_type]); goto lzuo0; wSbki: $FqUUT = Media::where("\x66\x69\x6c\145", $OZrMv)->first(); if (!(!isset($FqUUT) || $FqUUT == null || !file_exists($this->_filePath . $FqUUT->file))) { goto FA0Ir; } header("\x48\x54\124\x50\x2f\61\56\x30\x20\x34\60\x34\40\x4e\157\x74\40\x46\157\165\x6e\x64", true, 404); goto kBKyU; lzuo0: } public function fileThumb($oa1qX = 0, $utJwD = 0, $OZrMv = '') { goto fuF9i; QAeYW: $TSgJT = str_replace($FqUUT->extension . $fB2Rg, '', $FqUUT->file . $fB2Rg) . "\x5f" . $oa1qX . "\170" . $utJwD . $FqUUT->extension; if (file_exists($this->_filePath . $TSgJT)) { goto FPL_q; } $o6W7X = ImageCross::make($this->_filePath . $FqUUT->file)->orientate(); goto CvvFo; GYxSH: $TSgJT = $FqUUT->file; goto fgc9u; vcpYq: goto GHOeD; fuF9i: $FqUUT = Media::where("\x66\151\x6c\145", $OZrMv)->first(); if (!(!isset($FqUUT) || $FqUUT == null || !file_exists($this->_filePath . $FqUUT->file) || !in_array($FqUUT->file_type, $this->_readingMode))) { goto Y56gq; } header("\x48\x54\x54\x50\x2f\61\56\60\x20\64\x30\x34\40\x4e\157\x74\x20\x46\157\165\x6e\x64", true, 404); goto yvbb5; ZHkhB: ttw78: FPL_q: return response()->file($this->_filePath . $TSgJT, ["\103\157\x6e\x74\145\x6e\x74\55\x54\171\x70\x65" => $FqUUT->file_type]); goto KoqMR; S8iVu: goto ttw78; W5tAJ: $o6W7X->fit($oa1qX, $utJwD, function ($jZ9eN) { $jZ9eN->upsize(); })->save($this->_filePath . $TSgJT); goto ZHkhB; GHOeD: $o6W7X->fit($oa1qX, null, function ($jZ9eN) { $jZ9eN->upsize(); })->save($this->_filePath . $TSgJT); fgc9u: goto PMFGi; goto CpqD_; yvbb5: exit; Y56gq: $fB2Rg = "\x32\x37\x36\x67\x61\146\146\x61\x62"; goto QAeYW; CpqD_: LB8To: $o6W7X->fit(null, $utJwD, function ($jZ9eN) { $jZ9eN->upsize(); })->save($this->_filePath . $TSgJT); PMFGi: goto S8iVu; CvvFo: if ($oa1qX !== "\141\165\x74\157" && $utJwD != "\x61\x75\x74\157" && is_numeric($oa1qX) && is_numeric($utJwD) && $oa1qX > 0 && $utJwD > 0) { goto W5tAJ; } if ($oa1qX == "\x61\x75\164\x6f" && $utJwD != "\x61\x75\164\157" && is_numeric($utJwD) && $utJwD > 0) { goto LB8To; } if ($utJwD == "\x61\165\164\x6f" && $oa1qX != "\x61\x75\x74\x6f" && is_numeric($oa1qX) && $oa1qX > 0) { goto vcpYq; } goto GYxSH; KoqMR: } public function download($OZrMv = '') { $FqUUT = Media::where("\x66\x69\x6c\x65", $OZrMv)->first(); if (!(!isset($FqUUT) || $FqUUT == null || !file_exists($this->_filePath . $FqUUT->file))) { goto q5HIu; } header("\x48\x54\124\120\57\x31\56\60\x20\64\x30\x34\40\116\157\164\40\106\157\165\x6e\144", true, 404); exit; q5HIu: return response()->download($this->_filePath . $FqUUT->file, $FqUUT->name, ["\103\x6f\156\x74\x65\x6e\164\55\124\171\x70\145" => $FqUUT->file_type]); } }