-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
103 lines (99 loc) · 2.63 KB
/
home.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
<?php
include('includes/Database.php');
require 'config.php';
if(!isset($_SESSION['login_id'])){
header('Location: login.php');
exit;
}
$id = $_SESSION['login_id'];
$get_user = mysqli_query($db_connection, "SELECT * FROM `users` WHERE `phonenumbers`='$id'");
if(mysqli_num_rows($get_user) > 0){
$user = mysqli_fetch_assoc($get_user);
}
else{
header('Location: logout.php');
exit;
}
?>
<!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><?php echo $user['name']; ?> - LaravelTuts</title>
<style>
*,
*::before,
*::after {
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
body{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f7f7ff;
padding: 10px;
margin: 0;
}
._container{
max-width: 400px;
background-color: #ffffff;
padding: 20px;
margin: 0 auto;
border: 1px solid #cccccc;
border-radius: 2px;
}
.heading{
text-align: center;
color: #4d4d4d;
text-transform: uppercase;
}
._img{
overflow: hidden;
width: 100px;
height: 100px;
margin: 0 auto;
border-radius: 50%;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
._img > img{
width: 100px;
min-height: 100px;
}
._info{
text-align: center;
}
._info h1{
margin:10px 0;
text-transform: capitalize;
}
._info p{
color: #555555;
}
._info a{
display: inline-block;
background-color: #E53E3E;
color: #fff;
text-decoration: none;
padding:5px 10px;
border-radius: 2px;
border: 1px solid rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<div class="_container">
<h2 class="heading">My Account</h2>
</div>
<div class="_container">
<div class="_img">
<img src="<?php echo $user['profile_image']; ?>" alt="<?php echo $user['name']; ?>">
</div>
<div class="_info">
<h1><?php echo $user['name']; ?></h1>
<p><?php echo $user['email']; ?></p>
<a href="logout.php">Logout</a>
</div>
</div>
</body>
</html>