function PreviewFlash($Params) { if (CModule::IncludeModule("fileman")) { global $APPLICATION, $USER; if (CModule::IncludeModule("compression")) { CCompress::Disable2048Spaces(); } $path = $Params['path']; $path = CFileMan::SecurePathVar($path); $path = Rel2Abs("/", $path); $arPath = array($Params['site'], $path); if (!$USER->CanDoFileOperation('fm_view_file', $arPath)) { $path = ''; } if ($path == "") { return; } $APPLICATION->RestartBuffer(); ?> <HTML> <HEAD></HEAD> <BODY id="__flash" style="margin:0px; border-width: 0px;"> <embed id="__flash_preview" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="__flash_preview" quality="high" width="<?php echo $Params['width']; ?> " height="<?php echo $Params['height']; ?> " src="<?php echo htmlspecialcharsex($path); ?> " /> </BODY> </HTML> <?php die; } }
define('SITE_ID', $siteID); } } require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/bx_root.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'; if (!defined('LANGUAGE_ID')) { $dbSite = CSite::GetByID(SITE_ID); $arSite = $dbSite ? $dbSite->Fetch() : null; define('LANGUAGE_ID', $arSite ? $arSite['LANGUAGE_ID'] : 'en'); } //session_write_close(); if (!CModule::IncludeModule('crm')) { die; } if (CModule::IncludeModule('compression')) { CCompress::Disable2048Spaces(); } global $APPLICATION, $DB; $curUser = CCrmSecurityHelper::GetCurrentUser(); if (!$curUser || !$curUser->IsAuthorized() || !check_bitrix_sessid() || $_SERVER['REQUEST_METHOD'] != 'POST') { die; } //$langID = isset($_REQUEST['lang_id'])? $_REQUEST['lang_id']: LANGUAGE_ID; //__IncludeLang(dirname(__FILE__).'/lang/'.$langID.'/'.basename(__FILE__)); CUtil::JSPostUnescape(); if (!function_exists('__CrmMobileDealEditEndResonse')) { function __CrmMobileDealEditEndResonse($result) { $GLOBALS['APPLICATION']->RestartBuffer(); Header('Content-Type: application/x-javascript; charset=' . LANG_CHARSET); if (!empty($result)) {
function OnAfterEpilog() { global $USER; $canEditPHP = $USER->CanDoOperation('edit_php'); $bShowTime = isset($_SESSION["SESS_SHOW_TIME_EXEC"]) && ($_SESSION["SESS_SHOW_TIME_EXEC"] == 'Y'); $bShowStat = ($GLOBALS["DB"]->ShowSqlStat && ($canEditPHP || $_SESSION["SHOW_SQL_STAT"]=="Y")); $bShowCacheStat = (\Freetrix\Main\Data\Cache::getShowCacheStat() && ($canEditPHP || $_SESSION["SHOW_CACHE_STAT"]=="Y")); $bExcel = isset($_REQUEST["mode"]) && $_REQUEST["mode"] === 'excel'; $ENCODING = CCompress::CheckCanGzip(); if($ENCODING !== 0) { $level = 4; if (isset($_GET["compress"])) { if ($_GET["compress"] === "Y" || $_GET["compress"] === "y") $_SESSION["SESS_COMPRESS"] = "Y"; elseif ($_GET["compress"] === "N" || $_GET["compress"] === "n") unset($_SESSION["SESS_COMPRESS"]); } if(!defined("ADMIN_AJAX_MODE") && !defined('PUBLIC_AJAX_MODE') && !$bExcel) { if($bShowTime || $bShowStat || $bShowCacheStat) { $main_exec_time = round((getmicrotime()-START_EXEC_TIME), 4); include_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/interface/debug_info.php"); } if(isset($_SESSION["SESS_COMPRESS"]) && $_SESSION["SESS_COMPRESS"] == "Y") include($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/compression/table.php"); } ob_end_flush(); $Contents = ob_get_contents(); ob_end_clean(); if(!defined("FX_SPACES_DISABLED") || FX_SPACES_DISABLED!==true) if((strpos($GLOBALS["HTTP_USER_AGENT"], "MSIE 5")>0 || strpos($GLOBALS["HTTP_USER_AGENT"], "MSIE 6.0")>0) && strpos($GLOBALS["HTTP_USER_AGENT"], "Opera")===false) $Contents = str_repeat(" ", 2048)."\r\n".$Contents; $Size = function_exists("mb_strlen")? mb_strlen($Contents, 'latin1'): strlen($Contents); $Crc = crc32($Contents); $Contents = gzcompress($Contents, $level); $Contents = function_exists("mb_substr")? mb_substr($Contents, 0, -4, 'latin1'): substr($Contents, 0, -4); header("Content-Encoding: $ENCODING"); print "\x1f\x8b\x08\x00\x00\x00\x00\x00"; print $Contents; print pack('V',$Crc); print pack('V',$Size); } else { ob_end_flush(); ob_end_flush(); if(($bShowTime || $bShowStat || $bShowCacheStat) && !defined("ADMIN_AJAX_MODE") && !defined('PUBLIC_AJAX_MODE')) { $main_exec_time = round((getmicrotime()-START_EXEC_TIME), 4); include_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/interface/debug_info.php"); } } }