[ Index ]

MailPress 544

[ 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_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', MP_TXTDOM), __('Mails sent', MP_TXTDOM), $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', MP_TXTDOM), __('Active subscribers', MP_TXTDOM), $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', MP_TXTDOM),"<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                          <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick" /><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHLwYJKoZIhvcNAQcEoIIHIDCCBxwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAcDHC7s1oHkGbDrzpD/0p5LV7wn6+MxkkGcA++TAlnmRgokbVW4DdscOFfnTPCYl0jqSS7NkYwT35UQBUNVygkRy5xwTZJDtZCqpZf4pmeSMKi1gwNzt83PhEsoVqWKLDN4EYQPs26TXytH2ASmSjHo3xwcXl0SQK8/ASi1CCtRzELMAkGBSsOAwIaBQAwgawGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIVfM9DQYPN4uAgYiqDDojfQYW4Aji2OzOemlzVXelJqjBzowMdnWQjZHWvSvjBbSi7lDgVgsqQoniZulSdCUIy1s8o5ikVNs18bLMq2zdr4z3/B8f8fKWh6Q07IA39rKOg4WMl50No9qZr8kSWk5nVTdL8Fw19k0EfnLsXYH+Q4GvvMbxecz7Nj5MDdJK3mz9hysroIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEF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gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTEwODA4MTQzNjQ3WjAjBgkqhkiG9w0BCQQxFgQUy94gTQXbcFxhOAXCwuda78s29N4wDQYJKoZIhvcNAQEBBQAEgYBmil057NAHbTUidyZO635F0jOVQ9xlbLcsYr9COb1vyGkkRW8JIE+lnlDycfhBwjjKC2/1qK0DDYQ2C4iX1OqYuZMKGWdI8pSzz0nQvIqZ82UmOVu+a1W7D+b6QtxXIhi2D4zqI3wa/DlTj5drJVozetlipkTfsFYmjhF6FCzN2A==-----END PKCS7-----" /><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" /><img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" /></form>
  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>.', MP_TXTDOM), $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'", MP_TXTDOM ));


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