-
Notifications
You must be signed in to change notification settings - Fork 0
/
view_com.php
78 lines (67 loc) · 1.5 KB
/
view_com.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
<?php
include "db.php";
session_start();
if (!isset($_SESSION["AID"]))
{
header("location:index.php");
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>LIB</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container">
<div class="header">
<h1>Library Management System</h1>
</div>
<div class="nav">
<?php
include "adminnavbar.php";
?>
</div>
<div class="wrapper">
<h3 class="heading">Viewing Comments</h3>
<div class="center">
<?php
$sql="select book.BTITLE,user1.NAME,comment.COMM,comment.LOGS from comment inner join book on book.BID=comment.BID inner join user1 on comment.SID=user1.ID";
$res=$db->query($sql);
if($res->num_rows > 0)
{
echo "<table border='1px'>";
echo "<tr>";
echo "<th>SNO</th>";
echo "<th>BOOK </th>";
echo "<th>NAME</th>";
echo "<th>COMMENT</th>";
echo "<th>LOGS</th>";
echo "</tr>";
$i=0;
while ($row=$res->fetch_assoc())
{
$i++;
echo "<tr>";
echo "<td>{$i}</td>";
echo "<td>{$row['BTITLE']}</td>";
echo "<td>{$row['NAME']}</td>";
echo "<td>{$row['COMM']}</td>";
echo "<td>{$row['LOGS']}</td>";
echo "</tr";
}
echo "</table>";
}
else
{
echo "<p class='err'>No comment Found</p> ";
}
?>
</div>
</div>
</div>
<footer>
<p>Copyright © Library Management System</p>
</footer>
</body>
</html>