public static function viewUpdate()
 {
     self::check_logged_in();
     $user = self::get_user_logged_in();
     $attributes = array('username' => $user->username, 'password' => $user->password, 'password_confirm' => $user->password_confirm, 'first_name' => $user->first_name, 'sure_name' => $user->sure_name, 'email' => $user->email);
     $attributes['friends'] = User::friends($_SESSION['user']);
     $users = User::all_usernames();
     View::make('user/updateUser.html', array('attributes' => $attributes, 'users' => $users));
 }
Beispiel #2
0
</p>
						<p class="about"><?php 
if ($display['gender'] && !empty($profile->data()->gender)) {
    echo "<span class=\"about\">{$profileGender}</span>";
}
?>
</p>
					</div>
					<div id="friends" class="panel">
						<h3 class="subtitle">Friends</h3>
						<?php 
if ($display['friends']) {
    ?>
							<?php 
    if ($profile->getFriends()) {
        $friends = $profile->friends();
        ?>
								<?php 
        foreach (array_slice($friends, 0, 9) as $friend) {
            $friendName = $friend->firstName . ' ' . $friend->middleName . ' ' . $friend->lastName;
            ?>
									<div class="friend">
										<div class="friend-picture">
											<a href="profile.php?user=<?php 
            echo $friend->username;
            ?>
"><img src="<?php 
            echo $friend->profilePicture;
            ?>
"></a>
										</div>
								<td>
									<input type="hidden" name="token" value="<?php 
echo Token::generate();
?>
">
								</td>
							</tr>
						</table>
					</form>
				</div>
				<h3 class="subtitle"></h3>
				<div id="friends">
					<div id="all-friends">
						<?php 
if ($user->getFriends()) {
    $friends = $user->friends();
    ?>
							<?php 
    foreach ($friends as $friend) {
        $friendName = $friend->firstName . ' ' . $friend->middleName . ' ' . $friend->lastName;
        ?>
								<div class="friend">
									<div class="friend-picture">
										<a href="profile.php?user=<?php 
        echo $friend->username;
        ?>
"><img src="<?php 
        echo $friend->profilePicture;
        ?>
"></a>
									</div>