<?php if (sizeof($chartLegendValues) == 0) { ?> <h1><i class="fa fa-line-chart hidden-xs"></i> График авторизаций<span class="hidden-xs"> в сети</span></h1> <div class="page-wrapper"> <p class="text-center">Нет данных</p> </div> <?php } else { // Соц. сети и их названия $loginOptions = $database->getLoginOptions(); $socialNetworksNames = CommonFunctions::extractSingleValueFromMultiValueArray($loginOptions, 'NAME'); ?> <div class="complex-h1"> <i class="fa fa-line-chart hidden-xs"></i> <h1>График авторизаций<span class="hidden-xs"> в сети</span></h1> <h2 class="hidden-xs">Количество пользователей за последние <?php echo $temp; ?> дней</h2> <span class="options hidden-xs"> <select id="main-stats-chart-period"> <option value="365"<?php if ($temp == 365) { echo ' selected'; } ?> >1 год</option> <option value="183"<?php
/** * @author Anthony Boutinov * * @param bool $count_deactivated (Опционально) Считать вмете с деактивированными. По умолчанию, не считать их. * @retval int */ public function getDBUsersCount($count_deactivated = false) { $sql = 'select count(ID_DB_USER) as COUNT from CM$DB_USER where IS_SUPERADMIN=\'F\' ' . 'union select count(ID_DB_USER) as COUNT from CM$DB_USER where IS_SUPERADMIN=\'T\''; if ($count_deactivated == false) { $sql = $sql . ' and IS_ACTIVE=\'T\''; } $array = $this->toArray($this->getQueryResultWithErrorNoticing($sql)); return CommonFunctions::extractSingleValueFromMultiValueArray($array, 'COUNT'); }
$height = $charthHeight + 30; } include_once 'googleChartAPI.html'; ?> <script type="text/javascript"> // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { var data = new google.visualization.arrayToDataTable([ [{type: 'date', label: 'День'}, <?php echo CommonFunctions::arrayToString(CommonFunctions::extractSingleValueFromMultiValueArray($database->getLoginOptions(), 'NAME'), false, true, true, ' ', '],', "{type: 'number', label: '", "'}"); if (isset($_SESSION['main-stats-chart-data-offset']) && isset($_SESSION['main-stats-chart-data-limit'])) { echo CommonFunctions::arrayToString($database->getMainStatsTable($_SESSION['main-stats-chart-data-limit'], $_SESSION['main-stats-chart-data-offset']), false, false, false); } else { echo CommonFunctions::arrayToString($database->getMainStatsTable(30), false, false, false); } ?> ]); var options = { animation: {duration: 1000, startup: true, easing: 'inAndOut' }, explorer: {}, selectionMode: 'single', tooltip: {trigger: 'selection'}, backgroundColor: { fill:'transparent' }, fontName: 'Fontatigo, "Helvetica Nueue", Helvetica, Arial, "Lucida Grande", sans-serif',