} return false; } /* ]]>*/ </script> <div id="errors"> <?php $fs = new wproFilesystem(); if (!empty($failed)) { echo '<div class="smallWarning"><image src="' . $EDITOR->themeFolderURL . $EDITOR->theme . '/wysiwygpro/misc/warning16.gif" width="16" height="16" alt="" /> ' . $langEngine->get('wproCore_fileBrowser', 'moveErrorsOccurred') . '<br /><br /><ul>'; foreach ($failed as $file => $reason) { $extension = strrchr(strtolower($file), '.'); if (!$extension) { $icon = 'folder'; } else { $file_info = $fs->getFileInfo($extension); $icon = $file_info['icon']; } switch ($reason) { case 'notExist': echo '<li><img align="middle" alt="" src="' . htmlspecialchars($themeURL) . 'icons/' . htmlspecialchars($icon) . '.gif" width="16" height="16" /> <em>' . htmlspecialchars($file) . '</em>: ' . $langEngine->get('wproCore_fileBrowser', 'fileNotExistError') . '<br /><br /></li>'; break; case 'destInsideSrc': echo '<li><img align="middle" alt="" src="' . htmlspecialchars($themeURL) . 'icons/' . htmlspecialchars($icon) . '.gif" width="16" height="16" /> <em>' . htmlspecialchars($file) . '</em>: ' . $langEngine->get('wproCore_fileBrowser', 'insideItselfError') . '<br /><br /></li>'; break; case 'duplicate': echo '<li><img align="middle" alt="" src="' . htmlspecialchars($themeURL) . 'icons/' . htmlspecialchars($icon) . '.gif" width="16" height="16" /> <em>' . htmlspecialchars($file) . '</em>: ' . $langEngine->get('wproCore_fileBrowser', 'fileExistsError') . '<br /><br /></li>'; break; case 'reserved': echo '<li><img align="middle" alt="" src="' . htmlspecialchars($themeURL) . 'icons/' . htmlspecialchars($icon) . '.gif" width="16" height="16" /> <em>' . htmlspecialchars($file) . '</em>: ' . $langEngine->get('wproCore_fileBrowser', 'moveReservedNameError') . '<br /><br /></li>'; break;
function displayFileDetails($folderId = 0, $folderPath = '', $file = '', $fromPlugin = true) { global $EDITOR, $DIALOG; $response = $DIALOG->createAjaxResponse(); $response->addScriptCall('FB.displayExtraDetails', NULL); // initial var check... if (!isset($folderId, $folderPath, $file) || !is_string($folderId) && !is_int($folderId) || !is_string($folderPath) || !is_string($file)) { return $response; } $this->loadEmbedPlugins(); if ($arr = $this->getFolder($folderId, $folderPath, $response)) { $directory = $arr['directory']; $URL = $arr['URL']; $dir = $arr['dir']; $fs = new wproFilesystem(); if ($fs->fileNameOk($file) && is_file($directory . $file)) { $extension = strrchr($file, '.'); foreach ($this->embedPlugins as $name => $plugin) { if ($plugin->local) { if ($fs->extensionOK($extension, $plugin->extensions)) { if ($fromPlugin) { $response->addScriptCall('FB.populateLocalOptions', $name, $plugin->getDetails($directory . $file, $response)); } $response->addScriptCall('FB.displayExtraDetails', $plugin->displayDetails($directory . $file, $response)); break; } } } if (!$fromPlugin || $fromPlugin == 'false') { $arr = $fs->getFileInfo($extension); $arr['size'] = $fs->fileSize($directory . $file); $arr['description'] = $DIALOG->langEngine->get('files', $arr['description']); $response->addScriptCall('FB.linksPopulateLocalOptions', $arr); } } } return $response; }