tpl_javascript.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. NAMESPACE kcfinder;
  3. ?>
  4. <script src="js/index.php" type="text/javascript"></script>
  5. <script src="js_localize.php?lng=<?php echo $this->lang ?>" type="text/javascript"></script>
  6. <?php
  7. IF ($this->opener['name'] == "tinymce"):
  8. ?>
  9. <script src="<?php echo $this->config['_tinyMCEPath'] ?>/tiny_mce_popup.js" type="text/javascript"></script>
  10. <?php
  11. ENDIF;
  12. IF (file_exists("themes/{$this->config['theme']}/js.php")):
  13. ?>
  14. <script src="themes/<?php echo $this->config['theme'] ?>/js.php" type="text/javascript"></script>
  15. <?php
  16. ENDIF;
  17. ?>
  18. <script type="text/javascript">
  19. _.version = "<?php echo self::VERSION ?>";
  20. _.support.zip = <?php echo (class_exists('ZipArchive') && !$this->config['denyZipDownload']) ? "true" : "false" ?>;
  21. _.support.check4Update = <?php echo ((!isset($this->config['denyUpdateCheck']) || !$this->config['denyUpdateCheck']) && (ini_get("allow_url_fopen") || function_exists("http_get") || function_exists("curl_init") || function_exists('socket_create'))) ? "true" : "false" ?>;
  22. _.lang = "<?php echo text::jsValue($this->lang) ?>";
  23. _.type = "<?php echo text::jsValue($this->type) ?>";
  24. _.theme = "<?php echo text::jsValue($this->config['theme']) ?>";
  25. _.access = <?php echo json_encode($this->config['access']) ?>;
  26. _.dir = "<?php echo text::jsValue($this->session['dir']) ?>";
  27. _.uploadURL = "<?php echo text::jsValue($this->config['uploadURL']) ?>";
  28. _.thumbsURL = _.uploadURL + "/<?php echo text::jsValue($this->config['thumbsDir']) ?>";
  29. _.opener = <?php echo json_encode($this->opener) ?>;
  30. _.cms = "<?php echo text::jsValue($this->cms) ?>";
  31. $.$.kuki.domain = "<?php echo text::jsValue($this->config['cookieDomain']) ?>";
  32. $.$.kuki.path = "<?php echo text::jsValue($this->config['cookiePath']) ?>";
  33. $.$.kuki.prefix = "<?php echo text::jsValue($this->config['cookiePrefix']) ?>";
  34. $(function() { _.resize(); _.init(); });
  35. $(window).resize(_.resize);
  36. </script>