summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-09-07 13:08:26 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-09-07 13:08:26 +0000
commit2369a4cb030b56d49c5050823b1ecb0c44b5ccbb (patch)
treec9523b438ee5947e637be3e7e898b5883db1afd0
parent78ccea48f24cf4c7688c806c12c85c9760cd3e64 (diff)
downloadwordpress-mu-2369a4cb030b56d49c5050823b1ecb0c44b5ccbb.tar.gz
wordpress-mu-2369a4cb030b56d49c5050823b1ecb0c44b5ccbb.tar.xz
wordpress-mu-2369a4cb030b56d49c5050823b1ecb0c44b5ccbb.zip
Added invite stats
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@303 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-content/mu-plugins/invites.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/wp-inst/wp-content/mu-plugins/invites.php b/wp-inst/wp-content/mu-plugins/invites.php
index 73f3919..b3a315e 100644
--- a/wp-inst/wp-content/mu-plugins/invites.php
+++ b/wp-inst/wp-content/mu-plugins/invites.php
@@ -206,6 +206,21 @@ function invites_admin_content() {
</table>
</form>
</div>
+ <div class='wrap'>
+ <h2>Invite Stats</h2>
+ <ul>
+ <li> Free Invites: <?php echo $wpdb->get_var( "SELECT sum( meta_value ) FROM $wpdb->usermeta WHERE meta_key = 'invites_left'" ); ?></li>
+ <li> <?php echo $wpdb->get_var( "SELECT count(*) FROM $wpdb->usermeta WHERE meta_key LIKE '%invited_by'" ) ?> Invites sent, of which <?php echo $wpdb->get_var( "SELECT count(*) FROM $wpdb->usermeta WHERE meta_key='invite'" ); ?> are pending and have not been used yet.</li>
+ <li> Invites Per User:<ul>
+ <?php $invite_groups = $wpdb->get_results( "SELECT count(*) as c, meta_value FROM `wp_usermeta` WHERE `meta_key` = 'invites_left' group by meta_value", ARRAY_A );
+ while( list( $key, $val ) = each( $invite_groups ) )
+ {
+ print "<li> {$val[ 'c' ]} users have {$val[ 'meta_value' ]} invites.</li>";
+ }
+ ?>
+ </ul></li>
+ </ul>
+ </div>
<?php
}
if( get_usermeta( get_current_user_id(), 'invites_left' ) )