PageRenderTime 105ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/admin-dev/filemanager/dialog.php

https://gitlab.com/mtellezgalindo/PrestaShop
PHP | 1003 lines | 927 code | 67 blank | 9 comment | 155 complexity | 7494c6341e42f94e0c983d4e5d8b2882 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, LGPL-3.0
  1. <?php
  2. include('config/config.php');
  3. $_SESSION["verify"] = "RESPONSIVEfilemanager";
  4. if (isset($_POST['submit']))
  5. include('upload.php');
  6. else
  7. {
  8. include('include/utils.php');
  9. if (isset($_GET['fldr'])
  10. && !empty($_GET['fldr'])
  11. && preg_match('/\.{1,2}[\/|\\\]/', urldecode($_GET['fldr'])) === 0
  12. )
  13. $subdir = str_replace("\0", '', urldecode(trim($_GET['fldr'], '/').'/'));
  14. else
  15. $subdir = '';
  16. //remember last position
  17. setcookie('last_position', $subdir, time() + (86400 * 7));
  18. if ($subdir == '')
  19. {
  20. if (!empty($_COOKIE['last_position'])
  21. && strpos($_COOKIE['last_position'], '.') === false
  22. )
  23. $subdir = trim($_COOKIE['last_position']);
  24. }
  25. if ($subdir == '/')
  26. $subdir = '';
  27. /***
  28. *SUB-DIR CODE
  29. ***/
  30. if (!isset($_SESSION['subfolder'])) $_SESSION['subfolder'] = '';
  31. $subfolder = '';
  32. if (!empty($_SESSION['subfolder']) && strpos($_SESSION['subfolder'], '../') === false
  33. && strpos($_SESSION['subfolder'], './') === false && strpos($_SESSION['subfolder'], '/') !== 0
  34. && strpos($_SESSION['subfolder'], '.') === false
  35. ) $subfolder = $_SESSION['subfolder'];
  36. if ($subfolder != '' && $subfolder[strlen($subfolder) - 1] != '/') $subfolder .= '/';
  37. if (!file_exists($current_path.$subfolder.$subdir))
  38. {
  39. $subdir = '';
  40. if (!file_exists($current_path.$subfolder.$subdir))
  41. $subfolder = '';
  42. }
  43. if (trim($subfolder) == '')
  44. {
  45. $cur_dir = $upload_dir.$subdir;
  46. $cur_path = $current_path.$subdir;
  47. $thumbs_path = $thumbs_base_path;
  48. $parent = $subdir;
  49. } else
  50. {
  51. $cur_dir = $upload_dir.$subfolder.$subdir;
  52. $cur_path = $current_path.$subfolder.$subdir;
  53. $thumbs_path = $thumbs_base_path.$subfolder;
  54. $parent = $subfolder.$subdir;
  55. }
  56. $cycle = true;
  57. $max_cycles = 50;
  58. $i = 0;
  59. while ($cycle && $i < $max_cycles)
  60. {
  61. $i++;
  62. if ($parent == './') $parent = '';
  63. if (file_exists($current_path.$parent.'config.php'))
  64. {
  65. require_once($current_path.$parent.'config.php');
  66. $cycle = false;
  67. }
  68. if ($parent == '') $cycle = false;
  69. else $parent = fix_dirname($parent).'/';
  70. }
  71. if (!is_dir($thumbs_path.$subdir))
  72. {
  73. create_folder(false, $thumbs_path.$subdir);
  74. }
  75. if (isset($_GET['popup'])) $popup = $_GET['popup']; else $popup = 0;
  76. //Sanitize popup
  77. $popup = !!$popup;
  78. //view type
  79. if (!isset($_SESSION['view_type']))
  80. {
  81. $view = $default_view;
  82. $_SESSION['view_type'] = $view;
  83. }
  84. if (isset($_GET['view']))
  85. {
  86. $view = $_GET['view'];
  87. $_SESSION['view_type'] = $view;
  88. }
  89. $view = $_SESSION['view_type'];
  90. if (isset($_GET['filter'])) $filter = fix_filename($_GET['filter'], $transliteration);
  91. else $filter = '';
  92. if (!isset($_SESSION['sort_by'])) $_SESSION['sort_by'] = '';
  93. if (isset($_GET['sort_by'])) $sort_by = $_SESSION['sort_by'] = fix_filename($_GET['sort_by'], $transliteration);
  94. else $sort_by = $_SESSION['sort_by'];
  95. if (!isset($_SESSION['descending'])) $_SESSION['descending'] = false;
  96. if (isset($_GET['descending'])) $descending = $_SESSION['descending'] = fix_filename($_GET['descending'], $transliteration) === 'true';
  97. else $descending = $_SESSION['descending'];
  98. $lang = $default_language;
  99. if (isset($_GET['lang']) && $_GET['lang'] != 'undefined' && $_GET['lang'] != '')
  100. $lang = $_GET['lang'];
  101. $language_file = 'lang/'.$default_language.'.php';
  102. if ($lang != $default_language)
  103. {
  104. $path_parts = pathinfo($lang);
  105. if (is_readable('lang/'.$path_parts['basename'].'.php'))
  106. $language_file = 'lang/'.$path_parts['basename'].'.php';
  107. else
  108. $lang = $default_language;
  109. }
  110. require_once $language_file;
  111. if (!isset($_GET['type'])) $_GET['type'] = 0;
  112. if (!isset($_GET['field_id'])) $_GET['field_id'] = '';
  113. $get_params = http_build_query(
  114. array(
  115. 'type' => Tools::safeOutput($_GET['type']),
  116. 'lang' => Tools::safeOutput($lang),
  117. 'popup' => $popup,
  118. 'field_id' => isset($_GET['field_id']) ? (int)$_GET['field_id'] : '',
  119. 'fldr' => ''
  120. )
  121. );
  122. ?>
  123. <!DOCTYPE html>
  124. <html xmlns="https://www.w3.org/1999/xhtml">
  125. <head>
  126. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  127. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  128. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  129. <meta name="robots" content="noindex,nofollow">
  130. <title>Responsive FileManager</title>
  131. <link rel="shortcut icon" href="img/ico/favicon.ico">
  132. <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
  133. <link href="css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
  134. <link href="css/bootstrap-lightbox.min.css" rel="stylesheet" type="text/css"/>
  135. <link href="css/style.css" rel="stylesheet" type="text/css"/>
  136. <link href="css/dropzone.min.css" type="text/css" rel="stylesheet"/>
  137. <link href="css/jquery.contextMenu.min.css" rel="stylesheet" type="text/css"/>
  138. <link href="css/bootstrap-modal.min.css" rel="stylesheet" type="text/css"/>
  139. <link href="jPlayer/skin/blue.monday/jplayer.blue.monday.css" rel="stylesheet" type="text/css">
  140. <!--[if lt IE 8]>
  141. <style>
  142. .img-container span, .img-container-mini span {
  143. display: inline-block;
  144. height: 100%;
  145. }
  146. </style><![endif]-->
  147. <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  148. <script type="text/javascript">
  149. if (typeof jQuery === 'undefined') {
  150. document.write(unescape("%3Cscript src='js/jquery.js' type='text/javascript'%3E%3C/script%3E"));
  151. }
  152. </script>
  153. <script type="text/javascript" src="js/bootstrap.min.js"></script>
  154. <script type="text/javascript" src="js/bootstrap-lightbox.min.js"></script>
  155. <script type="text/javascript" src="js/dropzone.min.js"></script>
  156. <script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>
  157. <script type="text/javascript" src="js/modernizr.custom.js"></script>
  158. <script type="text/javascript" src="js/bootbox.min.js"></script>
  159. <script type="text/javascript" src="js/bootstrap-modal.min.js"></script>
  160. <script type="text/javascript" src="js/bootstrap-modalmanager.min.js"></script>
  161. <script type="text/javascript" src="jPlayer/jquery.jplayer.min.js"></script>
  162. <script type="text/javascript" src="js/imagesloaded.pkgd.min.js"></script>
  163. <script type="text/javascript" src="js/jquery.queryloader2.min.js"></script>
  164. <?php
  165. if ($aviary_active)
  166. {
  167. if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)
  168. {
  169. ?>
  170. <script type="text/javascript" src="https://dme0ih8comzn4.cloudfront.net/js/feather.js"></script>
  171. <?php }else{ ?>
  172. <script type="text/javascript" src="http://feather.aviary.com/js/feather.js "></script>
  173. <?php
  174. }
  175. } ?>
  176. <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
  177. <!--[if lt IE 9]>
  178. <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
  179. <![endif]-->
  180. <script src="js/jquery.ui.position.min.js" type="text/javascript"></script>
  181. <script src="js/jquery.contextMenu.min.js" type="text/javascript"></script>
  182. <script>
  183. var ext_img = new Array('<?php echo implode("','", $ext_img)?>');
  184. var allowed_ext = new Array('<?php echo implode("','", $ext)?>');
  185. var loading_bar =<?php echo $loading_bar?"true":"false"; ?>;
  186. var image_editor =<?php echo $aviary_active?"true":"false"; ?>;
  187. //dropzone config
  188. Dropzone.options.myAwesomeDropzone = {
  189. dictInvalidFileType: "<?php echo lang_Error_extension;?>",
  190. dictFileTooBig: "<?php echo lang_Error_Upload; ?>",
  191. dictResponseError: "SERVER ERROR",
  192. paramName: "file", // The name that will be used to transfer the file
  193. maxFilesize: <?php echo $MaxSizeUpload; ?>, // MB
  194. url: "upload.php",
  195. accept: function (file, done) {
  196. var extension = file.name.split('.').pop();
  197. extension = extension.toLowerCase();
  198. if ($.inArray(extension, allowed_ext) > -1) {
  199. done();
  200. }
  201. else {
  202. done("<?php echo lang_Error_extension;?>");
  203. }
  204. }
  205. };
  206. if (image_editor) {
  207. var featherEditor = new Aviary.Feather({
  208. apiKey: "<?php echo $aviary_key; ?>",
  209. apiVersion: <?php echo $aviary_version; ?>,
  210. language: "<?php echo $aviary_language; ?>",
  211. theme: 'light',
  212. tools: 'all',
  213. onSave: function (imageID, newURL) {
  214. show_animation();
  215. var img = document.getElementById(imageID);
  216. img.src = newURL;
  217. $.ajax({
  218. type: "POST",
  219. url: "ajax_calls.php?action=save_img",
  220. data: { url: newURL, path: $('#sub_folder').val() + $('#fldr_value').val(), name: $('#aviary_img').data('name') }
  221. }).done(function (msg) {
  222. featherEditor.close();
  223. d = new Date();
  224. $("figure[data-name='" + $('#aviary_img').data('name') + "']").find('img').each(function () {
  225. $(this).attr('src', $(this).attr('src') + "?" + d.getTime());
  226. });
  227. $("figure[data-name='" + $('#aviary_img').data('name') + "']").find('figcaption a.preview').each(function () {
  228. $(this).data('url', $(this).data('url') + "?" + d.getTime());
  229. });
  230. hide_animation();
  231. });
  232. return false;
  233. },
  234. onError: function (errorObj) {
  235. bootbox.alert(errorObj.message);
  236. }
  237. });
  238. }
  239. </script>
  240. <script type="text/javascript" src="js/include.min.js"></script>
  241. </head>
  242. <body>
  243. <input type="hidden" id="popup" value="<?php echo Tools::safeOutput($popup); ?>"/>
  244. <input type="hidden" id="view" value="<?php echo Tools::safeOutput($view); ?>"/>
  245. <input type="hidden" id="cur_dir" value="<?php echo Tools::safeOutput($cur_dir); ?>"/>
  246. <input type="hidden" id="cur_dir_thumb" value="<?php echo Tools::safeOutput($subdir); ?>"/>
  247. <input type="hidden" id="insert_folder_name" value="<?php echo Tools::safeOutput(lang_Insert_Folder_Name); ?>"/>
  248. <input type="hidden" id="new_folder" value="<?php echo Tools::safeOutput(lang_New_Folder); ?>"/>
  249. <input type="hidden" id="ok" value="<?php echo Tools::safeOutput(lang_OK); ?>"/>
  250. <input type="hidden" id="cancel" value="<?php echo Tools::safeOutput(lang_Cancel); ?>"/>
  251. <input type="hidden" id="rename" value="<?php echo Tools::safeOutput(lang_Rename); ?>"/>
  252. <input type="hidden" id="lang_duplicate" value="<?php echo Tools::safeOutput(lang_Duplicate); ?>"/>
  253. <input type="hidden" id="duplicate" value="<?php if ($duplicate_files) echo 1; else echo 0; ?>"/>
  254. <input type="hidden" id="base_url" value="<?php echo Tools::safeOutput($base_url) ?>"/>
  255. <input type="hidden" id="base_url_true" value="<?php echo base_url(); ?>"/>
  256. <input type="hidden" id="fldr_value" value="<?php echo Tools::safeOutput($subdir); ?>"/>
  257. <input type="hidden" id="sub_folder" value="<?php echo Tools::safeOutput($subfolder); ?>"/>
  258. <input type="hidden" id="file_number_limit_js" value="<?php echo Tools::safeOutput($file_number_limit_js); ?>"/>
  259. <input type="hidden" id="descending" value="<?php echo $descending ? "true" : "false"; ?>"/>
  260. <?php $protocol = 'http'; ?>
  261. <input type="hidden" id="current_url" value="<?php echo str_replace(array('&filter='.$filter), array(''), $protocol."://".$_SERVER['HTTP_HOST'].Tools::safeOutput($_SERVER['REQUEST_URI'])); ?>"/>
  262. <input type="hidden" id="lang_show_url" value="<?php echo Tools::safeOutput(lang_Show_url); ?>"/>
  263. <input type="hidden" id="lang_extract" value="<?php echo Tools::safeOutput(lang_Extract); ?>"/>
  264. <input type="hidden" id="lang_file_info" value="<?php echo fix_strtoupper(lang_File_info); ?>"/>
  265. <input type="hidden" id="lang_edit_image" value="<?php echo Tools::safeOutput(lang_Edit_image); ?>"/>
  266. <input type="hidden" id="transliteration" value="<?php echo $transliteration ? "true" : "false"; ?>"/>
  267. <?php if ($upload_files)
  268. {
  269. ?>
  270. <!----- uploader div start ------->
  271. <div class="uploader">
  272. <center>
  273. <button class="btn btn-inverse close-uploader">
  274. <i class="icon-backward icon-white"></i> <?php echo Tools::safeOutput(lang_Return_Files_List) ?></button>
  275. </center>
  276. <div class="space10"></div>
  277. <div class="space10"></div>
  278. <?php if ($java_upload){ ?>
  279. <div class="tabbable upload-tabbable"> <!-- Only required for left/right tabs -->
  280. <ul class="nav nav-tabs">
  281. <li class="active"><a href="#tab1" data-toggle="tab"><?php echo Tools::safeOutput(lang_Upload_base); ?></a></li>
  282. <li><a href="#tab2" id="uploader-btn" data-toggle="tab"><?php echo Tools::safeOutput(lang_Upload_java); ?></a></li>
  283. </ul>
  284. <div class="tab-content">
  285. <div class="tab-pane active" id="tab1">
  286. <?php } ?>
  287. <form action="dialog.php" method="post" enctype="multipart/form-data" id="myAwesomeDropzone" class="dropzone">
  288. <input type="hidden" name="path" value="<?php echo Tools::safeOutput($subfolder.$subdir); ?>"/>
  289. <input type="hidden" name="path_thumb" value="<?php echo Tools::safeOutput($subfolder.$subdir); ?>"/>
  290. <div class="fallback">
  291. <?php echo lang_Upload_file ?>:<br/>
  292. <input name="file" type="file"/>
  293. <input type="hidden" name="fldr" value="<?php echo Tools::safeOutput($subdir); ?>"/>
  294. <input type="hidden" name="view" value="<?php echo Tools::safeOutput($view); ?>"/>
  295. <input type="hidden" name="type" value="<?php echo Tools::safeOutput($_GET['type']); ?>"/>
  296. <input type="hidden" name="field_id" value="<?php echo (int)$_GET['field_id']; ?>"/>
  297. <input type="hidden" name="popup" value="<?php echo Tools::safeOutput($popup); ?>"/>
  298. <input type="hidden" name="lang" value="<?php echo Tools::safeOutput($lang); ?>"/>
  299. <input type="hidden" name="filter" value="<?php echo Tools::safeOutput($filter); ?>"/>
  300. <input type="submit" name="submit" value="<?php echo lang_OK ?>"/>
  301. </div>
  302. </form>
  303. <div class="upload-help"><?php echo Tools::safeOutput(lang_Upload_base_help); ?></div>
  304. <?php if ($java_upload){ ?>
  305. </div>
  306. <div class="tab-pane" id="tab2">
  307. <div id="iframe-container">
  308. </div>
  309. <div class="upload-help"><?php echo Tools::safeOutput(lang_Upload_java_help); ?></div>
  310. </div>
  311. <?php } ?>
  312. </div>
  313. </div>
  314. </div>
  315. <!----- uploader div start ------->
  316. <?php } ?>
  317. <div class="container-fluid">
  318. <?php
  319. $class_ext = '';
  320. $src = '';
  321. if ($_GET['type'] == 1) $apply = 'apply_img';
  322. elseif ($_GET['type'] == 2) $apply = 'apply_link';
  323. elseif ($_GET['type'] == 0 && $_GET['field_id'] == '') $apply = 'apply_none';
  324. elseif ($_GET['type'] == 3) $apply = 'apply_video';
  325. else $apply = 'apply';
  326. $files = scandir($current_path.$subfolder.$subdir);
  327. $n_files = count($files);
  328. //php sorting
  329. $sorted = array();
  330. $current_folder = array();
  331. $prev_folder = array();
  332. foreach ($files as $k => $file)
  333. {
  334. if ($file == ".") $current_folder = array('file' => $file);
  335. elseif ($file == "..") $prev_folder = array('file' => $file);
  336. elseif (is_dir($current_path.$subfolder.$subdir.$file))
  337. {
  338. $date = filemtime($current_path.$subfolder.$subdir.$file);
  339. $size = foldersize($current_path.$subfolder.$subdir.$file);
  340. $file_ext = lang_Type_dir;
  341. $sorted[$k] = array('file' => $file, 'date' => $date, 'size' => $size, 'extension' => $file_ext);
  342. } else
  343. {
  344. $file_path = $current_path.$subfolder.$subdir.$file;
  345. $date = filemtime($file_path);
  346. $size = filesize($file_path);
  347. $file_ext = substr(strrchr($file, '.'), 1);
  348. $sorted[$k] = array('file' => $file, 'date' => $date, 'size' => $size, 'extension' => $file_ext);
  349. }
  350. }
  351. function filenameSort($x, $y)
  352. {
  353. return $x['file'] < $y['file'];
  354. }
  355. function dateSort($x, $y)
  356. {
  357. return $x['date'] < $y['date'];
  358. }
  359. function sizeSort($x, $y)
  360. {
  361. return $x['size'] - $y['size'];
  362. }
  363. function extensionSort($x, $y)
  364. {
  365. return $x['extension'] < $y['extension'];
  366. }
  367. switch ($sort_by)
  368. {
  369. case 'name':
  370. usort($sorted, 'filenameSort');
  371. break;
  372. case 'date':
  373. usort($sorted, 'dateSort');
  374. break;
  375. case 'size':
  376. usort($sorted, 'sizeSort');
  377. break;
  378. case 'extension':
  379. usort($sorted, 'extensionSort');
  380. break;
  381. default:
  382. break;
  383. }
  384. if ($descending)
  385. {
  386. $sorted = array_reverse($sorted);
  387. }
  388. $files = array();
  389. if (!empty($prev_folder))
  390. $files = array($prev_folder);
  391. if (!empty($current_folder))
  392. $files = array_merge($files, array($current_folder));
  393. $files = array_merge($files, $sorted);
  394. ?>
  395. <!----- header div start ------->
  396. <div class="navbar navbar-fixed-top">
  397. <div class="navbar-inner">
  398. <div class="container-fluid">
  399. <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  400. <span class="icon-bar"></span>
  401. <span class="icon-bar"></span>
  402. <span class="icon-bar"></span>
  403. </button>
  404. <div class="brand"><?php echo Tools::safeOutput(lang_Toolbar); ?> -></div>
  405. <div class="nav-collapse collapse">
  406. <div class="filters">
  407. <div class="row-fluid">
  408. <div class="span3 half">
  409. <span><?php echo Tools::safeOutput(lang_Actions); ?>:</span>
  410. <?php if ($upload_files)
  411. {
  412. ?>
  413. <button class="tip btn upload-btn" title="<?php echo Tools::safeOutput(lang_Upload_file); ?>">
  414. <i class="icon-plus"></i><i class="icon-file"></i></button>
  415. <?php } ?>
  416. <?php if ($create_folders)
  417. {
  418. ?>
  419. <button class="tip btn new-folder" title="<?php echo Tools::safeOutput(lang_New_Folder) ?>">
  420. <i class="icon-plus"></i><i class="icon-folder-open"></i></button>
  421. <?php } ?>
  422. </div>
  423. <div class="span3 half view-controller">
  424. <span><?php echo lang_View; ?>:</span>
  425. <button class="btn tip<?php if ($view == 0) echo " btn-inverse"; ?>" id="view0" data-value="0" title="<?php echo Tools::safeOutput(lang_View_boxes); ?>">
  426. <i class="icon-th <?php if ($view == 0) echo "icon-white"; ?>"></i></button>
  427. <button class="btn tip<?php if ($view == 1) echo " btn-inverse"; ?>" id="view1" data-value="1" title="<?php echo Tools::safeOutput(lang_View_list); ?>">
  428. <i class="icon-align-justify <?php if ($view == 1) echo "icon-white"; ?>"></i>
  429. </button>
  430. <button class="btn tip<?php if ($view == 2) echo " btn-inverse"; ?>" id="view2" data-value="2" title="<?php echo Tools::safeOutput(lang_View_columns_list); ?>">
  431. <i class="icon-fire <?php if ($view == 2) echo "icon-white"; ?>"></i></button>
  432. </div>
  433. <div class="span6 types">
  434. <span><?php echo Tools::safeOutput(lang_Filters); ?>:</span>
  435. <?php if ($_GET['type'] != 1 && $_GET['type'] != 3)
  436. {
  437. ?>
  438. <input id="select-type-1" name="radio-sort" type="radio" data-item="ff-item-type-1" checked="checked" class="hide"/>
  439. <label id="ff-item-type-1" title="<?php echo Tools::safeOutput(lang_Files); ?>" for="select-type-1" class="tip btn ff-label-type-1"><i class="icon-file"></i></label>
  440. <input id="select-type-2" name="radio-sort" type="radio" data-item="ff-item-type-2" class="hide"/>
  441. <label id="ff-item-type-2" title="<?php echo Tools::safeOutput(lang_Images); ?>" for="select-type-2" class="tip btn ff-label-type-2"><i class="icon-picture"></i></label>
  442. <input id="select-type-3" name="radio-sort" type="radio" data-item="ff-item-type-3" class="hide"/>
  443. <label id="ff-item-type-3" title="<?php echo Tools::safeOutput(lang_Archives); ?>" for="select-type-3" class="tip btn ff-label-type-3"><i class="icon-inbox"></i></label>
  444. <input id="select-type-4" name="radio-sort" type="radio" data-item="ff-item-type-4" class="hide"/>
  445. <label id="ff-item-type-4" title="<?php echo Tools::safeOutput(lang_Videos); ?>" for="select-type-4" class="tip btn ff-label-type-4"><i class="icon-film"></i></label>
  446. <input id="select-type-5" name="radio-sort" type="radio" data-item="ff-item-type-5" class="hide"/>
  447. <label id="ff-item-type-5" title="<?php echo Tools::safeOutput(lang_Music); ?>" for="select-type-5" class="tip btn ff-label-type-5"><i class="icon-music"></i></label>
  448. <?php } ?>
  449. <input accesskey="f" type="text" class="filter-input" id="filter-input" name="filter" placeholder="<?php echo fix_strtolower(lang_Text_filter); ?>..." value="<?php echo Tools::safeOutput($filter); ?>"/><?php if ($n_files > $file_number_limit_js)
  450. {
  451. ?><label id="filter" class="btn"><i class="icon-play"></i></label><?php } ?>
  452. <input id="select-type-all" name="radio-sort" type="radio" data-item="ff-item-type-all" class="hide"/>
  453. <label id="ff-item-type-all" title="<?php echo Tools::safeOutput(lang_All); ?>" <?php if (Tools::getValue('type') == 1 || Tools::getValue('type') == 3){ ?>style="visibility: hidden;" <?php } ?> data-item="ff-item-type-all" for="select-type-all" style="margin-rigth:0px;" class="tip btn btn-inverse ff-label-type-all"><i class="icon-align-justify icon-white"></i></label>
  454. </div>
  455. </div>
  456. </div>
  457. </div>
  458. </div>
  459. </div>
  460. </div>
  461. <!----- header div end ------->
  462. <!----- breadcrumb div start ------->
  463. <div class="row-fluid">
  464. <?php
  465. $link = "dialog.php?".$get_params;
  466. ?>
  467. <ul class="breadcrumb">
  468. <li class="pull-left"><a href="<?php echo Tools::safeOutput($link) ?>/"><i class="icon-home"></i></a></li>
  469. <li><span class="divider">/</span></li>
  470. <?php
  471. $bc = explode("/", $subdir);
  472. $tmp_path = '';
  473. if (!empty($bc))
  474. foreach ($bc as $k => $b)
  475. {
  476. $tmp_path .= $b."/";
  477. if ($k == count($bc) - 2)
  478. {
  479. ?>
  480. <li class="active"><?php echo Tools::safeOutput($b) ?></li><?php
  481. } elseif ($b != "")
  482. {
  483. ?>
  484. <li><a href="<?php echo Tools::safeOutput($link.$tmp_path)?>"><?php echo Tools::safeOutput($b) ?></a></li>
  485. <li><span class="divider"><?php echo "/"; ?></span></li>
  486. <?php
  487. }
  488. }
  489. ?>
  490. <li class="pull-right">
  491. <a class="btn-small" href="javascript:void('')" id="info"><i class="icon-question-sign"></i></a></li>
  492. <li class="pull-right">
  493. <a id="refresh" class="btn-small" href="dialog.php?<?php echo Tools::safeOutput($get_params.$subdir."&".uniqid()) ?>"><i class="icon-refresh"></i></a>
  494. </li>
  495. <li class="pull-right">
  496. <div class="btn-group">
  497. <a class="btn dropdown-toggle sorting-btn" data-toggle="dropdown" href="#">
  498. <i class="icon-signal"></i>
  499. <span class="caret"></span>
  500. </a>
  501. <ul class="dropdown-menu pull-left sorting">
  502. <li>
  503. <center><strong><?php echo Tools::safeOutput(lang_Sorting) ?></strong></center>
  504. </li>
  505. <li><a class="sorter sort-name <?php if ($sort_by == "name")
  506. {
  507. echo ($descending) ? "descending" : "ascending";
  508. } ?>" href="javascript:void('')" data-sort="name"><?php echo Tools::safeOutput(lang_Filename); ?></a></li>
  509. <li><a class="sorter sort-date <?php if ($sort_by == "date")
  510. {
  511. echo ($descending) ? "descending" : "ascending";
  512. } ?>" href="javascript:void('')" data-sort="date"><?php echo Tools::safeOutput(lang_Date); ?></a></li>
  513. <li><a class="sorter sort-size <?php if ($sort_by == "size")
  514. {
  515. echo ($descending) ? "descending" : "ascending";
  516. } ?>" href="javascript:void('')" data-sort="size"><?php echo Tools::safeOutput(lang_Size); ?></a></li>
  517. <li><a class="sorter sort-extension <?php if ($sort_by == "extension")
  518. {
  519. echo ($descending) ? "descending" : "ascending";
  520. } ?>" href="javascript:void('')" data-sort="extension"><?php echo Tools::safeOutput(lang_Type); ?></a></li>
  521. </ul>
  522. </div>
  523. </li>
  524. </ul>
  525. </div>
  526. <!----- breadcrumb div end ------->
  527. <div class="row-fluid ff-container">
  528. <div class="span12">
  529. <?php if (@opendir($current_path.$subfolder.$subdir) === false){ ?>
  530. <br/>
  531. <div class="alert alert-error">There is an error! The upload folder there isn't. Check your config.php file.
  532. </div>
  533. <?php }else{ ?>
  534. <h4 id="help"><?php echo Tools::safeOutput(lang_Swipe_help); ?></h4>
  535. <?php if (isset($folder_message))
  536. {
  537. ?>
  538. <div class="alert alert-block"><?php echo Tools::safeOutput($folder_message); ?></div>
  539. <?php } ?>
  540. <?php if ($show_sorting_bar)
  541. {
  542. ?>
  543. <!-- sorter -->
  544. <div class="sorter-container <?php echo "list-view".Tools::safeOutput($view); ?>">
  545. <div class="file-name"><a class="sorter sort-name <?php if ($sort_by == "name")
  546. {
  547. echo ($descending) ? "descending" : "ascending";
  548. } ?>" href="javascript:void('')" data-sort="name"><?php echo Tools::safeOutput(lang_Filename); ?></a></div>
  549. <div class="file-date"><a class="sorter sort-date <?php if ($sort_by == "date")
  550. {
  551. echo ($descending) ? "descending" : "ascending";
  552. } ?>" href="javascript:void('')" data-sort="date"><?php echo Tools::safeOutput(lang_Date); ?></a></div>
  553. <div class="file-size"><a class="sorter sort-size <?php if ($sort_by == "size")
  554. {
  555. echo ($descending) ? "descending" : "ascending";
  556. } ?>" href="javascript:void('')" data-sort="size"><?php echo Tools::safeOutput(lang_Size); ?></a></div>
  557. <div class='img-dimension'><?php echo Tools::safeOutput(lang_Dimension); ?></div>
  558. <div class='file-extension'><a class="sorter sort-extension <?php if ($sort_by == "extension")
  559. {
  560. echo ($descending) ? "descending" : "ascending";
  561. } ?>" href="javascript:void('')" data-sort="extension"><?php echo Tools::safeOutput(lang_Type); ?></a></div>
  562. <div class='file-operations'><?php echo Tools::safeOutput(lang_Operations); ?></div>
  563. </div>
  564. <?php } ?>
  565. <input type="hidden" id="file_number" value="<?php echo Tools::safeOutput($n_files); ?>"/>
  566. <!--ul class="thumbnails ff-items"-->
  567. <ul class="grid cs-style-2 <?php echo "list-view".Tools::safeOutput($view); ?>">
  568. <?php
  569. $jplayer_ext = array(
  570. "mp4",
  571. "flv",
  572. "webmv",
  573. "webma",
  574. "webm",
  575. "m4a",
  576. "m4v",
  577. "ogv",
  578. "oga",
  579. "mp3",
  580. "midi",
  581. "mid",
  582. "ogg",
  583. "wav"
  584. );
  585. foreach ($files as $file_array)
  586. {
  587. $file = $file_array['file'];
  588. if ($file == '.' || (isset($file_array['extension']) && $file_array['extension'] != lang_Type_dir) || ($file == '..' && $subdir == '') || in_array($file, $hidden_folders) || ($filter != '' && $file != ".." && strpos($file, $filter) === false))
  589. continue;
  590. $new_name = fix_filename($file, $transliteration);
  591. if ($file != '..' && $file != $new_name)
  592. {
  593. //rename
  594. rename_folder($current_path.$subdir.$new_name, $new_name, $transliteration);
  595. $file = $new_name;
  596. }
  597. //add in thumbs folder if not exist
  598. if (!file_exists($thumbs_path.$subdir.$file)) create_folder(false, $thumbs_path.$subdir.$file);
  599. $class_ext = 3;
  600. if ($file == '..' && trim($subdir) != '')
  601. {
  602. $src = explode("/", $subdir);
  603. unset($src[count($src) - 2]);
  604. $src = implode("/", $src);
  605. if ($src == '') $src = "/";
  606. } elseif ($file != '..')
  607. {
  608. $src = $subdir.$file."/";
  609. }
  610. ?>
  611. <li data-name="<?php echo Tools::safeOutput($file) ?>" <?php if ($file == '..') echo 'class="back"'; else echo 'class="dir"'; ?>>
  612. <figure data-name="<?php echo Tools::safeOutput($file) ?>" class="<?php if ($file == "..") echo "back-"; ?>directory" data-type="<?php if ($file != "..")
  613. {
  614. echo "dir";
  615. } ?>">
  616. <a class="folder-link" href="dialog.php?<?php echo $get_params.rawurlencode($src)."&".uniqid() ?>">
  617. <div class="img-precontainer">
  618. <div class="img-container directory"><span></span>
  619. <img class="directory-img" src="img/<?php echo Tools::safeOutput($icon_theme); ?>/folder<?php if ($file == "..")
  620. {
  621. echo "_back";
  622. } ?>.jpg" alt="folder"/>
  623. </div>
  624. </div>
  625. <div class="img-precontainer-mini directory">
  626. <div class="img-container-mini">
  627. <span></span>
  628. <img class="directory-img" src="img/<?php echo Tools::safeOutput($icon_theme); ?>/folder<?php if ($file == "..")
  629. {
  630. echo "_back";
  631. } ?>.png" alt="folder"/>
  632. </div>
  633. </div>
  634. <?php if ($file == ".."){ ?>
  635. <div class="box no-effect">
  636. <h4><?php echo Tools::safeOutput(lang_Back) ?></h4>
  637. </div>
  638. </a>
  639. <?php
  640. } else
  641. {
  642. ?>
  643. </a>
  644. <div class="box">
  645. <h4 class="<?php if ($ellipsis_title_after_first_row)
  646. {
  647. echo "ellipsis";
  648. } ?>">
  649. <a class="folder-link" data-file="<?php echo Tools::safeOutput($file) ?>" href="dialog.php?<?php echo Tools::safeOutput($get_params.rawurlencode($src)."&".uniqid()) ?>"><?php echo Tools::safeOutput($file); ?></a>
  650. </h4>
  651. </div>
  652. <input type="hidden" class="name" value=""/>
  653. <input type="hidden" class="date" value="<?php echo Tools::safeOutput($file_array['date']); ?>"/>
  654. <input type="hidden" class="size" value="<?php echo Tools::safeOutput($file_array['size']); ?>"/>
  655. <input type="hidden" class="extension" value="<?php echo lang_Type_dir; ?>"/>
  656. <div class="file-date"><?php echo date(lang_Date_type, $file_array['date']) ?></div>
  657. <?php if ($show_folder_size)
  658. {
  659. ?>
  660. <div class="file-size"><?php echo makeSize($file_array['size']) ?></div><?php } ?>
  661. <div class='file-extension'><?php echo lang_Type_dir; ?></div>
  662. <figcaption>
  663. <a href="javascript:void('')" class="tip-left edit-button <?php if ($rename_folders) echo "rename-folder"; ?>" title="<?php echo lang_Rename ?>" data-path="<?php echo Tools::safeOutput($subfolder.$subdir.$file); ?>" data-thumb="<?php echo Tools::safeOutput($subdir.$file); ?>">
  664. <i class="icon-pencil <?php if (!$rename_folders) echo 'icon-white'; ?>"></i></a>
  665. <a href="javascript:void('')" class="tip-left erase-button <?php if ($delete_folders) echo "delete-folder"; ?>" title="<?php echo lang_Erase ?>" data-confirm="<?php echo lang_Confirm_Folder_del; ?>" data-path="<?php echo Tools::safeOutput($subfolder.$subdir.$file); ?>" data-thumb="<?php echo Tools::safeOutput($subdir.$file); ?>">
  666. <i class="icon-trash <?php if (!$delete_folders) echo 'icon-white'; ?>"></i>
  667. </a>
  668. </figcaption>
  669. <?php } ?>
  670. </figure>
  671. </li>
  672. <?php
  673. }
  674. foreach ($files as $nu => $file_array) {
  675. $file = $file_array['file'];
  676. if ($file == '.' || $file == '..' || is_dir($current_path.$subfolder.$subdir.$file) || in_array($file, $hidden_files) || !in_array(fix_strtolower($file_array['extension']), $ext) || ($filter != '' && strpos($file, $filter) === false))
  677. continue;
  678. $file_path = $current_path.$subfolder.$subdir.$file;
  679. //check if file have illegal caracter
  680. $filename = substr($file, 0, '-'.(strlen($file_array['extension']) + 1));
  681. if ($file != fix_filename($file, $transliteration))
  682. {
  683. $file1 = fix_filename($file, $transliteration);
  684. $file_path1 = ($current_path.$subfolder.$subdir.$file1);
  685. if (file_exists($file_path1))
  686. {
  687. $i = 1;
  688. $info = pathinfo($file1);
  689. while (file_exists($current_path.$subfolder.$subdir.$info['filename'].".[".$i."].".$info['extension']))
  690. {
  691. $i++;
  692. }
  693. $file1 = $info['filename'].".[".$i."].".$info['extension'];
  694. $file_path1 = ($current_path.$subfolder.$subdir.$file1);
  695. }
  696. $filename = substr($file1, 0, '-'.(strlen($file_array['extension']) + 1));
  697. rename_file($file_path, fix_filename($filename, $transliteration), $transliteration);
  698. $file = $file1;
  699. $file_array['extension'] = fix_filename($file_array['extension'], $transliteration);
  700. $file_path = $file_path1;
  701. }
  702. $is_img = false;
  703. $is_video = false;
  704. $is_audio = false;
  705. $show_original = false;
  706. $show_original_mini = false;
  707. $mini_src = "";
  708. $src_thumb = "";
  709. $extension_lower = fix_strtolower($file_array['extension']);
  710. if (in_array($extension_lower, $ext_img))
  711. {
  712. $src = $base_url.$cur_dir.rawurlencode($file);
  713. $mini_src = $src_thumb = $thumbs_path.$subdir.$file;
  714. //add in thumbs folder if not exist
  715. if (!file_exists($src_thumb))
  716. {
  717. try
  718. {
  719. create_img_gd($file_path, $src_thumb, 122, 91);
  720. new_thumbnails_creation($current_path.$subfolder.$subdir, $file_path, $file, $current_path, $relative_image_creation, $relative_path_from_current_pos, $relative_image_creation_name_to_prepend, $relative_image_creation_name_to_append, $relative_image_creation_width, $relative_image_creation_height, $fixed_image_creation, $fixed_path_from_filemanager, $fixed_image_creation_name_to_prepend, $fixed_image_creation_to_append, $fixed_image_creation_width, $fixed_image_creation_height);
  721. } catch (Exception $e)
  722. {
  723. $src_thumb = $mini_src = "";
  724. }
  725. }
  726. $is_img = true;
  727. //check if is smaller than thumb
  728. list($img_width, $img_height, $img_type, $attr) = getimagesize($file_path);
  729. if ($img_width < 122 && $img_height < 91)
  730. {
  731. $src_thumb = $current_path.$subfolder.$subdir.$file;
  732. $show_original = true;
  733. }
  734. if ($img_width < 45 && $img_height < 38)
  735. {
  736. $mini_src = $current_path.$subfolder.$subdir.$file;
  737. $show_original_mini = true;
  738. }
  739. }
  740. $is_icon_thumb = false;
  741. $is_icon_thumb_mini = false;
  742. $no_thumb = false;
  743. if ($src_thumb == "")
  744. {
  745. $no_thumb = true;
  746. if (file_exists('img/'.$icon_theme.'/'.$extension_lower.".jpg"))
  747. {
  748. $src_thumb = 'img/'.$icon_theme.'/'.$extension_lower.".jpg";
  749. } else
  750. {
  751. $src_thumb = "img/".$icon_theme."/default.jpg";
  752. }
  753. $is_icon_thumb = true;
  754. }
  755. if ($mini_src == "")
  756. {
  757. $is_icon_thumb_mini = false;
  758. }
  759. $class_ext = 0;
  760. if (in_array($extension_lower, $ext_video))
  761. {
  762. $class_ext = 4;
  763. $is_video = true;
  764. } elseif (in_array($extension_lower, $ext_img))
  765. {
  766. $class_ext = 2;
  767. } elseif (in_array($extension_lower, $ext_music))
  768. {
  769. $class_ext = 5;
  770. $is_audio = true;
  771. } elseif (in_array($extension_lower, $ext_misc))
  772. {
  773. $class_ext = 3;
  774. } else
  775. {
  776. $class_ext = 1;
  777. }
  778. /* PrestaShop */
  779. if(isset($src_thumb) && $src_thumb)
  780. if (($src_thumb = preg_replace('#('.addslashes($current_path).')#ism', Tools::safeOutput(Context::getContext()->shop->physical_uri.'img/cms/'), $src_thumb)) == $src_thumb)
  781. $src_thumb = preg_replace('#('.addslashes($thumbs_base_path).')#ism', Tools::safeOutput(Context::getContext()->shop->physical_uri.'img/tmp/cms/'), $src_thumb);
  782. if(isset($mini_src) && $mini_src)
  783. if (($mini_src = preg_replace('#('.addslashes($current_path).')#ism', Tools::safeOutput(Context::getContext()->shop->physical_uri.'img/cms/'), $mini_src)) == $mini_src)
  784. $mini_src = preg_replace('#('.addslashes($thumbs_base_path).')#ism', Tools::safeOutput(Context::getContext()->shop->physical_uri.'img/tmp/cms/'), $mini_src);
  785. /* END PrestaShop */
  786. if ((!(Tools::getValue('type') == 1 && !$is_img) && !((Tools::getValue('type') == 3 && !$is_video) && (Tools::getValue('type') == 3 && !$is_audio))) && $class_ext > 0){
  787. ?>
  788. <li class="ff-item-type-<?php echo Tools::safeOutput($class_ext); ?> file" data-name="<?php echo Tools::safeOutput($file); ?>">
  789. <figure data-name="<?php echo Tools::safeOutput($file) ?>" data-type="<?php if ($is_img)
  790. {
  791. echo "img";
  792. } else
  793. {
  794. echo "file";
  795. } ?>">
  796. <a href="javascript:void('')" class="link" data-file="<?php echo Tools::safeOutput($file); ?>" data-field_id="" data-function="<?php echo Tools::safeOutput($apply); ?>">
  797. <div class="img-precontainer">
  798. <?php if ($is_icon_thumb)
  799. {
  800. ?>
  801. <div class="filetype"><?php echo $extension_lower ?></div><?php } ?>
  802. <div class="img-container">
  803. <span></span>
  804. <img alt="<?php echo Tools::safeOutput($filename." thumbnails"); ?>" class="<?php echo $show_original ? "original" : "" ?> <?php echo $is_icon_thumb ? "icon" : "" ?>" src="<?php echo Tools::safeOutput($src_thumb); ?>">
  805. </div>
  806. </div>
  807. <div class="img-precontainer-mini <?php if ($is_img) echo 'original-thumb' ?>">
  808. <div class="filetype <?php echo $extension_lower ?> <?php if (!$is_icon_thumb)
  809. {
  810. echo "hide";
  811. } ?>"><?php echo $extension_lower ?></div>
  812. <div class="img-container-mini">
  813. <span></span>
  814. <?php if ($mini_src != "")
  815. {
  816. ?>
  817. <img alt="<?php echo Tools::safeOutput($filename." thumbnails"); ?>" class="<?php echo $show_original_mini ? "original" : "" ?> <?php echo $is_icon_thumb_mini ? "icon" : "" ?>" src="<?php echo Tools::safeOutput($mini_src); ?>">
  818. <?php } ?>
  819. </div>
  820. </div>
  821. <?php if ($is_icon_thumb)
  822. {
  823. ?>
  824. <div class="cover"></div>
  825. <?php } ?>
  826. </a>
  827. <div class="box">
  828. <h4 class="<?php if ($ellipsis_title_after_first_row)
  829. {
  830. echo "ellipsis";
  831. } ?>">
  832. <a href="javascript:void('')" class="link" data-file="<?php echo Tools::safeOutput($file); ?>" data-field_id="" data-function="<?php echo Tools::safeOutput($apply); ?>">
  833. <?php echo Tools::safeOutput($filename); ?></a></h4>
  834. </div>
  835. <input type="hidden" class="date" value="<?php echo $file_array['date']; ?>"/>
  836. <input type="hidden" class="size" value="<?php echo $file_array['size'] ?>"/>
  837. <input type="hidden" class="extension" value="<?php echo $extension_lower; ?>"/>
  838. <input type="hidden" class="name" value=""/>
  839. <div class="file-date"><?php echo date(lang_Date_type, $file_array['date']) ?></div>
  840. <div class="file-size"><?php echo makeSize($file_array['size']) ?></div>
  841. <div class='img-dimension'><?php if ($is_img)
  842. {
  843. echo $img_width."x".$img_height;
  844. } ?></div>
  845. <div class='file-extension'><?php echo Tools::safeOutput($extension_lower); ?></div>
  846. <figcaption>
  847. <form action="force_download.php" method="post" class="download-form" id="form<?php echo Tools::safeOutput($nu); ?>">
  848. <input type="hidden" name="path" value="<?php echo Tools::safeOutput($subfolder.$subdir) ?>"/>
  849. <input type="hidden" class="name_download" name="name" value="<?php echo Tools::safeOutput($file) ?>"/>
  850. <a title="<?php echo lang_Download ?>" class="tip-right" href="javascript:void('')" onclick="$('#form<?php echo Tools::safeOutput($nu); ?>').submit();"><i class="icon-download"></i></a>
  851. <?php if ($is_img && $src_thumb != "")
  852. {
  853. ?>
  854. <a class="tip-right preview" title="<?php echo lang_Preview ?>" data-url="<?php echo Tools::safeOutput($src); ?>" data-toggle="lightbox" href="#previewLightbox"><i class=" icon-eye-open"></i></a>
  855. <?php
  856. } elseif (($is_video || $is_audio) && in_array($extension_lower, $jplayer_ext))
  857. {
  858. ?>
  859. <a class="tip-right modalAV <?php if ($is_audio)
  860. {
  861. echo "audio";
  862. } else
  863. {
  864. echo "video";
  865. } ?>"
  866. title="<?php echo lang_Preview ?>" data-url="ajax_calls.php?action=media_preview&title=<?php echo Tools::safeOutput($filename); ?>&file=<?php echo Tools::safeOutput(Context::getContext()->shop->physical_uri.'img/cms/'.$subfolder.$subdir.$file); ?>"
  867. href="javascript:void('');"><i class=" icon-eye-open"></i></a>
  868. <?php
  869. } else
  870. {
  871. ?>
  872. <a class="preview disabled"><i class="icon-eye-open icon-white"></i></a>
  873. <?php } ?>
  874. <a href="javascript:void('')" class="tip-left edit-button <?php if ($rename_files) echo "rename-file"; ?>" title="<?php echo lang_Rename ?>" data-path="<?php echo Tools::safeOutput($subfolder.$subdir.$file); ?>" data-thumb="<?php echo Tools::safeOutput($subdir.$file); ?>">
  875. <i class="icon-pencil <?php if (!$rename_files) echo 'icon-white'; ?>"></i></a>
  876. <a href="javascript:void('')" class="tip-left erase-button <?php if ($delete_files) echo "delete-file"; ?>" title="<?php echo lang_Erase ?>" data-confirm="<?php echo lang_Confirm_del; ?>" data-path="<?php echo Tools::safeOutput($subfolder.$subdir.$file); ?>" data-thumb="<?php echo Tools::safeOutput($subdir.$file); ?>">
  877. <i class="icon-trash <?php if (!$delete_files) echo 'icon-white'; ?>"></i>
  878. </a>
  879. </form>
  880. </figcaption>
  881. </figure>
  882. </li>
  883. <?php
  884. }
  885. }
  886. ?></div>
  887. </ul>
  888. <?php } ?>
  889. </div>
  890. </div>
  891. </div>
  892. <!----- lightbox div start ------->
  893. <div id="previewLightbox" class="lightbox hide fade" tabindex="-1" role="dialog" aria-hidden="true">
  894. <div class='lightbox-content'>
  895. <img id="full-img" src="">
  896. </div>
  897. </div>
  898. <!----- lightbox div end ------->
  899. <!----- loading div start ------->
  900. <div id="loading_container" style="display:none;">
  901. <div id="loading" style="background-color:#000; position:fixed; width:100%; height:100%; top:0px; left:0px;z-index:100000"></div>
  902. <img id="loading_animation" src="img/storing_animation.gif" alt="loading" style="z-index:10001; margin-left:-32px; margin-top:-32px; position:fixed; left:50%; top:50%"/>
  903. </div>
  904. <!----- loading div end ------->
  905. <!----- player div start ------->
  906. <div class="modal hide fade" id="previewAV">
  907. <div class="modal-header">
  908. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  909. <h3><?php echo lang_Preview; ?></h3>
  910. </div>
  911. <div class="modal-body">
  912. <div class="row-fluid body-preview">
  913. </div>
  914. </div>
  915. </div>
  916. <!----- player div end ------->
  917. <img id='aviary_img' src='' class="hide"/>
  918. </body>
  919. </html>
  920. <?php } ?>