Example #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 ';
Example #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>
Example #3
0
<?php if ( gf_has_topic_posts() ) : ?>

	<form action="<?php gf_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form">

		<div id="topic-meta">
			<h3><?php gf_the_topic_title() ?> (<?php gf_the_topic_total_post_count() ?>)</h3>
                        <a class="button" href="<?php gf_forum_permalink() ?>/">&larr; <?php _e( 'Back to Forum', 'gf' ) ?></a> &nbsp; <a class="button" href="<?php echo gf_get_current_topic_permalink() ?>/"><?php _e( 'Cancel', 'gf') ?></a></span>

			<?php if ( gf_current_user_can_admin() || gf_current_user_can_mod() || gf_get_the_topic_is_mine() ) : ?>
				<div class="admin-links"><?php gf_the_topic_admin_links() ?></div>
			<?php endif; ?>
		</div>

		

			<?php if ( gf_is_edit_topic() ) : ?>

				<div id="edit-topic">

					<?php do_action( 'gf_before_edit_forum_topic' ) ?>

					<p><strong><?php _e( 'Edit Topic:', 'gf' ) ?></strong></p>

					<label for="topic_title"><?php _e( 'Title:', 'gf' ) ?></label>
					<input type="text" name="topic_title" id="topic_title" value="<?php gf_the_topic_title() ?>" />

					<label for="topic_text"><?php _e( 'Content:', 'gf' ) ?></label>
					<textarea name="topic_text" id="topic_text"><?php gf_the_topic_text() ?></textarea>

					<?php do_action( 'gf_after_edit_forum_topic' ) ?>
Example #4
0
<?php get_header() ?>

	<div id="content">
            <?php do_action("template_notices");?>
		<div class="padder">
                    <h3><?php _e( 'Forums', 'gf' ) ?></h3>
			<?php gf_forums_search_form();?>
			<br class="clear" />
			<div class="forum-header-links">
				<ul>
                                    <li <?php if ( gf_is_front()&&!gf_is_view('favorites')&&!gf_is_my_topics()) : ?> class="selected"<?php endif; ?> ><a href="<?php echo gf_get_home_url() ?>"><?php _e("Forums","gf");?></a></li>

					<?php if ( is_user_logged_in() && gf_current_user_can_admin()) : ?>
						<li <?php if(gf_is_admin()):?> class="selected" <?php endif;?> ><a href="<?php echo gf_get_admin_link(); ?>"><?php _e("Admin","gf"); ?></a></li>
					<?php endif; ?>
                                         <?php if ( is_user_logged_in() ) : ?>
                                                <li <?php if(gf_is_my_topics()):?> class="selected" <?php endif;?> ><a href="<?php echo gf_get_my_topics_link(); ?>"><?php _e("My Topics","gf"); ?></a></li>
					<?php endif; ?>
                                                <?php if ( is_user_logged_in() ) : ?>
                                                <li <?php if(gf_is_view("favorites")):?> class="selected" <?php endif;?> ><a href="<?php echo gf_get_my_favorites_link(); ?>"><?php _e("My Favorites","gf"); ?></a></li>
					<?php endif; ?>
				</ul>
			</div>
			<br class="clear" />
				
			<div id="forums-content" class="forums">
				<?php 
			if(gf_is_forum_admin())
				locate_template(array("gf/admin/home.php"),true);
			else if(gf_is_forum_topic_edit())
				locate_template(array("gf/topic-edit.php"),true);