This repository was archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuserinfo.php
More file actions
70 lines (56 loc) · 1.9 KB
/
userinfo.php
File metadata and controls
70 lines (56 loc) · 1.9 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
session_start();
include('functions.php');
empty($_GET['user_id']) ? header('location: list.php') : $encode_user_id = $_SESSION['info_user_id'][$_GET['user_id']];
$user_id = intval($encode_user_id);
if (isset($_GET['user_id'])) {
if (isLoggedIn()) {
$query = "SELECT * FROM users WHERE id=" . $user_id;
$result = mysqli_query($conn, $query);
$data = mysqli_fetch_assoc($result);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>User Info</title>
<link rel="stylesheet" href="public/css/bootstrap.min.css">
<link rel="stylesheet" href="public/css/font-awesome.min.css">
<link rel="stylesheet" href="public/css/styles.css">
<style>
/* .header {
background: #003366;
}
button[name=register_btn] {
background: #003366;
} */
</style>
</head>
<body>
<div class="container">
<div class="header">
<h2>USER INFO</h2>
</div>
<div class="content">
<!-- logged in user information -->
<div class="profile_info" style="font-size: 1.4em;">
<img src="public/images/admin_profile.png">
<div>
<strong><?php echo $data['username']; ?></strong>
<small>
<i style="color: #888;">(<?php echo ucfirst($data['user_type']); ?>)</i>
<br>
UserName: <?php echo $data['username']; ?><br>
FullName: <?php echo $data['fullname']; ?><br>
Email : <?php echo $data['email']; ?><br>
</small>
</div>
</div>
<div class="back" style="text-align: center; padding-top: 10px;">
<button type="button" class="btn btn-info" onClick="javascript:history.go(-1)">Back</button>
</div>
</div>
</div>
</body>
</html>