[ Index ]

MailPress 7.1

[ 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  
  28          $out = '<table>';
  29          foreach( $agents as $k => $v )
  30          {
  31              $out .= '<tr><td>' . $k . '</td><td class="num">' . sprintf( "%01.2f %%",100 * $v/$total ) . '</td></tr>';
  32          }
  33          $out .= '</table>';
  34  
  35          echo $out;
  36      }
  37  }
  38  new MP_Tracking_metabox_m005( __( 'System info', 'MailPress' ) );


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1