-
Notifications
You must be signed in to change notification settings - Fork 0
/
history.php
90 lines (77 loc) · 1.81 KB
/
history.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
<?php
require('database_connection/interaction.php');
echo "<style>
.box {
width: 300px;
margin: 50px auto;
background: #00bfb6;
padding: 20px;
font-weight: 900;
color: #fff;
font-family: arial;
position: relative;
}
.sb1:before {
content: '';
width: 0px;
height: 0px;
text-align: left;
position: absolute;
border-left: 10px solid #00bfb6;
border-right: 10px solid transparent;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
right: -19px;
top: 6px;
}
.sb2:before {
content: '';
width: 0px;
height: 0px;
text-align: right;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid #00bfb6;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
left: -19px;
top: 6px;
}
.sb3:before {
content: '';
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid #00bfb6;
border-right: 10px solid transparent;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
left: 19px;
bottom: -19px;
}
.sb4:before {
content: '';
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid #00bfb6;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
right: 19px;
bottom: -19px;
}
</style>";
$request=$_GET;
$contact=$request['contact'];
echo "<title>Historique de messages</title>";
if($name=getNameofContact($contact)) echo "<h1>$name</h1>";
$messages=getMessagesFromNumber($contact);
echo "<h5>$contact</h5>";
echo "<hr>";
foreach($messages as $message) {
$b='sb2';
if($message['direction']=="in") $b='sb1';
echo "<div class='box $b'><b>".$message['direction']."</b><br />".$message['text']."</div>";
}
?>