Location: PHPKode > projects > ProjectPress > projectpress/profile/profile.php
<?php 
/**
 * ProjectPress member's profile
 *
 * @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');

// User is logged in.
if($current_user->hasPermission('access_site') != true) { pm_redirect(PM_URI . '/index.php'); }

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

if(isset($_GET['username']) && !is_numeric($_GET['username'])) {
$username = $_GET['username']; // Is used when a user's profile if set to private or if a profile does not exist.

$query = "SELECT * FROM ". DB ."members WHERE username='".$_GET['username']."' AND active = '1'";
$result = pmdb::connect()->query($query);
$row = $result->fetch_object();

if($_GET['username'] == $row->username) {

if($row->privacy == 0 || $username == $_SESSION['username']) {

?>

				<div id="page-title">
					<img src="<?php echo PM_URI; ?>/images/user.png" alt="" /><h1><?php echo $row->first_name; ?> <?php echo $row->last_name; ?>'s Wall</h1>
				</div>
				<div id="tabs">
					<ul>
						<li <?php if (basename($_SERVER["REQUEST_URI"]) == "profile.php?username=".$_GET['username']) echo "class='active_link'";?>>
							<a href="<?php echo PM_URI ?>/profile/profile.php?username=<?php echo $_GET['username']; ?>"><span>Wall</span></a>
						</li>
						<?php if($_GET['username'] == $_SESSION['username']) { ?>
						<li <?php if (basename($_SERVER["REQUEST_URI"]) == "index.php?username=".$_GET['username']) echo "class='active_link'";?>>
							<a href="<?php echo PM_URI ?>/profile/notes/index.php?username=<?php echo $_GET['username']; ?>"><span>Notes</span></a>
						</li>
						<?php } ?>
					</ul>
				</div>
				
<?php
if($row->privacy == 1) {
echo '<div class="error">' . get_name($username) . ', your profile is private, and you are the only one who is able to view it.</div>';
}
?>

<?php if($_GET['username'] == $_SESSION['username']) { ?>
				<div id="wall-input" class="UIComposer_Box">
					<form action="" method="post">
					<fieldset>
					<textarea class="input" rows="2" cols="15" id="post" name="post"></textarea>
					<a id="shareButton" style="float:right" class="small button Detail"> Share</a>
					</fieldset>
					</form>
				</div>
<?php } ?>

				<div class="wall">
				<div id="posting" align="center">
						<?php include_once(PM_DIR . 'profile/posts.php');?>
				</div>
				</div> <!--Ends wall-->


<?php
		}
	}
}

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