Example #1
0
}
if (!$arF || !empty($_GET['notfoud'])) {
    $arResult["NAME"] = GetMessage("WD_MODULE_IS_FILE_NOT_FOUND");
    $arResult["ICON"] = "nf.png";
    $arResult["F_SIZE"] = 0;
    $arResult["DESCRIPTION"] = GetMessage("WD_MODULE_IS_FILE_NOT_FOUND_DESCRIPTION");
    $arResult["FILE_NOT_FOUND"] = true;
}
if (!empty($_POST['checkViewByGoogle'])) {
    CWebDavTools::sendJsonResponse(array('viewByGoogle' => $arResult["DOWNLOAD_COUNT"] > 0));
}
if (!empty($arF) && !empty($arF['LINK_TYPE']) && $arF['LINK_TYPE'] == CWebDavExtLinks::LINK_TYPE_AUTO) {
    CWebDavExtLinks::LoadFile($arGetListRes);
}
if (!empty($arF) && !empty($arF['SINGLE_SESSION'])) {
    CWebDavExtLinks::DeleteSingleSessionLink($hash);
    CWebDavExtLinks::LoadFile($arGetListRes);
}
$arResult["COMPANY_NAME"] = COption::GetOptionString("main", "site_name", "");
if (array_key_exists("LoadFile", $_REQUEST) && intval($_REQUEST["LoadFile"]) > 0 && $arResult["PASSWORD"] == "NOT" && $arGetListRes['LINK_TYPE'] != CWebDavExtLinks::LINK_TYPE_AUTO) {
    CWebDavExtLinks::LoadFile($arGetListRes);
}
$arResult['ALLOW_VIEWER'] = false;
if ($arResult["PASSWORD"] == "NOT" && empty($arF['PASSWORD']) && CWebDavExtLinks::DEMO_HASH != $hash) {
    $allowExtDocServicesGlobal = CWebDavTools::allowUseExtServiceGlobal();
    if ($allowExtDocServicesGlobal && CWebDavTools::allowPreviewFile($arF["URL"], $arResult["F_SIZE"])) {
        $arResult['ALLOW_VIEWER'] = true;
    }
}
$APPLICATION->RestartBuffer();
$this->IncludeComponentTemplate();