Location: PHPKode > projects > ProjectPress > projectpress/projects/project_members.php
<?php 
/**
 * ProjectPress list of members subscribed to a project
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();

define('access',true);

include(dirname(dirname(__FILE__)) . '/config.inc.php');
include(PM_DIR . 'pm-includes/global.inc.php');
require(PM_DIR . 'pm-includes/functions.php');
include(PM_DIR . 'pm-includes/header.php');

// Checks if user is logged in; if not redirect to login page.
if($current_user->hasPermission('access_site') != true) { pm_redirect(PM_URI . '/index.php'); }

// Enable for error checking and troubleshooting.
# display_errors();

?>

				<div id="page-title">
					<img src="<?php echo PM_URI; ?>/images/groups.png" alt="" /><h1>Project Members</h1>
				</div>
				<div id="tabs">
					<ul>
						<li <?php if (basename($_SERVER["REQUEST_URI"]) == "project.php?p_id=".$_GET['p_id']) echo "class='active_link'";?>>
							<a href="<?php echo PM_URI ?>/projects/project.php?p_id=<?php echo $_GET['p_id']; ?>"><span>Project</span></a>
						</li>
						<li <?php if (basename($_SERVER["REQUEST_URI"]) == "discussions.php?p_id=".$_GET['p_id']) echo "class='active_link'";?>
							<?php if (basename($_SERVER["REQUEST_URI"]) == "add_ptopic.php?p_id=".$_GET['p_id']) echo "class='active_link'";?>>
							<a href="<?php echo PM_URI ?>/projects/forum/discussions.php?p_id=<?php echo $_GET['p_id']; ?>"><span>Forum</span></a>
						</li>
						<li <?php if (basename($_SERVER["REQUEST_URI"]) == "contact.php?p_id=".$_GET['p_id']) echo "class='active_link'";?>>
							<a href="<?php echo PM_URI ?>/projects/contact.php?p_id=<?php echo $_GET['p_id']; ?>"><span>Email</span></a>
						</li>
						<li <?php if (basename($_SERVER["REQUEST_URI"]) == "project_members.php?p_id=".$_GET['p_id']) echo "class='active_link'";?>>
							<a href="<?php echo PM_URI ?>/projects/project_members.php?p_id=<?php echo $_GET['p_id']; ?>"><span>Members</span></a>
						</li>
					</ul>
				</div>

				<div id="middle">
				<div id="group-directory">
						<table cellpadding="0" cellspacing="0" border="0" align="center">
							<th>Avatar</th>
							<th>Username</th>
							<th>Name</th>
							<th>Email</th>

<?php
$query = "SELECT * FROM ".DB."project_members, ".DB."members WHERE pm_user = username AND pp_id = '".$_GET['p_id']."' ORDER BY last_name ASC";
$result = pmdb::connect()->query($query);

if($result->num_rows > 0) {
        while($row = $result->fetch_object()) {
        		echo "<tr><td>";
        		echo get_user_avatar($row->username,$row->email);
        		echo "</td> <td><a href=".PM_URI."/profile/profile.php?username={$row->username}>{$row->username}</a></td> <td>{$row->first_name} {$row->last_name}</td> <td>".clickable_link($row->email)."</td></tr>";
        }
} else {
echo "<tr><td>There are no members in this group.</td></tr>";
}
?>
						</table>
				</div>
				</div>


<?php

include(PM_DIR . 'pm-includes/footer.php');
Return current item: ProjectPress