/
complaints.php
107 lines (91 loc) · 2.48 KB
/
complaints.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
<?php include('include/header.php')?>
<?php
if(isset($_SESSION['dept']))
{
$dept= $_SESSION['dept'] ;
}
?>
<?php
$sql="SELECT * FROM complaint where cdept='$dept' order by id desc" ;
$res=mysqli_query($conn,$sql);
?>
<div class="msg">
<div class="msg15">
<?php
while($row =mysqli_fetch_assoc($res))
{
?>
<div class="msg1 collapsem" >
<form action="action.php" method="post">
<input type="hidden" name="msgid" value="<?php echo $row['id'];?>">
<p><?php echo $row['date'];?><?php if($row['status']=='process')
{
?>
<span style="color:red;"> <?php echo $row['status'];?> </span>
<?php
}
?>
<?php if($row['status']=='pending')
{
?>
<span style="color:darkred;"> <?php echo $row['status'];?> </span>
<?php
}
?>
<?php if($row['status']=='completed')
{
?>
<span style="color:green;"> <?php echo $row['status'];?> </span>
<?php
}
?></p>
<h4><?php echo $row['Student_Id'];?> <span>Department:- <?php echo $row['dept'];?> </span></h4>
</div>
<div class="content_c"> <p style="padding: 5px;">Complaint by - <?php echo $row['Student_Id'];?></p>
<p style="font-weight:bold;padding: 5px;">Detail :- <?php echo $row['complaint'];?></p>
<p><?php echo $row['date'];?></p>
<?php
if($row['status']=='process')
{
?>
<p style="color:red;padding: 5px;"><?php echo $row['status'];?></p>
<?php
}
?>
<?php if($row['status']=='pending')
{
?>
<p style="color:darkred;padding: 5px;"><?php echo $row['status'];?></p>
<?php
}
?>
<?php if($row['status']=='completed')
{
?>
<p style="color:green;padding: 5px;"><?php echo $row['status'];?></p>
<?php
}
?>
<input type="submit"class="btn-p"name="processsubmit" value="Add in process">
</div>
</form>
<?php
}
?>
</div>
<script>
var coll = document.getElementsByClassName("collapsem");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
</script>
</div>