[ Index ]

MailPress 7.1

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

title

Body

[close]

/mp-includes/class/options/tracking/metaboxes/user/ -> u005.php (source)

   1  <?php
   2  class MP_Tracking_metabox_u005 extends MP_tracking_metabox_sysinfo_
   3  {
   4      var $id    = 'u005';
   5      var $context= 'side';
   6      var $file     = __FILE__;
   7  
   8      var $item_id = 'user_id';
   9      var $query = false;
  10  
  11  	function extended_meta_box( $mp_user )
  12      {
  13          global $wpdb;
  14          $tracks = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT agent, ip FROM $wpdb->mp_tracks WHERE user_id = %d LIMIT 10;", $mp_user->id ) );
  15          if ( empty( $tracks ) ) return;
  16  
  17          $out = '<table>';
  18          foreach( $tracks as $track ) 
  19          {
  20              $os      = apply_filters( 'MailPress_tracking_useragents_os_get_info',      $track->agent );
  21              $browser = apply_filters( 'MailPress_tracking_useragents_browser_get_info', $track->agent );
  22  //            $out .= $os . ' ' . $browser . '&#160;&#160;&#160;@&#160;' . $track->ip . '<br />'; 
  23              $out .= '<tr><td>' . $os . '</td><td>' . $browser . '</td><td class="num">' . $track->ip . '</td></tr>';
  24          }
  25          $out .= '</table>';
  26  
  27          echo $out;
  28      }
  29  }
  30  new MP_Tracking_metabox_u005( __( 'System info', 'MailPress' ) );


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