public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who have not opened the message
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultIterator = $this->model->fetchMessageOpens($this->isOpened, $start, $limit);
     foreach ($resultIterator as $row) {
         $key = $row['email'];
         $w->addElement($key, new CommonPlugin_PageURL('user', array('id' => $row['userid'])));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
     }
 }
Exemplo n.º 2
0
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with domains
      */
     $w->setTitle($this->i18n->get('Domain'));
     $resultSet = $this->model->messageByDomain($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['domain'];
         $w->addElement($key, null);
         $w->addColumn($key, $this->i18n->get('sent'), $row['sent']);
         $w->addColumn($key, $this->i18n->get('opened'), $row['opened']);
         $w->addColumn($key, $this->i18n->get('clicked'), $row['clicked']);
     }
 }
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who bounced
      */
     $w->setTitle($this->i18n->get('Bounce ID'));
     $resultIterator = $this->model->fetchMessageBounces($start, $limit);
     foreach ($resultIterator as $row) {
         $key = $row['bounce'];
         $w->addElement($key, new CommonPlugin_PageURL('bounce', array('s' => 0, 'id' => $row['bounce'])));
         $w->addColumn($key, 'email', $row['email'], new CommonPlugin_PageURL('userhistory', array('id' => $row['user']), 'left'));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
     }
 }
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who have forwarded the message
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultSet = $this->model->fetchMessageForwards($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['email'];
         $w->addElement($key, new CommonPlugin_PageURL('userhistory', array('id' => $row['id'])));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
         $w->addColumn($key, $this->i18n->get('count'), $row['count'], null, 'left');
     }
 }
Exemplo n.º 5
0
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with list details
      */
     $w->setTitle($this->i18n->get('Lists'));
     $resultIterator = $this->model->fetchLists($start, $limit);
     $rows = iterator_to_array($resultIterator);
     if (!($start == 0 && $limit == 1)) {
         $rows[] = array('id' => '', 'name' => $this->i18n->get('All lists'), 'description' => '', 'active' => '', 'count' => '');
     }
     foreach ($rows as $row) {
         $key = "{$row['id']} | {$row['name']}";
         $latest = $this->model->latestMessage($row['id']);
         $w->addElement($key, $latest ? new CommonPlugin_PageURL(null, array('type' => 'messages', 'listid' => $row['id'])) : '');
         $w->addColumn($key, $this->i18n->get('active'), $row['active']);
         $w->addColumn($key, $this->i18n->get('total sent'), $row['count']);
         $w->addColumn($key, $this->i18n->get('latest'), $latest, $latest ? new CommonPlugin_PageURL(null, array('type' => 'opened', 'listid' => $row['id'], 'msgid' => $latest)) : '');
     }
 }
