HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/RVSeagullMod/modules/default/blocks/LangSwitcher.php
<?php
/**
 * This block allows you to switch language.
 *
 * @package block
 * @author  Andrey Podshivalov <planetaz@gmail.com>
 */
class Default_Block_LangSwitcher
{
    function init()
    {
        return $this->getBlockContent();
    }

    function getBlockContent()
    {
        $aLangs  = SGL_Util::getLangsDescriptionMap();
        $options = SGL_Output::generateSelect($aLangs, $_SESSION['aPrefs']['language']);

        $html = <<< HTML
        <form id="langSwitcher" action="" method="post">
            <select name="lang" onChange="document.getElementById('langSwitcher').submit()">
                $options
            </select>
        </form>
HTML;
        return $html;
    }
}
?>