-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
52 lines (40 loc) · 1.48 KB
/
index.php
File metadata and controls
52 lines (40 loc) · 1.48 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
<?php
include 'php/process.php';
go_login_if_not_logged_in();
connect_database();
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.3/jquery.mCustomScrollbar.concat.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.3/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="css/style.css" />
<div class="chat">
<div class="chat-title">
<h1 id="username"></h1>
<figure class="avatar" id="avatar">
<img id="userimg" />
</figure>
</div>
<div class="messages">
<div class="messages-content">
</div>
</div>
<div class="message-box">
<textarea type="text" class="message-input" placeholder="Type message..."></textarea>
<button type="submit" class="message-submit">Send</button>
</div>
<select id="chatterSelect" onchange="selectChatter();">
<option>select user</option>
<?php
$sql = "select * from user";
$result = $conn->query($sql);
while ($row = $result->fetch_assoc()) {
if (!($row['id'] === $_SESSION['id'])) {
echo "<option value='{$row['id']}'>{$row['username']}</option>";
}
}
?>
</select>
</div>
<div class="bg"></div>
<script src="js/script.js"></script>
<script src="js/chatscript.js"></script>