-
Notifications
You must be signed in to change notification settings - Fork 0
/
as_chat.php
221 lines (181 loc) · 7.06 KB
/
as_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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?php
include 'connection.php';
session_start();
$data2= $_SESSION['log'];
$data= mysqli_query($con,"select * from as_chat join student_registration on as_chat.login_id=student_registration.login_id ");
if(isset($_POST['send'])){
$mg= $_POST['rep'];
mysqli_query($con,"insert into as_chat (reply)value('$mg') ");
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="utf-8">
<title>Chat</title>
<!-- mobile responsive meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- ** Plugins Needed for the Project ** -->
<!-- Bootstrap -->
<link rel="stylesheet" href="plugins/bootstrap/bootstrap.min.css">
<!-- slick slider -->
<link rel="stylesheet" href="plugins/slick/slick.css">
<!-- themefy-icon -->
<link rel="stylesheet" href="plugins/themify-icons/themify-icons.css">
<!-- venobox css -->
<link rel="stylesheet" href="plugins/venobox/venobox.css">
<!-- card slider -->
<link rel="stylesheet" href="plugins/card-slider/css/style.css">
<!-- Main Stylesheet -->
<link href="css/style.css" rel="stylesheet">
<!--Favicon-->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
</head>
<body>
<?php
include 'admin_header.php';
?>
<!-- page-title -->
<section class="page-title bg-cover" data-background="images/backgrounds/page-title.jpg">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<h1 class="display-1 text-white font-weight-bold font-primary">Chat</h1>
</div>
</div>
</div>
</section>
<!-- /page-title -->
<!-- service -->
<section class="section">
<div class="container">
<div class="row">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Student name</th>
<th scope="col">message</th>
<th scope="col">reply</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
while($row= mysqli_fetch_assoc($data)){
?>
<tr>
<td><?php echo $row['name'] ?></td>
<td><?php echo $row['message'] ?></td>
<td><?php echo $row['reply'] ?></td>
<td> <button class="btn btn-primary" name="send" type="submit"><a style="color:white" href="as_chat2.php?id=<?php echo $row['chat_id'] ?>">Reply</a></button></td></td>
<form method="post">
</form>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</section>
<!-- /service -->
<!-- call to action -->
<section class="section">
<div class="container section-sm overlay-secondary-half bg-cover" data-background="images/backgrounds/cta-bg.jpg">
<div class="row">
<div class="col-lg-8 offset-lg-1">
<h2 class="text-gradient-primary">Let's Chat With Us!</h2>
<!-- <p class="h4 font-weight-bold text-white mb-4">Lorem ipsum dolor sit amet, magna habemus ius ad</p> -->
<a href="contact.html" class="btn btn-lg btn-primary">Chat</a>
</div>
</div>
</div>
</section>
<!-- /call to action -->
<!-- footer -->
<footer class="bg-secondary position-relative">
<img src="images/backgrounds/map.png" class="img-fluid overlay-image" alt="">
<div class="section">
<div class="container">
<div class="row align-items-center">
<div class="col-md-3 col-6">
<h4 class="text-white mb-5">About</h4>
<ul class="list-unstyled">
<li><a href="#" class="text-light d-block mb-3">Service</a></li>
<li><a href="#" class="text-light d-block mb-3">Conatact</a></li>
<li><a href="#" class="text-light d-block mb-3">About us</a></li>
<li><a href="#" class="text-light d-block mb-3">Blog</a></li>
<li><a href="#" class="text-light d-block mb-3">Support</a></li>
</ul>
</div>
<div class="col-md-3 col-6">
<h4 class="text-white mb-5">Company</h4>
<ul class="list-unstyled">
<li><a href="#" class="text-light d-block mb-3">Service</a></li>
<li><a href="#" class="text-light d-block mb-3">Conatact</a></li>
<li><a href="#" class="text-light d-block mb-3">About us</a></li>
<li><a href="#" class="text-light d-block mb-3">Blog</a></li>
<li><a href="#" class="text-light d-block mb-3">Support</a></li>
</ul>
</div>
<div class="col-md-6">
<div class="bg-white p-4">
<h3>Contact us</h3>
<form action="#">
<input type="text" id="name" name="name" class="form-control mb-4 px-0" placeholder="Full name">
<input type="text" id="name" name="name" class="form-control mb-4 px-0" placeholder="Email address">
<textarea name="message" id="message" class="form-control mb-4 px-0" placeholder="Message"></textarea>
<button class="btn btn-primary" type="submit">Send</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="pb-4">
<div class="container">
<div class="row align-items-center">
<div class="col-md-6 text-center text-md-left">
<p class="text-light mb-0">Copyright © 2019 a theme by <a class="text-gradient-primary" href="https://themefisher.com">themefisher.com</a>
</p>
</div>
<div class="col-md-6">
<ul class="list-inline text-md-right text-center">
<li class="list-inline-item"><a class="d-block p-3 text-white" href="#"><i class="ti-facebook"></i></a></li>
<li class="list-inline-item"><a class="d-block p-3 text-white" href="#"><i class="ti-twitter-alt"></i></a></li>
<li class="list-inline-item"><a class="d-block p-3 text-white" href="#"><i class="ti-instagram"></i></a></li>
<li class="list-inline-item"><a class="d-block p-3 text-white" href="#"><i class="ti-github"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</footer>
<!-- /footer -->
<!-- jQuery -->
<script src="plugins/jQuery/jquery.min.js"></script>
<!-- Bootstrap JS -->
<script src="plugins/bootstrap/bootstrap.min.js"></script>
<!-- slick slider -->
<script src="plugins/slick/slick.min.js"></script>
<!-- venobox -->
<script src="plugins/venobox/venobox.min.js"></script>
<!-- shuffle -->
<script src="plugins/shuffle/shuffle.min.js"></script>
<!-- apear js -->
<script src="plugins/counto/apear.js"></script>
<!-- counter -->
<script src="plugins/counto/counTo.js"></script>
<!-- card slider -->
<script src="plugins/card-slider/js/card-slider-min.js"></script>
<!-- google map -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCcABaamniA6OL5YvYSpB3pFMNrXwXnLwU&libraries=places"></script>
<script src="plugins/google-map/gmap.js"></script>
<!-- Main Script -->
<script src="js/script.js"></script>
</body>
</html>