-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChat.php
116 lines (88 loc) · 3.82 KB
/
Chat.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
104
105
106
107
108
109
110
111
112
113
114
115
<html lang="en">
<head>
<title>Hbz</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="icon" type="image/png" href="images/icons/favicon.ico" />
<!-- Custom styles for this template -->
<link href="css/home_main.css" rel="stylesheet">
<link href="css/forum.css" rel="stylesheet">
<!-- home main test -->
<link href="css/home_main.css" rel="stylesheet">
<!-- / test -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"></script>
<link href="css/chat.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" type="text/css"rel="stylesheet">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- this script contains the whole chat logic -->
<script src="js/chat_js/chat_logic.js"></script>
</head>
<body>
<?php
include "navbar2.php";
if (!isset($_SESSION["user_id"])) {
session_destroy();
header("Location: /HBz/Login.php",TRUE,302);
die();
}
include "php/chat_php/startPrivateConversation.php";
?>
<div class="container-fluid">
<h1 class=" text-center">Conversations</h1>
<div class="messaging">
<div class="inbox_msg">
<div class="inbox_people">
<div class="headind_srch">
<div class="recent_heading col-9">
<h2>Recent</h2>
</div>
<div class="recent_heading col-3">
<button class="btn btn-info btn-lg" id="open-create-group-menu-btn" onclick="createGroup()">Create group</button>
</div>
</div>
<!-- ALL THE ONGOING CONVERSATIONS WILL BE LOADED INSIDE THIS DIV -->
<div class="inbox_chat">
<?php include "php/chat_php/loadConversations.php";?>
</div>
</div>
<div class="mesgs">
<div class="headind_srch">
<div class="chat_heading">
<h3 id="conversationTitle">⠀</h3>
</div>
<div class="srch_bar">
<div class="stylish-input-group">
<h4 onclick="toggleMenu()">⋮</h4>
</div>
</div>
</div>
<div class="msg_history" id="msg_history">
<!-- THE MESSAGES OF THE CHAT WILL BE LOADED HERE USING AJAX -->
</div>
<p id="isCovnersationPrivate" hidden>0</p>
<div class="chat_menu" id="chat-menu" style="display: none"></div>
<!-- INPUT-FIELD AND BUTTON TO SEND A MESSAGE -->
<div class="type_msg">
<div class="input_msg_write row">
<div class="col-10">
<label for="inputMessage">⠀</label>
<input type="text" class="write_msg" name="inputMessage" id="inputMessage" placeholder="Type a message" />
</div>
<div class="col-2 col-md">
<button class="msg_send_btn" value="empty" aria-label="send" type="button" id="msg_send_btn" onclick="sendMessage()"><i class="fa fa-paper-plane-o"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include "footer.php"?>
</body>
</html>