uawdijnntqw1x1x1
IP : 18.219.229.160
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
/
public_html
/
0d544
/
..
/
..
/
.trash
/
catalog.1
/
controller
/
.
/
.
/
startup
/
language.php
/
/
<?php namespace Opencart\Catalog\Controller\Startup; class Language extends \Opencart\System\Engine\Controller { public function index(): void { $this->load->model('localisation/language'); $languages = $this->model_localisation_language->getLanguages(); $language_codes = array_column($languages, 'language_id', 'code'); $code = ''; if (isset($this->request->get['language'])) { $code = $this->request->get['language']; } // Language Detection if (!$code) { $detect = ''; $browser_codes = []; if (!empty($this->request->server['HTTP_ACCEPT_LANGUAGE'])) { $browser_languages = explode(',', strtolower($this->request->server['HTTP_ACCEPT_LANGUAGE'])); // Try using local to detect the language foreach ($browser_languages as $browser_language) { $position = strpos($browser_language, ';q='); if ($position !== false) { $browser_codes[][substr($browser_language, 0, $position)] = (float)substr($browser_language, $position + 3); } else { $browser_codes[][$browser_language] = 1.0; } } } $sort_order = []; foreach ($browser_codes as $key => $value) { $sort_order[$key] = $value[key($value)]; } array_multisort($sort_order, SORT_ASC, $browser_codes); $browser_codes = array_reverse($browser_codes); foreach (array_values($browser_codes) as $browser_code) { foreach ($languages as $key => $value) { if ($value['status']) { $locale = explode(',', $value['locale']); if (in_array(key($browser_code), $locale)) { $detect = $value['code']; break 2; } } } } $code = ($detect) ? $detect : ''; } // Language not available then use default if (!array_key_exists($code, $language_codes)) { $code = $this->config->get('config_language'); } // Set the config language_id $this->config->set('config_language_id', $language_codes[$code]); $this->config->set('config_language', $code); // Language $language = new \Opencart\System\Library\Language($code); $language->addPath(DIR_LANGUAGE); $language->load($code); $this->registry->set('language', $language); } }
/home/sudancam/public_html/0d544/../../.trash/catalog.1/controller/././startup/language.php