-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedbacklist.php
105 lines (80 loc) · 2.22 KB
/
feedbacklist.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
<?php
include "config.php";
$names="";
//write the query to get data from users table
$sql = "SELECT * FROM content";
//execute the query
$result = $conn->query($sql);
session_start();
if (isset($_SESSION['id']) && isset($_SESSION['user_name']) && $_SESSION['admin'] == true){
if (isset($_GET['logout'])) {
session_destroy();
unset($_SESSION['user_name']);
header('location: login.php');
}
?>
<?php
include('includes/header.php');
include('includes/navbar.php');
?>
<!DOCTYPE html>
<html lang="en" >
<head>
<!-- <meta charset="UTF-16LE"> -->
<title>Notes </title>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css'>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.ckeditor.com/4.13.1/standard/ckeditor.js"></script>
<body>
<?php
$query=mysqli_query($conn,"SELECT * FROM feedback");
$rowcount = mysqli_num_rows($query);
?><br>
<div class="container-fluid">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Feedbacks
</h6>
</div>
<table class="table table-bordered">
<tr>
<thead class="thead-dark">
<th>ID</th>
<th>Names</th>
<th>Number</th>
<th>Email</th>
<th>Suggestion</th>
</tr>
<?php
for($i=1;$i<=$rowcount;$i++)
{
$row=mysqli_fetch_array($query);
?>
<tr>
<td><?php echo $row['id']; ?></td>
<td><?php echo $row['user']; ?></td>
<td><?php echo $row['mobile']; ?></p></td>
<td><?php echo $row['email']; ?></td>
<td><?php echo substr($row['comments'],0,56); ?>.......</td>
</tr>
<?php
}
?>
<form method="post">
<div id="toolbar-container"></div>
<!-- This container will become the editable. -->
<div id="editor" name="editor" >
<!-- <p>This is the initial editor content.</p> -->
</div>
</form>
</div><br></div>
<?php
}else{
header('location: login.php');
}
?>
<?php
include('includes/scripts.php');
include('includes/footer.php');
?>