. */ use SP\Config\Config; use SP\Core\CryptPKI; use SP\Core\Init; use SP\Core\Session; use SP\Http\Request; use SP\Http\Response; use SP\Util\Checks; define('APP_ROOT', '..'); require APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; require APP_ROOT . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'strings.js.php'; Request::checkReferer('GET'); $Config = Config::getConfig(); $data = array( 'lang' => $stringsJsLang, 'locale' => $Config->getSiteLang(), 'app_root' => Init::$WEBURI, 'pk' => '', 'max_file_size' => $Config->getFilesAllowedSize(), 'check_updates' => Session::getAuthCompleted() && ($Config->isCheckUpdates() || $Config->isChecknotices()) && (Session::getUserData()->isUserIsAdminApp() || Checks::demoIsEnabled()), 'timezone' => date_default_timezone_get(), 'debug' => DEBUG || $Config->isDebug() ); try { $CryptPKI = new CryptPKI(); $data['pk'] = Session::getPublicKey() ?: $CryptPKI->getPublicKey(); } catch (Exception $e) {} Response::printJson($data, 0);