/home/cp181240/www/mystric.com/assets/filesmanagement/filemanagement.php
<?php 
session_start();
$full_path = 'http://'.$_SERVER['HTTP_HOST'];
// if($_SESSION['_DOMAIN_ID']!=5113) {
	exit;
// }
if(isset($_SESSION['_DOMAIN_CONFIG']['ssl_status'])&&$_SESSION['_DOMAIN_CONFIG']['ssl_status']==1) {
	$full_path = 'https://'.$_SERVER['HTTP_HOST'];
	// $full_path = 'https://'.$_SERVER['HTTP_HOST'];
}
// exit;
?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Files Management</title>

		<!-- jQuery and jQuery UI (REQUIRED) -->
		<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css">
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>

		<!-- elFinder CSS (REQUIRED) -->
		<link rel="stylesheet" type="text/css" media="screen" href="css/elfinder.min.css">
		<link rel="stylesheet" type="text/css" media="screen" href="css/theme.css">

		<!-- elFinder JS (REQUIRED) -->
		<script type="text/javascript" src="js/elfinder.min.js"></script>

		<!-- elFinder translation (OPTIONAL) -->
		<script type="text/javascript" src="js/i18n/elfinder.ru.js"></script>

		<script type="text/javascript">
  var FileBrowserDialogue = {
    init: function() {
      // Here goes your code for setting your custom things onLoad.
    },
    mySubmit: function (URL) {
      // pass selected file path to TinyMCE
      parent.tinymce.activeEditor.windowManager.getParams().setUrl(URL);

      // close popup window
      parent.tinymce.activeEditor.windowManager.close();
    }
  }

  $().ready(function() {
    var elf = $('#elfinder').elfinder({
      // set your elFinder options here
      url: '<?=$full_path?>/assets/filesmanagement/script/config_embed_file.php',
      // url: 'http://file.shopuppay.com/files/script/config_embed_file.php',  // connector URL
      getFileCallback: function(file) { // editor callback
// actually file.url - doesnt work for me, but file does. (elfinder 2.0-rc1)
		//var _SITE_URL =  "http://site2.shopup2014.com/";
		//var _filename = file.replace(_SITE_URL,'')
        FileBrowserDialogue.mySubmit(file); // pass selected file path to TinyMCE 
      }
    }).elfinder('instance');      
  });
</script>
	</head>
	<body>

		<!-- Element where elFinder will be created (REQUIRED) -->
		<div id="elfinder"></div>

	</body>
</html>