示例#1
0
    echo $this->opener['CKEditor']['funcNum'];
    ?>
;
<?php 
}
if (isset($this->opener['TinyMCE']) && $this->opener['TinyMCE']) {
    ?>
browser.opener.TinyMCE = true;
<?php 
}
?>
_.kuki.domain = "<?php 
echo text::jsValue($this->config['cookieDomain']);
?>
";
_.kuki.path = "<?php 
echo text::jsValue($this->config['cookiePath']);
?>
";
_.kuki.prefix = "<?php 
echo text::jsValue($this->config['cookiePrefix']);
?>
";
$(document).ready(function() {
    browser.resize();
    browser.init();
    $('#all').css('visibility', 'visible');
});
$(window).resize(browser.resize);
</script>
 *    @author Pavel Tzonkov <*****@*****.**>
 * @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' || $_GET['lng'] != basename($_GET['lng']) || !is_file("lang/" . $_GET['lng'] . ".php")) {
    header("Content-Type: text/javascript");
    die;
}
$file = "lang/" . $_GET['lng'] . ".php";
$mtime = @filemtime($file);
if ($mtime) {
    httpCache::checkMTime($mtime, "Content-Type: text/javascript");
}
require $file;
header("Content-Type: text/javascript");
echo "_.labels={";
$i = 0;
foreach ($lang as $english => $native) {
    if (substr($english, 0, 1) != "_") {
        echo "'" . text::jsValue($english) . "':\"" . text::jsValue($native) . "\"";
        if (++$i < count($lang)) {
            echo ",";
        }
    }
}
echo "}";
示例#3
0
 protected function callBack($url, $message = "")
 {
     $message = text::jsValue($message);
     if (get_class($this) == "kcfinder\\browser" && $this->action != "browser") {
         return;
     }
     if (isset($this->opener['name'])) {
         $method = "callBack_{$this->opener['name']}";
         if (method_exists($this, $method)) {
             $js = $this->{$method}($url, $message);
         }
     }
     if (!isset($js)) {
         $js = $this->callBack_default($url, $message);
     }
     header("Content-Type: text/html; charset={$this->charset}");
     echo "<html><body>{$js}</body></html>";
 }
示例#4
0
 *   @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
 *      @link http://kcfinder.sunhater.com
 */
if (file_exists('core/autoload.php')) {
    require "core/autoload.php";
} else {
    require "./core/autoload.php";
}
if (function_exists('set_magic_quotes_runtime')) {
    @set_magic_quotes_runtime(false);
}
$input = new input();
if (!isset($input->get['lng']) || $input->get['lng'] == 'en') {
    die;
}
$file = "lang/" . $input->get['lng'] . ".php";
$files = glob("lang/*.php");
if (!in_array($file, $files)) {
    die;
}
$mtime = @filemtime($file);
if ($mtime) {
    httpCache::checkMTime($mtime);
}
require $file;
header("Content-Type: text/javascript; charset={$lang['_charset']}");
foreach ($lang as $english => $native) {
    if (substr($english, 0, 1) != "_") {
        echo "browser.labels['" . text::jsValue($english) . "']=\"" . text::jsValue($native) . "\";";
    }
}
示例#5
0
    protected function callBack($url, $message = "")
    {
        $message = text::jsValue($message);
        $CKfuncNum = isset($this->opener['CKEditor']['funcNum']) ? $this->opener['CKEditor']['funcNum'] : 0;
        if (!$CKfuncNum) {
            $CKfuncNum = 0;
        }
        header("Content-Type: text/html; charset={$this->charset}");
        ?>
<html>
<body>
<script type='text/javascript'>
var kc_CKEditor = (window.parent && window.parent.CKEDITOR)
    ? window.parent.CKEDITOR.tools.callFunction
    : ((window.opener && window.opener.CKEDITOR)
        ? window.opener.CKEDITOR.tools.callFunction
        : false);
var kc_FCKeditor = (window.opener && window.opener.OnUploadCompleted)
    ? window.opener.OnUploadCompleted
    : ((window.parent && window.parent.OnUploadCompleted)
        ? window.parent.OnUploadCompleted
        : false);
var kc_Custom = (window.parent && window.parent.KCFinder)
    ? window.parent.KCFinder.callBack
    : ((window.opener && window.opener.KCFinder)
        ? window.opener.KCFinder.callBack
        : false);
if (kc_CKEditor)
    kc_CKEditor(<?php 
        echo $CKfuncNum;
        ?>
, '<?php 
        echo $url;
        ?>
', '<?php 
        echo $message;
        ?>
');
if (kc_FCKeditor)
    kc_FCKeditor(<?php 
        echo strlen($message) ? 1 : 0;
        ?>
, '<?php 
        echo $url;
        ?>
', '', '<?php 
        echo $message;
        ?>
');
if (kc_Custom) {
    if (<?php 
        echo strlen($message);
        ?>
) alert('<?php 
        echo $message;
        ?>
');
    kc_Custom('<?php 
        echo $url;
        ?>
');
}
if (!kc_CKEditor && !kc_FCKeditor && !kc_Custom)
    alert("<?php 
        echo $message;
        ?>
");
</script>
</body>
</html><?php 
    }