-
Notifications
You must be signed in to change notification settings - Fork 1
/
profile.php
65 lines (54 loc) · 1.72 KB
/
profile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
require_once './management/main.php';
if (isset($_SESSION['user'])) {
$user = $_SESSION['user'];
$name = $user->getFname() . " " . $user->getLname();
$email = $user->getEmail();
if (isset($_POST['friendProfile'])) {
$profileEmail = $_POST['friendProfile'];
$user = new User();
$user->setEmail($profileEmail);
$found = $user->find($connection);
if ($found) {
$name = $user->getFname() . " " . $user->getLname();
$email = $user->getEmail();
}
}
} else {
header("Location: $loginPage");
}
// if (isset($_SESSION['friend'])) {
// unset($_SESSION['friend']);
// }
// if (!isset($_SESSION['user'])) {
// }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="./styles/profile.min.css">
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="./assets/favicon.ico">
<script src="./functions/profile.js" defer></script>
</head>
<body>
<div class="profile-wrapper">
<div class="overlay"></div>
<!-- SEARCHBAR -->
<?php include './components/profile/search-bar.php'?>
<!-- HEADER -->
<?php include './components/profile/header.php'?>
<main>
<!-- FRIENDS -->
<?php include './components/profile/friends.php'?>
<!-- POSTS -->
<?php include './components/profile/posts.php'?>
</main>
<?php include "./components/profile/message-list.php"?>
</div>
</body>
</html>