$isAdmin = CAdvContract::IsAdmin(); if (!$isAdmin && !$isDemo && !$isManager && !$isAdvertiser) { $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); } } else { $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); } } IncludeModuleLangFile(__FILE__); $sTableID = "tbl_stat_country_multiselect"; $oSort = new CAdminSorting($sTableID, "s_id", "asc"); $lAdmin = new CAdminList($sTableID, $oSort); $FilterArr = array("find", "find_type", "find_id", "find_id_exact_match", "find_short_name", "find_short_name_exact_match", "find_name", "find_name_exact_match"); $lAdmin->InitFilter($FilterArr); $arFilter = array("ID" => $find != "" && $find_type == "id" ? $find : $find_id, "ID_EXACT_MATCH" => $find_id_exact_match, "SHORT_NAME" => $find != "" && $find_type == "short_name" ? $find : $find_short_name, "SHORT_NAME_EXACT_MATCH" => $find_short_name_exact_match, "NAME" => $find != "" && $find_type == "name" ? $find : $find_name, "NAME_EXACT_MATCH" => $find_name_exact_match); $cData = new CCountry(); $rsData = $cData->GetList($by, $order, $arFilter, $is_filtered); $rsData = new CAdminResult($rsData, $sTableID); $rsData->NavStart(); $lAdmin->NavText($rsData->GetNavPrint(GetMessage("STAT_COUNTRY_MSEL_PAGES"))); $arHeaders = array(array("id" => "ID", "content" => GetMessage("STAT_COUNTRY_MSEL_ID"), "sort" => "s_id", "default" => true), array("id" => "SHORT_NAME", "content" => GetMessage("STAT_COUNTRY_MSEL_SHORT_NAME"), "sort" => "s_short_name", "default" => true), array("id" => "NAME", "content" => GetMessage("STAT_COUNTRY_MSEL_NAME"), "sort" => "s_name", "default" => true)); $lAdmin->AddHeaders($arHeaders); while ($arRes = $rsData->NavNext(true, "f_")) { $row =& $lAdmin->AddRow($f_ID, $arRes); $row->AddViewField("ID", $f_ID . '<input type="hidden" name="NAME[' . $f_ID . ']" id="NAME[' . $f_ID . ']" value="[' . $f_ID . '] ' . $f_NAME . '">'); } $arFooter = array(); $arFooter[] = array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()); $arFooter[] = array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0"); $lAdmin->AddFooter($arFooter); $lAdmin->AddGroupActionTable(array(array("action" => "setTargetValue(0, 'form_" . $sTableID . "', '" . CUtil::JSEscape($_REQUEST["field"]) . "')", "value" => "select", "type" => "button", "title" => GetMessage("STAT_COUNTRY_MSEL_SELECT_TITLE"), "name" => GetMessage("STAT_COUNTRY_MSEL_SELECT"))), array("disable_action_target" => true));
// create image $ImageHandle = CreateImageHandle($width, $height); $arrX = array(); // data points X $arrY = array(); // data points Y $arrayX = array(); // axis X $arrayY = array(); // axis Y /****************************************************** Get data *******************************************************/ $str = is_array($find_country_id) ? implode(" | ", $find_country_id) : ""; $arF = array("COUNTRY_ID" => $str, "DATE1" => $find_date1, "DATE2" => $find_date2); $arrDays = CCountry::GetGraphArray($arF, $arrLegend); reset($arrDays); while (list($keyD, $arD) = each($arrDays)) { $date = mktime(0, 0, 0, $arD["M"], $arD["D"], $arD["Y"]); $date_tmp = 0; $next_date = AddTime($prev_date, 1, "D"); if ($date > $next_date && intval($prev_date) > 0) { $date_tmp = $next_date; while ($date_tmp < $date) { $arrX[] = $date_tmp; reset($arrLegend); while (list($keyL, $arrL) = each($arrLegend)) { $arrY_data[$keyL][] = 0; $arrY[] = 0; } $date_tmp = AddTime($date_tmp, 1, "D");
*/ require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/statistic/prolog.php"; include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/statistic/colors.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/img.php"; $STAT_RIGHT = $APPLICATION->GetGroupRight("statistic"); if ($STAT_RIGHT == "D") { $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); } IncludeModuleLangFile(__FILE__); $err_mess = "File: " . __FILE__ . "<br>Line: "; /*************************************************************************** GET | POST handlers ****************************************************************************/ $arrCOUNTRY = array(); $rs = CCountry::GetList($v1 = "s_name", $v2 = "asc", array(), $v); while ($ar = $rs->Fetch()) { $arrCOUNTRY[$ar["ID"]] = $ar["NAME"] . " [" . $ar["ID"] . "]"; } $sTableID = "t_city_list"; $oSort = new CAdminSorting($sTableID); $lAdmin = new CAdminList($sTableID, $oSort); if (!isset($find_data_type) || !in_array($find_data_type, array("NEW_GUESTS", "HITS", "C_EVENTS", "SESSIONS"))) { $find_data_type = false; } if ($lAdmin->IsDefaultFilter()) { //$find_data_type = "SESSIONS"; $find_date1_DAYS_TO_BACK = 90; $find_country_id = ""; $set_filter = "Y"; }