| Current Path : /var/www/element/data/www/greenpr.ru/bitrix/modules/fileman/admin/ |
| Current File : /var/www/element/data/www/greenpr.ru/bitrix/modules/fileman/admin/fileman_flash_preview.php |
<?
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/prolog.php");
if (!$USER->CanDoOperation('fileman_view_file_structure'))
$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/include.php");
if(CModule::IncludeModule("compression"))
CCompress::Disable2048Spaces();
if (isset($_GET['path']))
{
$site = CFileMan::__CheckSite($site);
if(!$site)
$site = CSite::GetSiteByFullPath($_SERVER["DOCUMENT_ROOT"].$path);
$documentRoot = CSite::GetSiteDocRoot($site);
$path = Rel2Abs("/", $path);
$abs_path = $documentRoot.$path;
$arPath = Array($site, $path);
if (file_exists($abs_path) && $USER->CanDoFileOperation('fm_view_file', $arPath))
{
$width = isset($width) ? 'width="'.htmlspecialcharsex($width).'"' : '';
$height = isset($height) ? 'height="'.htmlspecialcharsex($height).'"' : '';
?>
<HTML><HEAD></HEAD><BODY>
<embed id="flash_preview" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="preview_flash"
quality="high" <?=$width?> <?=$height?> src="<?=htmlspecialcharsex($path)?>" />
</BODY></HTML>
<?
}
}
?>