-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathratingscore.php
110 lines (97 loc) · 3.64 KB
/
ratingscore.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Feedback</title>
<link type="text/css" rel="stylesheet" href="../css/assigment.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body style="background-image: url('images/salon1.jpg'); background-repeat: no-repeat;background-size: 100%">
<?php
$title = 'Feedback'; include("header.php");
?>
<center>
<table style = "border-collapse:collapse; background-color: #d9d9d9; bodercolor:black;" border = "5px" width = "70%" class="vtable">
<tr style="background-color: #b3b3b3">
<th>Email</th>
<th>Rate</th>
<th>Comment</th>
<th></th>
</tr>
<?php
include_once 'includes/ratingDisplay.php'; //including the Data Base handler
while($loop_data = mysqli_fetch_assoc($count_Result)){
$email = $UserAdDetails[$count]['email'];
$rate = $UserAdDetails[$count]['rate'];
$comment = $UserAdDetails[$count]['comment'];
if($rate==1){
$rate1="<img src='images/color_star.png' width='20px'>
<img src='images/star.png' width='20px'>
<img src='images/star.png' width='20px'>
<img src='images/star.png' width='20px'>
<img src='images/star.png' width='20px'>";
}else{
$rate1="";
}
if($rate==2){
$rate2="<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/star.png' width='20px'>
<img src='images/star.png' width='20px'>
<img src='images/star.png' width='20px'>";
}else{
$rate2="";
}
if($rate==3){
$rate3="<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/star.png' width='20px'>
<img src='images/star.png' width='20px'>";
}else{
$rate3="";
}
if($rate==4){
$rate4="<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/star.png' width='20px'>";
}else{
$rate4="";
}
if($rate==5){
$rate5="<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>
<img src='images/color_star.png' width='20px'>";
}else{
$rate5="";
}
echo
"<tr>
<td>$email</td>
<td>
$rate1 $rate2 $rate3 $rate4 $rate5
</td>
<td>$comment</td>
<td style='text-align: center;'>
<form action='includes/feedbackEdit.php' method='POST'>
<input type = 'radio' name='emailF' value='$email' required>
<input type='text' name='editComment' placeholder='*Re-enter commet*'><br/>
<button type='submit' name='feedEdit' class='button2'>Edit</button>
<button type='submit' name='feedDel' class='button2'>Remove</button>
</form>
</td>
</tr>";
$count=$count+1;
}
?>
</table>
</center>
<?php
include "./footer.php";
?>
</body>
</html>