-
Notifications
You must be signed in to change notification settings - Fork 4
/
FeedbackList.php
112 lines (100 loc) · 3.99 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
106
107
108
109
110
111
112
<?php
session_start();
$conn = mysqli_connect('localhost', 'root', '');
mysqli_select_db($conn, 'vhelp');
$regno = $_SESSION["regno"];
if ($_SESSION["regno"] == true) {
echo "welcome" . " " . $_SESSION["regno"];
} else {
header('location:LoginStudent.php');
}
?>
<html>
<head>
<title>
Home Page
</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<style>
.home_header ul {
display: flex;
justify-content: center;
align-items: center;
margin-left: 45%;
}
.table {
color: black;
margin-top: 100px;
background-color: black;
border-radius: 30px;
margin-left: 20px;
margin-right: 20px;
}
</style>
</head>
<body>
<div id="homeBox">
<p class="topname">
<p class="logo">V Help</p>
<p class="group">powered by <b>SEAGA</b></p>
</p>
<div id="homeBox2">
<header class="home_header">
<ul>
<li><a href="adminpanel.php" class="main2">Complains</a></li>
<li><a href="users_info_Admin.php">users</a></li>
<li><a href="logout.php">Logout</a></li>
<li><a href="FeedbackList.php">Feedback</a></li>
</ul>
</header>
<?php
$query1 = mysqli_query($conn, "SELECT * FROM `complain_feedback`");
$rowcount1 = mysqli_num_rows($query1);
?>
<div class="content">
<table class="table">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Registration No:</th>
<th scope="col">Worker ID</th>
<th scope="col">Problem Type</th>
<th scope="col">Problem description:</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 1; $i <= $rowcount1; $i++) {
$row1 = mysqli_fetch_array($query1);
// $id = $row1["id"];
?>
<tr>
<td><?php echo $row1["name"] ?></td>
<td><?php echo $row1["regno"] ?></td>
<td><?php echo $row1["wo_id"] ?></td>
<td><?php echo $row1["prob_type"] ?></td>
<td><?php echo $row1["prob_feed"] ?></td>
</tr>
<?php
if (isset($_POST["delete"])) {
// $Status = $_POST['Status'];
// $id = $_POST['id'];
$regno1 = $_SESSION["regno"];
$query21 = "DELETE FROM `complains` WHERE user_id=$id";
$data = mysqli_query($conn, $query21);
if ($data) {
echo "<script>alert('Confirmed')</script>";
header('location:ComplainsStudents.php');
} else {
echo " failed to confirm";
header('location:ComplainsStudents.php');
}
}
}
?>
</tbody>
</table>
</div>\
</body>
</html>