-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmessage.php
100 lines (91 loc) · 2.06 KB
/
message.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
<?php
include_once 'class/client.class.php';
include_once 'class/stylist.class.php';
include_once 'class/notifications.class.php';
session_start();
if(isset($_SESSION['clientemail'])){
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet"href="css/home.css">
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
</head>
<body>
<input type="checkbox"id="check">
<label for="check">
<i class="fas fa-bars" id="btn"></i>
<i class="fas fa-times" id="cancel"></i>
</label>
<div class="sidebar">
<header>Stylist</header>
<ul>
<li><a href="clientappointments.php"><i class="fas fa-qrcode"></i>Your appointments</a><li>
<li class="active"><a href="message.php"><i class="fas fa-link"></i>Your messages</a><li>
<li><a href="stylistreview.php"><i class="far fa-calendar"></i>Your Reviews</a><li>
<li><a href="index.php"><i class="fas fa-stream"></i>Back to homepage</a><li>
</ul>
</div>
</div>
<section>
<div class="logo">
<h1>Your Messages</h1>
</div>
<hr>
<?php
$message = new client();
$noti = new notifications();
$results = $noti->getNotifications($_SESSION['clientemail']);
if(sizeof($results)>0){
foreach ($results as $sms) {
?>
<div class="card">
<div class="container">
<?php
$salon = new stylist();
$res = $salon->getEmail($sms['stylistid']);
foreach ($res as $row) {
?>
<p><b>Stylist Name:</b><p>
<?php
echo $row['businessname'];
?>
<p><b>Message:</b></p>
<?php
}
echo $sms['notification'];
?>
<form action="send.php" method='post'>
<input type="text" placeholder="Reply" name="reply">
<input type="submit" value="Send">
</form>
</div>
</div>
<br>
<?php
}
}else{
?>
<div class="card">
<div class="container">
<p>You have no notifications today</p>
</div>
</div>
<?php
}
?>
</div>
</section>
</body>
</html>
<?php
}
else{
echo"
<script>
alert('login first')
window.location.href='clientlogin.php'
</script>";
}
?>