Example #1
0
		<title>Privacy Settings</title>
		<link rel="stylesheet" href="css/style.css">
	</head>
	<body>
		<?php 
include 'includes/header.php';
?>
		<div id="main-wrapper" class="wrapper">
			<div id="sidebar" class="left"></div>
			<div id="main-container" class="page">
				<h2 class="title">Privacy Settings</h2>
				<?php 
include 'includes/alerts.php';
?>
				<?php 
$privacy = $user->getPrivacy();
?>
				<form action="" method="post">
					<table>
						<tr>
							<td>
								<label class="textfield" for="profile-picture">Profile Picture:</label>
							</td>
							<td>
								<select id="profile-picture" name="profile-picture">
									<option value="p" <?php 
if ($privacy->profilePicture === 'p') {
    echo 'selected';
}
?>
>Public</option>
Example #2
0
        Redirect::to(404);
    }
}
$profileName = $profile->data()->firstName . ' ' . $profile->data()->middleName . ' ' . $profile->data()->lastName;
$birthdayBefore = new DateTime($profile->data()->birthday);
$profileBirthday = $birthdayBefore->format('F j, Y');
if ($profile->data()->gender === 'm') {
    $profileGender = 'Male';
} else {
    if ($profile->data()->gender === 'f') {
        $profileGender = 'Female';
    }
}
// 0 = false/don't display
// 1 = true/display
$privacy = $profile->getPrivacy();
foreach ($privacy as $key => $value) {
    switch ($value) {
        case 'p':
            $display[$key] = 1;
            break;
        case 'f':
            if ($user->isLoggedIn()) {
                if ($profile->isFriend($user->data()->id) || $profile->data()->id === $user->data()->id) {
                    $display[$key] = 1;
                    break;
                }
            }
            $display[$key] = 0;
            break;
        case 'm':