CanDoOperation('seo_tools')) $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); $io = CBXVirtualIo::GetInstance(); $path = "/"; if (isset($_REQUEST["path"]) && $_REQUEST["path"] <> '') { $path = $_REQUEST["path"]; $path = $io->CombinePath("/", $path); } //Page path $documentRoot = CSite::GetSiteDocRoot($_REQUEST['site']); $absoluteFilePath = $documentRoot.$path; if (false !== ($pos = mb_strrpos($absoluteFilePath, '/'))) { $absoluteDirPath = mb_substr($absoluteFilePath, 0, $pos); } $bReadOnly = false; // this rights check is temporary disabled. it's fileman rights, we don't have to take a look on'em... // if (IsModuleInstalled("fileman")) // { // if (!$USER->CanDoOperation('fileman_admin_files') && !$USER->CanDoOperation('fileman_edit_existent_files')) // $bReadOnly = true; // } IncludeModuleLangFile(__FILE__); //Check permissions if (!$io->FileExists($absoluteFilePath)) { CAdminMessage::ShowMessage(GetMessage('SEO_TOOLS_ERROR_FILE_NOT_FOUND')." (".HtmlFilter::encode($path).")"); die(); } elseif (!$USER->CanDoFileOperation('fm_edit_existent_file',array($_REQUEST['site'], $path))) { $bReadOnly = true; } function SeoShowHelp($topic) { $msg = GetMessage('SEO_HELP_'.$topic); if ($msg <> '') { $msg = ShowJSHint($msg, array('return' => true)); } return $msg; } CModule::IncludeModule('seo'); $bStatsIncluded = CModule::IncludeModule('statistic'); $bStatsRights = $APPLICATION->GetGroupRight("statistic") >= 'M'; // view stats w/o finance data //get site settings $site = SITE_ID; if (isset($_REQUEST["site"]) && $_REQUEST["site"] <> '') { $obSite = CSite::GetByID($_REQUEST["site"]); if ($arSite = $obSite->Fetch()) { $site = HtmlFilter::encode($_REQUEST["site"]); $serverName = HtmlFilter::encode($arSite['SERVER_NAME']); } } //find server name in other places if ($serverName == '') $serverName = COption::GetOptionString('main', 'server_name', ''); if ($serverName == '') $serverName = $_SERVER['SERVER_NAME']; $serverName = str_replace(array("https://", "http://"), '', $serverName); $protocol = \CMain::IsHTTPS() ? "https://" : "http://"; $serverPort = intval($_SERVER['SERVER_PORT']); $serverHost = $_SERVER['HTTP_HOST']; if($serverPort <> '' && $serverHost <> '') if(mb_strpos($serverHost, $serverPort) !== false || ($serverPort!=80 && $serverPort!=443)) $serverName .= ":".$serverPort; //lang if (!isset($_REQUEST["lang"]) || $_REQUEST["lang"] == '') $lang = LANGUAGE_ID; // title changers if($_REQUEST['title_changer_name'] <> '') { $titleChangerName = $_REQUEST['title_changer_name']; } if ($_REQUEST['title_changer_link'] <> '') $titleChangerLink = base64_decode($_REQUEST['title_changer_link']); if($_REQUEST['title_final'] <> '') { $titleFinal = base64_decode($_REQUEST['title_final']); } // browser title changers if($_REQUEST['title_win_changer_name'] <> '') { $titleWinChangerName = $_REQUEST['title_win_changer_name']; } if ($_REQUEST['title_win_changer_link'] <> '') $titleWinChangerLink = base64_decode($_REQUEST['title_win_changer_link']); if($_REQUEST['title_win_final'] <> '') { $titleWinFinal = base64_decode($_REQUEST['title_win_final']); } //back url processing $back_url = (isset($_REQUEST["back_url"]) ? $_REQUEST["back_url"] : ""); $original_backurl = $back_url; $back_url = CSeoUtils::CleanURL($back_url); /**************** ajax tabs processing ************************/ if (isset($_REQUEST['loadtab'])) { define('ADMIN_AJAX_MODE', 1); $searchers = COption::GetOptionString('seo', 'searchers_list', ''); $arSearchers = array(); if ($searchers <> '') { $arSearchers = explode(',', $searchers); $arSearcherHits = array(); if (count($arSearchers) > 0) { $dbRes = CSearcher::GetList('s_name', 'asc', array('ID' => implode('|', $arSearchers))); $arSearchers = array(); while ($arRes = $dbRes->Fetch()) { $arSearchers[$arRes['ID']] = $arRes; $arSearcherHits[$arRes['ID']] = 0; } } } switch($_REQUEST['loadtab']) { case 'indexing': if (count($arSearchers) <= 0): ?>
implode('|', array_keys($arSearchers)), 'DATE1' => ConvertTimeStamp(strtotime('-3 month'), false, $site_id), 'DATE2' => ConvertTimeStamp(time(), false, $site_id), 'URL' => $url, 'URL_EXACT_MATCH' => 'Y', 'SITE_ID' => $site, ); $last_ts = strtotime('-'.COption::GetOptionInt('statistic', 'SEARCHER_HIT_DAYS', 3).' days'); $total = 0; $dbRes = CSearcherHit::GetList('s_searcher_id', 'asc', $arFilter); while ($arRes = $dbRes->Fetch()) { $ts = MakeTimeStamp($arRes['DATE_HIT']); $total++; if ($ts < $last_ts) $last_ts = $ts; $arSearcherHits[$arRes['SEARCHER_ID']]++; } $days_count = floor((time() - $last_ts)/86400); ?> 0): foreach ($arSearcherHits as $key => $count): if ($count > 0): ?> $arFilter['SEARCHER_ID'], "DATE1" => $arFilter['DATE1'], "DATE2" => $arFilter['DATE2'], "SUMMA" => 'N' ), $arrLegend ); ?> 0 && count($arrDays) > 1): ?>
:  


$arrL): $color = $arrL["COLOR"]; ?>
[