[ Index ]

MailPress 7.1

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

title

Body

[close]

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

   1  <?php
   2  class MP_Tracking_metabox_m001 extends MP_tracking_metabox_
   3  {
   4      var $id    = 'm001';
   5      var $context= 'normal';
   6      var $file     = __FILE__;
   7  
   8  	function meta_box( $mail )
   9      {
  10          global $wpdb;
  11          $tracks = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->mp_tracks WHERE mail_id = %d ORDER BY tmstp DESC LIMIT 10;", $mail->id ) );
  12          if ( $tracks ) 
  13          {
  14              $out = '<table>';
  15              foreach( $tracks as $track ) 
  16              {
  17                  $tracking_url = esc_url( MP_::url( MailPress_tracking_u, array( 'id' => $track->user_id ) ) );
  18                  $action = '<a href="' . $tracking_url . '" target="_blank" title="' . esc_attr( __( 'See tracking results', 'MailPress' ) ) . '">' . MP_User::get_email( $track->user_id ) . '</a>';
  19                  $out .= '<tr><td><abbr title="' . esc_attr( $track->tmstp ) . '">' . substr( $track->tmstp, 0, 10 ) . '</abbr></td><td>&#160;' . $action . '</td><td>&#160;' . MailPress_tracking::translate_track( $track->track, $track->mail_id ) . '</td></tr>';
  20              }
  21              $out .= '</table>';
  22  
  23              echo $out;
  24          }
  25      }
  26  }
  27  new MP_Tracking_metabox_m001( __( 'Last 10 actions', 'MailPress' ) );


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