Exemplo n.º 6
0
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with link details
      */
     $w->setTitle($this->i18n->get('Link URL'));
     $resultSet = $this->model->links($start, $limit);
     $query = array('listid' => $this->model->listid, 'msgid' => $this->model->msgid, 'type' => 'linkclicks');
     foreach ($resultSet as $row) {
         $key = preg_replace('%^(http|https)://%i', '', $row['url']);
         if (strlen($key) > 39) {
             $key = htmlspecialchars(substr($key, 0, 22)) . ' ... ' . htmlspecialchars(substr($key, -12));
         }
         $key = sprintf('<span title="%s">%s</span>', htmlspecialchars($row['url']), $key);
         $query['forwardid'] = $row['forwardid'];
         $w->addElement($key, new CommonPlugin_PageURL(null, $query));
         $w->addColumnHtml($key, $this->i18n->get('pers.'), $row['personalise'] ? new CommonPlugin_ImageTag('user.png', 'URL is personalised') : '');
         $w->addColumn($key, $this->i18n->get('clicks'), $row['numclicks']);
         $w->addColumn($key, $this->i18n->get('users'), $row['usersclicked'] > 0 ? sprintf('%d (%0.2f%%)', $row['usersclicked'], $row['usersclicked'] / $row['totalsent'] * 100) : '');
         $w->addColumn($key, $this->i18n->get('firstclick'), $row['firstclick']);
         $w->addColumn($key, $this->i18n->get('latestclick'), $row['numclicks'] > 1 ? $row['latestclick'] : '');
     }
 }
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populate the webbler list with users who have clicked a link in the message
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultSet = $this->model->fetchMessageClicks($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['email'];
         if ($key) {
             $w->addElement($key, new CommonPlugin_PageURL('userhistory', array('id' => $row['userid'])));
             foreach ($this->model->selectedAttrs as $attr) {
                 $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
             }
             $w->addColumn($key, $this->i18n->get('links clicked'), $row['links'], new CommonPlugin_PageURL('userclicks', array('userid' => $row['userid'], 'msgid' => $this->model->msgid)), 'left');
         } else {
             $key = $this->i18n->get('user_not_exist');
             $w->addElement($key, '');
             $w->addColumn($key, $this->i18n->get('links clicked'), $row['links']);
         }
         $w->addColumn($key, $this->i18n->get('clicks_total'), $row['clicks']);
     }
 }
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with message details
      */
     global $wkhtmltopdfOptions;
     $w->setTitle($this->i18n->get('Campaigns'));
     $rows = iterator_to_array($this->model->fetchMessages(false, $start, $limit));
     $this->messageResults = array_reverse($rows);
     $query = array('listid' => $this->model->listid, 'type' => 'opened');
     foreach ($rows as $row) {
         $fields = $this->messageStats($row);
         $query['msgid'] = $fields['id'];
         $key = "{$fields['id']} | {$fields['subject']}";
         $w->addElement($key, new CommonPlugin_PageURL(null, $query));
         $w->addColumn($key, $this->i18n->get('date'), $fields['datesent']);
         $w->addColumn($key, $this->i18n->get('sent'), $fields['sent'], '');
         $w->addColumn($key, $this->i18n->get('opened'), "{$fields['openrate']}% ({$fields['opens']})");
         $w->addColumnHtml($key, $this->i18n->get('clicked'), $fields['clickUsers'] > 0 ? "{$fields['clickrate']}%&nbsp;({$fields['clickUsers']}) |&nbsp;{$fields['totalClicks']} |&nbsp;{$fields['clickopenrate']}%" : '0');
         $w->addColumn($key, $this->i18n->get('bounced'), $fields['bouncecount'] > 0 ? "{$fields['bouncerate']}% ({$fields['bouncecount']})" : '0');
         $w->addColumn($key, $this->i18n->get('views'), "{$fields['viewed']} ({$fields['avgviews']})");
         if (isset($wkhtmltopdfOptions) && is_executable($wkhtmltopdfOptions['bin'])) {
             $w->addColumnHtml($key, $this->i18n->get('print'), new CommonPlugin_ImageTag('doc_pdf.png', $this->i18n->get('print to PDF')), new CommonPlugin_PageURL(null, array('listid' => $this->model->listid, 'action' => 'print', 'msgid' => $fields['id'])));
         }
     }
 }
 public function populate(WebblerListing $w, $start, $limit)
 {
     /*
      * Populates the webbler list with link click details
      */
     $w->setTitle($this->i18n->get('User email'));
     $resultSet = $this->model->linkClicks($start, $limit);
     foreach ($resultSet as $row) {
         $key = $row['email'];
         $w->addElement($key, new CommonPlugin_PageURL('userhistory', array('id' => $row['id'])));
         foreach ($this->model->selectedAttrs as $attr) {
             $w->addColumn($key, $this->model->attributes[$attr]['name'], $row["attr{$attr}"]);
         }
         $w->addColumn($key, $this->i18n->get('clicks'), $row['clicked']);
         $w->addColumn($key, $this->i18n->get('firstclick'), $row['firstclick']);
         $w->addColumn($key, $this->i18n->get('latestclick'), $row['clicked'] > 1 ? $row['latestclick'] : '');
     }
 }