コード例 #1
0
ファイル: ajax.php プロジェクト: mrdeadmouse/u136006
        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)) {
コード例 #2
0
ファイル: file_dialog.php プロジェクト: spas-viktor/books
    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;
        }
    }