Example #1
0
 public function indexAction()
 {
     $statisticMapper = new StatisticMapper();
     $moduleMapper = new ModuleMapper();
     $this->getLayout()->getHmenu()->add($this->getTranslator()->trans('menuStatistic'), array('action' => 'index'));
     $date = new \Ilch\Date();
     $this->getView()->set('dateCmsInstalled', $this->getConfig()->get('date_cms_installed'));
     $this->getView()->set('registUserCount', $statisticMapper->getRegistUserCount());
     $this->getView()->set('registNewUser', $statisticMapper->getRegistNewUser());
     $this->getView()->set('articlesCount', $statisticMapper->getArticlesCount());
     $this->getView()->set('commentsCount', $statisticMapper->getCommentsCount());
     $this->getView()->set('modulesCount', $statisticMapper->getModulesCount());
     $this->getView()->set('CMSVersion', $this->getConfig()->get('version'));
     $this->getView()->set('modules', $moduleMapper->getModules());
     $this->getView()->set('visitsToday', $statisticMapper->getVisitsCount($date->format('Y-m-d')));
     $this->getView()->set('visitsMonth', $statisticMapper->getVisitsMonthCount());
     $this->getView()->set('visitsYear', $statisticMapper->getVisitsYearCount());
     $this->getView()->set('visitsTotal', $statisticMapper->getVisitsCount($date->format('Y-m-d')));
     $this->getView()->set('visitsYearTotal', $statisticMapper->getVisitsCount('', $date->format('Y')));
     $this->getView()->set('visitsAllTotal', $statisticMapper->getVisitsCount());
     $this->getView()->set('statisticHourList', $statisticMapper->getVisitsHour());
     $this->getView()->set('statisticDayList', $statisticMapper->getVisitsDay());
     $this->getView()->set('statisticYearMonthDayList', $statisticMapper->getVisitsYearMonthDay($date->format('Y', true), $date->format('m', true)));
     $this->getView()->set('statisticYearMonthList', $statisticMapper->getVisitsYearMonth());
     $this->getView()->set('statisticYearList', $statisticMapper->getVisitsYear());
     $this->getView()->set('statisticBrowserList', $statisticMapper->getVisitsBrowser());
     $this->getView()->set('statisticLanguageList', $statisticMapper->getVisitsLanguage());
     $this->getView()->set('statisticOSList', $statisticMapper->getVisitsOS());
 }