403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/linkor.redirectpro/lib/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/linkor.redirectpro/lib/storage.php
<?

namespace Linkor\Redirectpro;

class Storage
{
	public static function CSVWrite($fname, $data, $sep = ";")
	{
		$f = fopen($fname, "w");
		if ($f === false) {
			return;
		}
		if ($data !== Array()) {
			foreach ($data as $row) {
				foreach ($row as $i => $v) {
					$row[$i] = trim($row[$i]);
				}
				ksort($row);
				if (count(array_filter($row)) == 0) {
					continue;
				}
				//$row = array_map("utf8_decode", $row);
				fputcsv($f, $row, $sep);
			}
			fclose($f);
		}
	}

	public static function CSVRead($fname, $sep = ";")
	{
		$result = [];
		if (file_exists($fname)) {
			$f = fopen($fname, "r");
			if ($f === false) {
				return $result;
			}
			while (($row = fgetcsv($f, 4000, $sep)) !== false) {
				$result[] = array_map("trim", $row);
			}
			fclose($f);
		}

		return $result;
	}

	public static function PHPWrite($fname, $data)
	{
		file_put_contents(
			$fname,
			"<?php\nreturn " . var_export($data, true) . ";"
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit