[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/options/tracking/metaboxes/mail/ -> m005.php (source)

   1  <?php
   2  class MP_Tracking_metabox_m005 extends MP_tracking_metabox_sysinfo_
   3  {
   4      var $id    = 'm005';
   5      var $context= 'normal';
   6      var $file     = __FILE__;
   7  
   8      var $item_id = 'mail_id';
   9  
  10  	function extended_meta_box($tracks)
  11      {
  12          $total = 0;
  13          foreach($tracks as $track)
  14          {
  15              $agent[$track->agent] = $track->count;
  16              $total += $track->count;
  17          }
  18          foreach($agent as $k => $v)
  19          {
  20              $os      = apply_filters('MailPress_tracking_useragents_os_get_info',      $k);
  21              $browser = apply_filters('MailPress_tracking_useragents_browser_get_info', $k);
  22              $key = $os . '</td><td>' . $browser;
  23              if (isset($agents[$key]))     $agents[$key] += $v;
  24              else                     $agents[$key]  = $v;
  25          }
  26          arsort($agents);
  27          echo '<table width="100%">';
  28          foreach($agents as $k => $v)
  29          {
  30              echo '<tr><td>' . $k . '</td><td class="num">' . sprintf("%01.2f %%",100 * $v/$total ) . '</td></tr>';
  31          }
  32          echo '</table>';
  33      }
  34  }
  35  new MP_Tracking_metabox_m005(__('System info', MP_TXTDOM));


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1