-
Notifications
You must be signed in to change notification settings - Fork 0
/
book_print.php
134 lines (106 loc) · 3.58 KB
/
book_print.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
<?php include ('include/dbcon.php');
include('session.php');
?>
<html>
<head>
<title>Library Management System</title>
<style>
.container {
width:100%;
margin:auto;
}
.table {
width: 100%;
margin-bottom: 20px;
}
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
background-color: #f9f9f9;
}
@media print{
#print {
display:none;
}
}
#print {
width: 90px;
height: 30px;
font-size: 18px;
background: white;
border-radius: 4px;
margin-left:28px;
cursor:hand;
}
</style>
<script>
function printPage() {
window.print();
}
</script>
</head>
<body>
<div class = "container">
<div id = "header">
<center><h5 style = "font-style:Calibri"></h5> Kashi Institute Of Technology - 428 </center>
<center><h5 style = "font-style:Calibri; margin-top:-14px;"></h5> Kashi Institute Of Pharmacy - 551</center>
<center><h5 style = "font-style:Calibri; margin-top:-14px;"></h5> Library Management System</center>
</div><hr style="border: solid black 1px">
<button type="submit" id="print" onclick="printPage()">Print</button>
<p style = "margin-left:30px; margin-top:5px; margin-bottom: 0px;font-size:14pt; font-style: italic; ">Member List </p>
<div align="right">
<b style="color:blue;">Date Prepared:</b>
<?php
echo date("l,d-m-Y"); ?>
</div>
<br/>
<?php
$result= mysqli_query($con,"SELECT * from book where book_title='".$_SESSION['book_title']."' AND book_pub='".$_SESSION['book_pub']."' order by book_id DESC ") OR die (mysqli_error($con));
?>
<table class="table table-striped">
<thead>
<tr>
<tr>
<th>Barcode</th>
<th>Title</th>
<th>Author</th>
<th>ISBN</th>
<th>Publication</th>
<th>Publisher</th>
<th>Copyright</th>
<th>Category</th>
<th>Status</th>
</tr>
</tr>
</thead>
<tbody>
<?php
while ($row= mysqli_fetch_array ($result) ){
$id=$row['book_id'];
?>
<tr>
<td style="text-align:center;"><?php echo $row['book_barcode']; ?></td>
<td style="text-align:center;"><?php echo $row['book_title']; ?></td>
<td style="text-align:center;"><?php echo $row['author']; ?></td>
<td style="text-align:center;"><?php echo $row['isbn']; ?></td>
<td style="text-align:center;"><?php echo $row['book_pub']; ?></td>
<td style="text-align:center;"><?php echo $row['publisher_name']; ?></td>
<td style="text-align:center;"><?php echo $row['copyright_year']; ?></td>
<td style="text-align:center;"><?php echo $row['category']; ?></td>
<td style="text-align:center;"><?php echo $row['status']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<br />
<br />
<?php
$user_query=mysqli_query($con,"select * from admin where admin_id='$id_session'")or die(mysql_error());
$row=mysqli_fetch_array($user_query); {
?> <h2><i class="glyphicon glyphicon-user"></i> <?php echo '<span style="color:blue; font-size:15px;">Prepared by:'."<br /><br /> ".$row['firstname']." ".$row['lastname']." ".'</span>';?></h2>
<?php } ?>
</div>
</div>
</body>
</html>