mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
29 lines
624 B
PHP
29 lines
624 B
PHP
<?php
|
|
require dirname(__FILE__) . "/include/languages.inc";
|
|
|
|
$langcode = language_convert(isset($_GET["lang"]) ? $_GET["lang"] : "en");
|
|
|
|
if (isset($_GET["description"])) {
|
|
$filename = "search-description";
|
|
$varname = "descriptionIndex";
|
|
}
|
|
else {
|
|
$filename = "search-index";
|
|
$varname = "searchIndex";
|
|
}
|
|
|
|
header("Content-Type: application/javascript");
|
|
|
|
// Will send out the proper header, if the browser supports it at all
|
|
ob_start("ob_gzhandler");
|
|
|
|
echo "$varname = ";
|
|
$file = dirname(__FILE__) . "/manual/$langcode/$filename.json";
|
|
if (is_readable($file)) {
|
|
readfile($file);
|
|
} else {
|
|
echo "[]";
|
|
}
|
|
|
|
|