-
Notifications
You must be signed in to change notification settings - Fork 0
/
includefeedback.php
92 lines (78 loc) · 3.01 KB
/
includefeedback.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
<?php
error_reporting(0);
include_once "fwListTemplate.php";
// include_once "sample.php";
$con = mysqli_connect('localhost','root','','admindb');
$query="SELECT * FROM FEEDBACK";
$data=mysqli_query($con,$query);
$total = mysqli_num_rows($data);
echo "<main id='form' role='main' class='col-md-9 ml-sm-auto col-lg-10 px-md-4'>
<div class='d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom'>
<h1 class='h2'>Dashboard</h1>
</div>
<div>
<p style='font-family:cursive;font-size:30px;' > Total feedbacks = $total</p>
<table id='foodtable' >
<tr>
<th style='position: sticky;top: 60px;z-index: 10;' >SNO</th>
<th style='position: sticky;top: 60px;z-index: 10;'>Image</th>
<th style='position: sticky;top: 60px;z-index: 10;'>Name</th>
<th style='position: sticky;top: 60px;z-index: 10;'>Feedback</th>
<th style='position: sticky;top: 60px;z-index: 10;'>Stars</th>
<th style='position: sticky;top: 60px;z-index: 10;'>Actions<th>
</tr>
</div>
</main>";
$counter = 0;
while($result=mysqli_fetch_assoc($data)){
echo"
<tr>
<td> ".++$counter." </td>";
if(empty($result['picture_type'])){
echo "<td></td>";
}
else{
echo "<td> <a href='data:".$result['picture_type'].";base64,".base64_encode($result['picture'])."' data-lightbox='mygallery' data-title='".$result['name']."'>
<img src='data:".$result['picture_type'].";base64,".base64_encode($result['picture'])."' style='max-width:70px;height: 70px' class='center' </a></td>";
}
echo "<td><p style='max-width:55px;'> ".$result['name']." </p></td>
<td style='max-width:250px;'><p >".$result['message']."</p></td>
<td> ".$result['stars']." </td>