- Модуль: statistic
- Путь к файлу: ~/bitrix/modules/statistic/classes/general/statistic.php
- Класс: CAllStatistics
- Вызов: CAllStatistics::StartBuffer
static function StartBuffer()
{
/** CMain $APPLICATION */
/** CUser $USER */
global $APPLICATION, $USER;
if (defined("ADMIN_SECTION") && (ADMIN_SECTION === true))
{
return;
}
if(!(($USER->IsAuthorized() || $APPLICATION->ShowPanel===true) && $APPLICATION->ShowPanel!==false))
{
return;
}
if (isset($_GET["show_link_stat"]))
{
if ($_GET["show_link_stat"]=="Y")
{
$_SESSION["SHOW_LINK_STAT"] = "Y";
}
elseif ($_GET["show_link_stat"]=="N")
{
$_SESSION["SHOW_LINK_STAT"] = "N";
}
}
$STAT_RIGHT = $APPLICATION->GetGroupRight("statistic");
if ($STAT_RIGHT < "R")
{
return;
}
$width = 650;
$height = 650;
$CURRENT_PAGE = __GetFullRequestUri(__GetFullCurPage());
$arButtons = array();
$arButtons[] = array(
"TEXT" => GetMessage("STAT_PAGE_GRAPH_PANEL_BUTTON"),
"TITLE" => GetMessage("STAT_PAGE_GRAPH_PANEL_BUTTON"),
"IMAGE" => "/bitrix/images/statistic/page_traffic.gif",
"ACTION" => "javascript:window.open('/bitrix/admin/section_graph_list.php?lang=". LANGUAGE_ID."&public=Y&width=".$width."&height=".$height."§ion=".urlencode($CURRENT_PAGE)."&set_default=Y','','target=_blank,scrollbars=yes,resizable=yes,width=".$width. ",height=".$height.",left='+Math.floor((screen.width - ".$width.")/2)+',top='+Math.floor((screen.height- ".$height.")/2))",
);
$APPLICATION->AddPanelButton(array(
"ICON" => "bx-panel-statistics-icon",
"ALT" => GetMessage("STAT_PANEL_BUTTON"),
"TEXT" => GetMessage("STAT_PANEL_BUTTON"),
"MAIN_SORT" => 1000,
"MENU" => $arButtons,
"MODE" => "view",
"HINT" => array(
"TITLE" => GetMessage("STAT_PANEL_BUTTON"),
"TEXT" => GetMessage("STAT_PANEL_BUTTON_HINT"),
)
));
}