-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
51 lines (41 loc) · 1.53 KB
/
Copy pathprofile.php
File metadata and controls
51 lines (41 loc) · 1.53 KB
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
<?php
include("vendor/autoload.php");
use Helpers\Auth;
$user = Auth::check();
?>
<!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">
<title>Profile</title>
<link rel="stylesheet" href="css\bootstrap.min.css">
</head>
<body>
<div class="container mt-4" style="width: 600px">
<h1 class="h4 mb-4">Profile</h1>
<?php if(isset($_GET['error'])): ?>
<div class="alert alert-warning">
Cannot upload file
</div>
<?php endif ?>
<?php if($user->photo): ?>
<img src="_actions/photos/<?= $user->photo?>" class="photo-thumb" width="200">
<?php endif ?>
<form action="_actions/upload.php" method="post" enctype="multipart/form-data" class="input-group my-4">
<input type="file" name="photo" class="form-control">
<button class="btn btn-secondary">Upload</button>
</form>
<ul class="list-group">
<li class="list-group-item">Name: <?= $user->name ?></li>
<li class="list-group-item">Email: <?= $user->email ?></li>
<li class="list-group-item">Phone: <?= $user->phone ?></li>
<li class="list-group-item">Address: <?= $user->address ?></li>
</ul>
<br>
<a href="admin.php" class="mx-4">Manage Users</a>
<a href="_actions/logout.php" class="text-danger">Logout</a>
</div>
</body>
</html>