-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessage_users.php
More file actions
117 lines (100 loc) · 3.5 KB
/
message_users.php
File metadata and controls
117 lines (100 loc) · 3.5 KB
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
<?php
require 'config.inc.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title> Intrend Interior Category Flat Bootstrap Responsive Website Template | Contact : W3layouts</title>
<!-- Meta tag Keywords -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta name="keywords" content="Intrend Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript">
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
<!-- css files -->
<link rel="stylesheet" href="web_home/css_home/edwin.css"> <!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="web_home/css_home/style.css" type="text/css" media="all" /> <!-- Style-CSS -->
<link rel="stylesheet" href="web_home/css_home/fontawesome-all.css"> <!-- Font-Awesome-Icons-CSS -->
<!-- //css files -->
</head>
<style type="text/css">
.card-header{
padding: 15px;
font-size: 30px;
}
.card-body{
padding: 15px;
}
.card-footer{
text-align: left;
padding: 15px;
}
</style>
<body>
<!-- banner -->
<div class="inner-page-banner" id="home">
<!--Header-->
<header>
<div class="container agile-banner_nav">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<h1><a class="navbar-brand" href="home.php">NITC <span class="display"></span></a></h1>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-center" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="home.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="services.php">Hostels</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="contact.php">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="message_user.php">Message Received</a>
</li>
<li class="nav-item">
<a class="nav-link" href="message_user.php">Logout</a>
</li>
</ul>
</div>
</nav>
</div>
</header>
<!--Header-->
</div>
<!-- //banner -->
<?php
$roll_no = isset($_SESSION['roll']);
$query = "SELECT * FROM Message WHERE receiver_id ='$roll_no'";
$result = mysqli_query($db,$query);
while ($row = mysqli_fetch_assoc($result)>0){
$hostel_id = $row['hostel_id'];
$query6 = "SELECT * FROM Hostel WHERE Hostel_id = '$hostel_id'";
$result6 = mysqli_query($db,$query6);
$row6 = mysqli_fetch_assoc($result6);
$hostel_name = $row6['Hostel_name'];
?>
<div class="container">
<div class="card">
<div class="card-header"><b><?php echo $row['subject_h']; ?></b></div>
<div class="card-body"><?php echo $row['message']; ?></div>
<div class="card-footer"><?php echo $hostel_name." Hostel Manager"; ?><span style="float: right"><?php echo $row['msg_date']." ".$row['msg_time']; ?></span></div>
</div>
</div>
<br><br>
<?php
}
?>
<br>
<br>