private static function init() { $lang = DMsg::DEFAULT_LANG; if (isset($_SESSION[DMsg::_COOKIE_LANG_])) { $lang = $_SESSION[DMsg::_COOKIE_LANG_]; } else { $lang1 = UIBase::GrabGoodInput('cookie', self::_COOKIE_LANG_); if ($lang1 != NULL && $lang != $lang1 && array_key_exists($lang1, self::$_supported)) { $lang = $lang1; } DMsg::SetLang($lang); } $filecode = self::$_supported[$lang][1]; self::$_curlang = $lang; include SERVER_ROOT . self::LANG_DIR . 'en-US_msg.php'; if ($lang != DMsg::DEFAULT_LANG) { include SERVER_ROOT . self::LANG_DIR . $filecode . '_msg.php'; } }
<?php require_once "inc/auth.php"; $act = UIBase::GrabGoodInput("any", 'act'); $actId = UIBase::GrabGoodInput("any", 'actId'); switch ($act) { case 'restart': Service::ServiceRequest(SInfo::SREQ_RESTART_SERVER); break; case 'lang': DMsg::SetLang($actId); break; case 'toggledebug': Service::ServiceRequest(SInfo::SREQ_TOGGLE_DEBUG); break; case 'reload': if ($actId != '') { Service::ServiceRequest(SInfo::SREQ_VH_RELOAD, $actId); } break; case 'disable': if ($actId != '') { Service::ServiceRequest(SInfo::SREQ_VH_DISABLE, $actId); } break; case 'enable': if ($actId != '') { Service::ServiceRequest(SInfo::SREQ_VH_ENABLE, $actId); } break; default: