tpl_javascript.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 json_encode($this->cms) ?>;
  31. _.uid = "<?php echo text::jsValue($_GET['uid']) ?>";
  32. $.$.kuki.domain = "<?php echo text::jsValue($this->config['cookieDomain']) ?>";
  33. $.$.kuki.path = "<?php echo text::jsValue($this->config['cookiePath']) ?>";
  34. $.$.kuki.prefix = "<?php echo text::jsValue($this->config['cookiePrefix']) ?>";
  35. $(function() { _.resize(); _.init(); });
  36. $(window).resize(_.resize);
  37. </script>