uawdijnntqw1x1x1
IP : 18.224.64.211
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.
/
.trash
/
post-ratings
/
..
/
system.1
/
library
/
template
/
template.php
/
/
<?php namespace Opencart\System\Library\Template; class Template { protected string $directory = ''; protected array $path = []; /** * addPath * * @param string $namespace * @param string $directory */ public function addPath(string $namespace, string $directory = ''): void { if (!$directory) { $this->directory = $namespace; } else { $this->path[$namespace] = $directory; } } /** * Render * * @param string $filename * @param array $data * @param string $code * * @return array */ public function render(string $filename, array $data = [], string $code = ''): string { if (!$code) { $file = $this->directory . $filename . '.tpl'; $namespace = ''; $parts = explode('/', $filename); foreach ($parts as $part) { if (!$namespace) { $namespace .= $part; } else { $namespace .= '/' . $part; } if (isset($this->path[$namespace])) { $file = $this->path[$namespace] . substr($filename, strlen($namespace)) . '.tpl'; } } if (isset($file) && is_file($file)) { $code = file_get_contents($file); } else { throw new \Exception('Error: Could not load template ' . $filename . '!'); } } if ($code) { ob_start(); extract($data); include($this->compile($filename, $code)); return ob_get_clean(); } else { return ''; } } protected function compile(string $filename, string $code): string { $file = DIR_CACHE . 'template/' . hash('md5', $filename . $code) . '.php'; if (!is_file($file)) { file_put_contents($file, $code, LOCK_EX); } return $file; } }
/home/sudancam/./.trash/post-ratings/../system.1/library/template/template.php