$graph = new EfrontGraph();
     $graph->type = 'line';
     for ($i = 0; $i < sizeof($labels); $i++) {
         $graph->data[] = array($i, $count[$i]);
         $graph->xLabels[] = array($i, '<span style = "white-space:nowrap">' . formatTimestamp($labels[$i]) . '</span>');
     }
     $graph->xTitle = _DAY;
     $graph->yTitle = _LOGINS;
     $graph->title = _LOGINSPERDAY;
     echo json_encode($graph);
     exit;
 } elseif (isset($_GET['ajax']) && $_GET['ajax'] == 'graph_lesson_access') {
     $lesson = new EfrontLesson($_GET['entity']);
     $timesReport = new EfrontTimes(array($from, $to));
     $cnt = 0;
     $result = $timesReport->getUserSessionTimeInSingleLessonPerDay($infoUser->user['login'], $lesson->lesson['id']);
     foreach ($result as $key => $value) {
         $labels[$cnt] = $key;
         $count[$cnt++] = ceil($value / 60);
     }
     $graph = new EfrontGraph();
     $graph->type = 'line';
     for ($i = 0; $i < sizeof($labels); $i++) {
         $graph->data[] = array($i, $count[$i]);
         $graph->xLabels[] = array($i, '<span style = "white-space:nowrap">' . formatTimestamp($labels[$i]) . '</span>');
     }
     $graph->xTitle = _DAY;
     $graph->yTitle = _MINUTES;
     $graph->title = _MINUTESPERDAY;
     echo json_encode($graph);
     exit;