$sType = "b24_template"; } $arResult = array("SITE_TYPE" => $sType, "ICON" => "empty.jpg", "F_SIZE" => 0, "DESCRIPTION" => "", "FILE_NOT_FOUND" => false, "PASSWORD" => "NOT"); $hash = CWebDavExtLinks::GetHashFromURL(); if ($hash === false) { ShowError(GetMessage('WD_MODULE_IS_FILE_NOT_FOUND')); return 0; } //not set default value to in getList LINK_TYPE $resF = CWebDavExtLinks::GetList(array("HASH" => $hash, "ACTUAL" => true, 'LINK_TYPE' => null), array("URL", "RESOURCE_TYPE", "FOLDER", "IBLOCK_TYPE", "IBLOCK_ID", "BASE_URL", "HASH", "CREATION_DATE", "USER_ID", "SALT", "PASSWORD", "LIFETIME", "F_SIZE", "DESCRIPTION", "ROOT_SECTION_ID", "URL_HASH", 'SINGLE_SESSION', 'LINK_TYPE', 'DOWNLOAD_COUNT', 'VERSION_ID', 'ELEMENT_ID', 'FILE_ID')); $arGetListRes = null; if ($arF = $resF->Fetch()) { $arGetListRes = $arF; $arResult["HASH"] = $hash; $arResult["NAME"] = GetFileName($arF["URL"]); $arResult["ICON"] = CWebDavExtLinks::GetExtensionIcon($arF["URL"]); $arResult["F_SIZE"] = $arF["F_SIZE"]; $arResult["DESCRIPTION"] = $arF["DESCRIPTION"]; $arResult["PASSWORD"] = CheckUserPassword($arF); $arResult["DOWNLOAD_COUNT"] = $arF['DOWNLOAD_COUNT']; } 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)); }