Example #1
0
 protected function loadData()
 {
     $this->id = $this->getParameter('id', 'int', null);
     if ($this->id == null || !BackendMailengineModel::existsStatsMail($this->id)) {
         $this->redirect(BackendModel::createURLForAction('Stats') . '&error=non-existing');
     }
     $this->header->addJS('highcharts.js', 'Core', false);
     //--Get mail stats
     $this->record = BackendMailengineModel::getStatsMail($this->id);
     //--Get the opened mails by date
     $this->mailsOpenedByDayChart = BackendMailengineModel::getStatsMailOpenedByDay($this->id);
     //--Get the opened mails by date
     $this->mailsOpenedByHourChart = BackendMailengineModel::getStatsMailOpenedByHour($this->id);
     //--Get the clicked links
     $this->linksClickedTotalChart = BackendMailengineModel::getStatsLinksClickedTotal($this->id);
     //--Get the clicked links by day
     $this->linksClickedByDayChart = BackendMailengineModel::getStatsLinksClickedByDay($this->id);
 }