-
Notifications
You must be signed in to change notification settings - Fork 0
/
users.php
50 lines (46 loc) · 1.65 KB
/
users.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
<?php
session_start();
if (!isset($_SESSION['unique_id'])) {
header("location: login.php");
}
?>
<?php include_once "header.php"; ?>
<body>
<div class="wrapper">
<section class="users">
<!-- begin:header -->
<header>
<?php
include_once "php/config.php";
$sql = mysqli_query($conn, "SELECT * FROM users WHERE unique_id = {$_SESSION['unique_id']}");
if (mysqli_num_rows($sql) > 0) {
$row = mysqli_fetch_assoc($sql);
}
?>
<div class="content">
<img src="./image/<?php echo $row['avatar']; ?>" alt="">
<div class="details">
<span><?php echo $row['full_name'] . " " . $row['last_name']; ?></span>
<p style="color:cadetblue;"><?php echo $row['status']; ?></p>
</div>
</div>
<a href="php/logout.php?logout_id=<?php echo $row['unique_id']; ?>" class="logout">Log Out</a>
</header>
<!-- end:header -->
<!-- begin:search -->
<div class="search">
<span class="text">Select an users to start a chat</span>
<input type="text" placeholder="Cari...">
<button><i class="fas fa-search"></i></button>
</div>
<!-- end:search -->
<div class="users-list">
<!-- begin:user -->
<!-- end:user -->
</div>
</section>
</div>
<!-- begin script users -->
<script src="js/users.js"></script>
</body>
</html>