-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsearchBooks.php
More file actions
executable file
·181 lines (149 loc) · 3.92 KB
/
searchBooks.php
File metadata and controls
executable file
·181 lines (149 loc) · 3.92 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
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
180
181
<style>
.scroll{
width:900px;
max-height:500px;
margin-bottom:20px;
float:left;
margin-left:25px;
overflow:scroll;
overflow-x:hidden;
overflow-y:scroll;
}
.searcharea{
float:left;
margin-left:20px;
}
.hed{
float:left;
margin-left:20px;
margin-top:10px;}
</style>
<script type="text/javascript" src="js/jquery.watermarkinput.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".search").keyup(function()
{
var searchbox = $(this).val();
var dataString = 'searchword='+ searchbox;
if(searchbox=='')
{
$.ajax({
type: "POST",
url: "all.php",
data: dataString,
cache: false,
success: function(html)
{
$("#display").html(html).show();
}
});
}
else
{
$.ajax({
type: "POST",
url: 'search.php',
data: dataString,
cache: false,
success: function(html)
{
$("#display").html(html).show();
}});
}return false;
});
});
jQuery(function($){
$("#searchbox").Watermark("Search Books through Book ID, Title, Authors");
});
</script>
<br/>
<br/>
<div class="searcharea">
<table border="0" style="border:1px inset #999; margin-top:5px; margin-left:27px; float:left;">
<tr><td>
<input type="text" style="width:500px; padding:4px;" onclick="clear()" class="search" id="searchbox" />
</td>
</tr></table>
</div>
<style>
.bookstat{ font-size:12px; font-family:Verdana, Geneva, sans-serif; text-align:right; margin-left:0px; width:732px; margin-top:20px; float:left;}
.web{ -webkit-border-radius:7px 7px 0px 0px;
-moz-border-radius:7px 7px 0px 0px;
text-align:center; font-size:12px; font-weight:bold; font-family:Arial, "Arial Black", "Arial Narrow"; color:#003399;
}
.unret{border:1px #CCC solid;}
.unret:hover{border:1px #666 solid;}
.addbooks:hover{ border:1px #333 solid;}
.addbooks{ color:#666; border-radius:5px; margin-left:20px; height:30px;border:1px inset #CCC; float:left;}
.list:hover{ border:1px inset #333;}
.list{ color:#666; border-radius:5px; margin-left:20px; height:30px;border:1px inset #CCC; float:left;}
</style>
<div class="hed">
<table width="853" border="0" cellspacing="1" style=" margin-left:20px;font-size:12px; font-family:Verdana, Geneva, sans-serif;">
<thead>
<tr bgcolor="#F90" height="30" align="center">
<td width="75"><strong>Book ID</strong></td>
<td width="250"><strong>Title</strong></td>
<td width="120"><strong>Author</strong></td>
<td width="120"><strong>Branch</strong></td>
<td width="50"><strong>Copies</strong></td>
<td width="50"><strong>Copies Available</strong></td>
<td width="90" colspan="3"><strong>Action</strong></td>
</tr>
</thead>
</table>
</div>
<div class="scroll">
<div id="display">
<?php include('all.php'); ?>
</div>
</div></div>
<div class="footer">
<div class="leftfoot"></div>
<div class="bodyfoot">
<div class="bookstat">
<?php
include('config.php');
$q="SELECT count(*) from book";
$rs=mysql_query($q);
$row=mysql_fetch_array($rs);
$booktotal=$row['count(*)'];
echo " ";
$qss="SELECT * FROM book_loans where date_in = '0000-00-00'";
$rss=mysql_query($qss);
$rows=mysql_num_rows($rss);
//
?>
<table width="" border="0" style=" height:30px;border:1px inset #999; float:left;">
<tr>
<td>Total variety of Books : </td>
<td><input readonly="readonly" type="text" style="background:#FFF;padding:2px; width:50px;" value="<?php echo $booktotal;
?>"/></td>
</tr>
</table>
<a href="?addBooks" >
<table class="addbooks" border="0">
<tr width="150">
<td align="left">
<td> Add Books</td>
</td>
</tr>
</table>
</a>
<a href="" style="margin-right:10px;"
onclick="OpenPopUp(id,'','',770,500);" class='trnone'>
<table class="list" border="0" style="float:left;">
<tr width="150">
<td align="left">
<td>List of Books</td>
</td>
</tr>
</table>
</a>
</div>
</div>
<div class="rightfoot"></div>
</div>
</div>
</body>
</html>