Esempio n. 1
0
<div class="forums">
<?php if(gf_current_user_can_admin()):?>
	<?php
	//it is a copy paste/edit of wpmu-users.php, we will make it much better in next version
	include_once(ABSPATH.WPINC."/user.php");
	include_once(ABSPATH."wp-admin/includes/user.php");
    ?>
<div class="users">
	<?php
	$apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1;
	$num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) :5;
	$s = wp_specialchars( trim( $_GET[ 's' ] ) );
	$query = "SELECT * FROM {$wpdb->users} WHERE ";
        $where_sql=array();
	if( !empty( $s ) ) {
		$search = '%' . trim( $s ) . '%';
		$where_sql[]= " user_login LIKE '$search' OR user_email LIKE '$search'";
	}
      $where_sql[]="user_status=0";
      if(function_exists("is_multisite")&&is_multisite()||function_exists("add_new_user_to_blog"))
          $where_sql[]="spam=0 AND deleted=0";
      $where_sql=join(" AND ", $where_sql);
      $query.=$where_sql;
	if( !isset($_GET['sortby']) ) {
		$_GET['sortby'] = 'id';
	}
	if( $_GET['sortby'] == 'email' ) {
		$query .= ' ORDER BY user_email ';
	} elseif( $_GET['sortby'] == 'id' ) {
		$query .= ' ORDER BY ID ';
Esempio n. 2
0
<?php if ( gf_current_user_can_admin()||gf_current_user_can_mod() ) : ?>
<!-- mimick bbpress dashboard-->
<div class="admin">
<div class="dashboard" id="dashboard-right-now">
    <h3><?php _e("Right Now","gf");?></h3>
	<?php $forum=bb_get_forum(gf_get_root_forum_id());
	?>
	<div class="table">
            <table cellspacing="0" cellpadding="0">
		<thead>
                    <tr>
			<th>Totals</th>
			<th>Per Day</th>
                    </tr>
		</thead>
		<tbody>
                    <tr>
                        <td><a href="<?php echo gf_get_forum_manage_link();?>"><span> <?php echo gf_get_total_forums_count();?></span> <?php _e("forums","gf");?></a></td>
			<td>N/A</td>
                    </tr>
                    <tr>
			<td><span><?php echo gf_get_total_topic_count();?></span> topics</td>
			<td><span>N/A</span> </td>
                    </tr>
                    <tr>
                        <td><span><?php echo gf_get_total_posts_count();?></span> posts</td>
                        <td><span>N/A</span> </td>
                    </tr>
                    <tr>
                        <td><span><?php echo gf_get_total_tags();?></span> tags</td>