forked from BlackElias/needit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
144 lines (106 loc) · 4.71 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
include_once("bootstrap.php");
$conn = Db::getConnection();
try {
$user = new User();
$currentUserId = $_SESSION["userId"];
$currentUser = $user->getUserInfo($currentUserId);
if (!empty($_POST)) {
// picture upload
if (!empty($_FILES["profilePicture"]["name"])) {
$profilePicture = $user->uploadProfilePicture($_FILES["profilePicture"]["name"]);
$user->setPicture($profilePicture);
} // User updates
$user->updateInfo($currentUser['id']);
$currentUser = $user->getUserInfo($currentUserId); //---Updated User Fetch---
};
} catch (\Throwable $th) {
$error = $th->getMessage();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="https://use.typekit.net/hay5vbn.css">
<title>Document</title>
</head>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light " style="background-color: white; box-shadow: 0px 3px 3px black; font-family: futura-pt, sans-serif;font-weight: 700;">
<!-- Navbar brand -->
<img class="logo" src="img/logo.png" alt="logo" style="margin-left: 10px;">
<div class="center" style=" ">
<form class="form-inline ">
<div class="md-form my-0 ">
<input class="form-control mr-sm-2 searchbar " style="width: 150%; " type="text" placeholder="Zoek" aria-label="Search">
</div>
</form>
</div>
<!-- Collapse button -->
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#basicExampleNav" aria-controls="basicExampleNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="basicExampleNav" style="margin-left: 25%;">
<!-- Links -->
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link waves-effect waves-light" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect waves-light" href="choose-article.php">verzoek/toevoegen</a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect waves-light" href="profile.php">profiel</a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect waves-light" href="#">Krediet: 10</a>
</li>
</ul>
</div>
<!-- Links -->
</nav>
<!-- Navbar -->
<body style="background-color: #F9F7F7;">
<div class="filter">
<div class="row" style="--bs-gutter-x: 0rem;">
<div class="bg-image p-3 text-center shadow-1-strong col-md text-white flex-item-left" style="
background-size: 110%; height: 90vh; flex: 1 1 0%;">
<div class="mb-3 image-upload">
<h1 class="title-add">Selecteer uw profiel foto</h1>
<label for="postImage" class="form-label">Image</label>
<form> <input type="file" class="form-control form-border" name="image" id="postImage" />
<button class="article-button btn-product" type="submit" id="">verander foto</button></form>
</div>
</div>
<div class="col-md col-mobile">
<div>
<label class="title-add" for=""><?php echo htmlspecialchars($currentUser["firstname"]) . " " . htmlspecialchars($currentUser["lastname"]) ?></label>
</div>
<div class="col-md col-mobile">
<div>
<label class="title-add" for="">Geleende producten</label>
</div>
<div>
<p class="title-add" for="" id="description">naam product</p>
<a href=""> <button class="article-button btn-product" type="submit" id="">Zie product</button></a>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
<footer class="footer bg-light text-center text-lg-start">
<!-- Copyright -->
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0); box-shadow: 0px 0px 6px grey;">
© 2020 Copyright:
<a class="text-dark" href="https://mdbootstrap.com/">MDBootstrap.com</a>
</div>
<!-- Copyright -->
</footer>
</html>