Esempio n. 1
0
// Tracks
if ($profile->getID() != $_SESSION['member_id']){
	$profile->addVisitor($_SESSION['member_id']);
}

// Privacy Controller
$pc = new PrivacyController();
$privacy_obj = $pc->getPrivacyObject($id);
if ($privacy_obj==null){
	//no such person
	//add error and redirect back to is own page?
//	header('Location: sprofile.php');
//	exit;	
} else {
	$relationship = $pc->getRelationship($id);
	$profile_prefs = $privacy_obj->getProfile();
}

// Delete activities
if (isset($_GET['delete'])){
	$id = intval($_GET['delete']);
	if ($id > 0){
		if ($act_obj->deleteActivity($id)){
			$msg->addFeedBack('ACTIVITY_DELETED');
		} else {
			$msg->addError('ACTIVITY_DELETE_FAILED');
		}
		header('Location: '.url_rewrite(AT_SOCIAL_BASENAME.'sprofile.php', AT_PRETTY_URL_HEADER));
		exit;
	}
Esempio n. 2
0
	</div>
</div>
<div>
	<div class="headingbox"><h3><?php 
echo _AT('search_results');
?>
</h3></div>
	<div class="contentbox">
	<?php 
if (!empty($this->friends)) {
    $privacy_controller = new PrivacyController();
    echo "<h4>" . _AT('there_are_entries', sizeof($this->friends)) . "</h4>";
    foreach ($this->friends as $id => $person) {
        $privacy_obj = $privacy_controller->getPrivacyObject($id);
        //			debug($privacy_obj->getSearch(), 'search'.$id);
        $relationship = $privacy_controller->getRelationship($id);
        if ((!isset($person['added']) || $person['added'] != 1) && !PrivacyController::validatePrivacy(AT_SOCIAL_SEARCH_VISIBILITY, $relationship, $privacy_obj->getSearch())) {
            //if this user doesn't want to be searched.
            continue;
        }
        ?>
	<div class="contact_mini" >
		<div>
			<div ><?php 
        echo printSocialProfileImg($id);
        ?>
</div>
			<div>
				<?php 
        $member_obj = new Member($id);
        $profile = $member_obj->getAddress();