⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.78
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
local
/
psa
/
phpMyAdmin
/
libraries
/
classes
/
View File Name :
Language.php
code = $code; $this->name = $name; $this->native = $native; if (! str_contains($regex, '[-_]')) { $regex = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $regex); } $this->regex = $regex; $this->mysql = $mysql; } /** * Returns native name for language * * @return string */ public function getNativeName() { return $this->native; } /** * Returns English name for language * * @return string */ public function getEnglishName() { return $this->name; } /** * Returns verbose name for language * * @return string */ public function getName() { if (! empty($this->native)) { return $this->native . ' - ' . $this->name; } return $this->name; } /** * Returns language code * * @return string */ public function getCode() { return $this->code; } /** * Returns MySQL locale code, can be empty * * @return string */ public function getMySQLLocale() { return $this->mysql; } /** * Compare function used for sorting * * @param Language $other Other object to compare * * @return int same as strcmp */ public function cmp(Language $other): int { return strcmp($this->name, $other->name); } /** * Checks whether language is currently active. */ public function isActive(): bool { return $GLOBALS['lang'] == $this->code; } /** * Checks whether language matches HTTP header Accept-Language. * * @param string $header Header content */ public function matchesAcceptLanguage($header): bool { $pattern = '/^(' . addcslashes($this->regex, '/') . ')(;q=[0-9]\\.[0-9])?$/i'; return (bool) preg_match($pattern, $header); } /** * Checks whether language matches HTTP header User-Agent * * @param string $header Header content */ public function matchesUserAgent($header): bool { $pattern = '/(\(|\[|;[[:space:]])(' . addcslashes($this->regex, '/') . ')(;|\]|\))/i'; return (bool) preg_match($pattern, $header); } /** * Checks whether language is RTL */ public function isRTL(): bool { return in_array($this->code, ['ar', 'fa', 'he', 'ur']); } /** * Activates given translation */ public function activate(): void { $GLOBALS['lang'] = $this->code; // Set locale _setlocale(0, $this->code); _bindtextdomain('phpmyadmin', LOCALE_PATH); _textdomain('phpmyadmin'); // Set PHP locale as well if (function_exists('setlocale')) { setlocale(0, $this->code); } /* Text direction for language */ if ($this->isRTL()) { $GLOBALS['text_dir'] = 'rtl'; } else { $GLOBALS['text_dir'] = 'ltr'; } /* Show possible warnings from langauge selection */ LanguageManager::getInstance()->showWarnings(); } }