[ Index ]

MailPress 7.2

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

title

Body

[close]

/mp-includes/class/options/dashboard/widgets/ -> _right_now.php (source)

   1  <?php
   2  class MP_Dashboard__right_now extends MP_WP_Dashboard_widget_
   3  {
   4      var $id = 'mp__right_now';
   5  
   6  	function widget()
   7      {
   8          global $wpdb, $wp_locale;
   9  
  10          $countm = $wpdb->get_var( "SELECT sum( scount ) FROM $wpdb->mp_stats WHERE stype = 't';" );
  11          $counts = $wpdb->get_var( "SELECT count( * )    FROM $wpdb->mp_users WHERE status = 'active';" );
  12          if ( !$countm ) $countm = 0;
  13          if ( !$counts ) $counts = 0;
  14  
  15          $plugin_data = get_plugin_data( MP_ABSPATH . 'MailPress.php' );
  16          $plugin_version = $plugin_data['Version'];
  17  
  18          $th = new MP_Themes();
  19          $themes = $th->themes; 
  20          $ct = $th->current_theme_info(); 
  21  ?>
  22  <div id="dashboard_right_now">
  23  <div class="inside">
  24      <div class="table table_content">
  25          <table>
  26              <tr class="first">
  27                  <td class="first b b-posts">
  28  <?php     if ( current_user_can( 'MailPress_edit_mails' ) ) : ?>
  29                      <a href="<?php echo MailPress_mails; ?>"><?php echo $countm; ?></a>
  30  <?php     else : ?>
  31                      <?php echo $countm; ?>
  32  <?php     endif; ?>
  33                  </td>
  34                  <td class="t posts"><?php echo( _n( __( 'Mail sent', 'MailPress' ), __( 'Mails sent', 'MailPress' ), $countm ) ); ?></td>
  35              </tr>
  36          </table>
  37      </div>
  38      <div class="table table_discussion">
  39          <table>
  40              <tr class="first">
  41                  <td class="b b-comments">
  42  <?php     if ( current_user_can( 'MailPress_edit_users' ) ) : ?>
  43                      <a href="<?php echo MailPress_users; ?>"><?php echo $counts; ?></a>
  44  <?php     else : ?>
  45                      <?php echo $counts; ?>
  46  <?php     endif; ?>
  47                  </td>
  48                  <td class="last t approved"><?php echo( _n( __( 'Active subscriber', 'MailPress' ), __( 'Active subscribers', 'MailPress' ), $counts ) ); ?></td>
  49              </tr>
  50          </table>
  51      </div>
  52      <div class="versions">
  53          <p>
  54  <?php     
  55          $theme_title = ( current_user_can( 'MailPress_switch_themes' ) ) ? '<a href="' . MailPress_themes . '">' . $ct->title . '</a>' : $ct->title;
  56          printf( __( 'Theme %s', 'MailPress' ), '<span class="b">' . $theme_title . '</span>' );
  57  ?>
  58          </p>
  59      </div>
  60      <div style="float:right;">
  61          <table>
  62              <tr>
  63                  <td>
  64                      <span id="mp_paypal" style="float:right;padding:0;margin:0;">
  65                          <a href="https://paypal.me/arenaut" target="_blank"><img title="<?php echo esc_attr( __( 'Thank you :-) !', 'MailPress' ) ); ?>"  alt="<?php echo esc_attr( __( 'Thank you :-) !', 'MailPress' ) ); ?>" src="<?php echo site_url() . '/' . MP_PATH; ?>mp-includes/images/PP_M.png" /></a>
  66                      </span>
  67                  </td>
  68              </tr>
  69          </table>
  70      </div>
  71      <div>
  72          <table>
  73              <tr>
  74                  <td>
  75                      <?php printf( __( 'You are using <strong>MailPress %s</strong>.', 'MailPress' ), $plugin_version ); ?>
  76                  </td>
  77              </tr>
  78          </table>
  79      </div>
  80  </div>
  81  </div>
  82  <?php
  83      }
  84  }
  85  new MP_Dashboard__right_now( __( "MailPress - 'Right Now'", 'MailPress' ) );


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1