-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogs.php
68 lines (53 loc) · 2.74 KB
/
logs.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
<?php
session_start();
$username = $_SESSION['username'];
if(isset($_POST['win1']))
{
$win1 = $_POST['win1'];
}
// $win3 = $_POST['win3'];
include 'database.php';
if($win1==1)
{
$result = mysqli_query($con,"SELECT * FROM logs where userid='$username' and windowno='$win1' ORDER by id ASC");
$row_cnt=mysqli_num_rows($result);
if($row_cnt>0){
while ($extract = mysqli_fetch_assoc($result)) {
if(is_null($extract['endsessiontime']))
{
$id=$extract['q_id'];
$result1=mysqli_query($con,"select question from bot where id='$id'");
$q=mysqli_fetch_array($result1);
echo "<li class='left clearfix'><span class='chat-img pull-left'>
<img src='http://placehold.it/50/55C1E7/fff&text=U' alt='User Avatar' class='img-circle' />
</span>
<div class='chat-body clearfix'>
<div class='header'>
<strong class='primary-font'>Customer Bot</strong> <small class='pull-right text-muted'>
<span class='glyphicon glyphicon-time'></span>12 mins ago</small>
</div>
<p>
".$q['question']."
</p>
</div>
</li>";
if(!is_null($extract['user_reply'])){
echo "<li class='right clearfix'><span class='chat-img pull-right'>
<img src='http://placehold.it/50/FA6F57/fff&text=ME' alt='User Avatar' class='img-circle' />
</span>
<div class='chat-body clearfix'>
<div class='header'>
<small class='text-muted'><span class='glyphicon glyphicon-time'></span>13 mins ago</small>
<strong class='pull-right primary-font'>".$extract['userid']."</strong>
</div>
<p>
".$extract['user_reply']."
</p>
</div>
</li>";
}
}
}
}
}
?>