-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_msg.php
179 lines (141 loc) · 2.98 KB
/
view_msg.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html>
<head>
<title>Dues</title>
<meta name="description" content="website description" />
<meta name="keywords" content="website keywords, website keywords" />
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
.navBar {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #39B7CD;
display: block;
align-content: flex-start;
}
.navItemList{
list-style-type: none;
}
.navItemList li {
float: left;
}
.navItemList li a {
display: block;
color: white;
text-align: center;
padding: 0 16px;
text-decoration: none;
}
/* Change the link color to #111 (black) on hover */
.navItemList li a:hover {
}
.navtitle{
font-family: arial, sans-serif;
color: white;
text-align: center;
padding: 0px 200px 14px 6px;
margin-right: 200px;
font-size: 20px;
text-decoration: none;
}
.navtitle a:hover{
}
#feeds{
align-content:center;
}
#feeds{
border-style: solid;
border-width: 0px;
padding:10px;
border-color: #333;
border-radius: 15px;
margin: 25px 50px;
}
.subButton{
position: relative;
margin:5px;
font-weight: bold;
background-color: #39B7CD;;
border: none;
color: #fff;
border-radius: 15px;
width: 100px;
height: 40px;
cursor: pointer;
}
.blogdel{
margin-bottom:7px;
}
.blog{
border-style: solid;
border-width:1px;
border-color: #DCDCDC;
border-radius: 15px;
margin-top:10px;
padding:5px;
}
</style>
<?php
session_start();
if($_SESSION['type']==0){
include 'stuhead.php';
}
else{
include 'newhead.php';
}
include 'db.php';
?>
<body style="padding:0;margin:0;font-family: arial, sans-serif;">
<div id="content">
<?php
if($_SESSION['type']==0){
$s=$_SESSION['rollno'];
$query = "SELECT * FROM comments WHERE Id='$s' ORDER BY comment_id DESC";
}
if($_SESSION['type']==1){
$s=$_SESSION['labid'];
$query = "SELECT * FROM comment_sta WHERE labid='$s' ORDER BY comment_id DESC ";
}
if($_SESSION['type']==2){
$s=$_SESSION['labid'];
$query = "SELECT * FROM comment_fac WHERE labid='$s' ORDER BY comment_id DESC ";
}
$result=mysqli_query($con,$query);
if($result) {
echo "<table>
<tr>
<th>Subject</th>
<th>request</th>
<th>Time</th>
</tr>";
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo '<tr>
<td>'.$row['comment_subject'].'</td>
<td>'.$row['comment_text'].'</td>
<td>'.$row['time'].'</td>
</tr>';
}
}
}
echo "</table>";
?>
</div>
<center>
<br>
</center>
</body>
</html>