/var/www/hkosl.com/citysuper/uploader/js_localize.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

/** This file is part of KCFinder project
  *
  *      @desc Load language labels into JavaScript
  *   @package KCFinder
  *   @version 3.0-dev
  *    @author Pavel Tzonkov <sunhater@sunhater.com>
  * @copyright 2010-2014 KCFinder Project
  *   @license http://opensource.org/licenses/GPL-3.0 GPLv3
  *   @license http://opensource.org/licenses/LGPL-3.0 LGPLv3
  *      @link http://kcfinder.sunhater.com
  */

namespace kcfinder;
require 
"core/autoload.php";

if (!isset(
$_GET['lng']) || ($_GET['lng'] == 'en')) {
    
header("Content-Type: text/javascript");
    die;
}
$file "lang/" $_GET['lng'] . ".php";
$files dir::content("lang", array(
    
'types' => "file",
    
'pattern' => '/^.*\.php$/'
));
if (!
in_array($file$files)) {
    
header("Content-Type: text/javascript");
    die;
}
$mtime = @filemtime($file);
if (
$mtimehttpCache::checkMTime($mtime);
require 
$file;
header("Content-Type: text/javascript; charset={$lang['_charset']}");
foreach (
$lang as $english => $native)
    if (
substr($english01) != "_")
        echo 
"browser.labels['" text::jsValue($english) . "']=\"" text::jsValue($native) . "\";";

?>