Skip to content

Commit e45eb51

Browse files
initializing library system
0 parents  commit e45eb51

File tree

206 files changed

+24408
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+24408
-0
lines changed

Booklist.php

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<style>
2+
.bar{ height:30px; width:853px; margin-left:38px; margin-top:10px;}
3+
#getresult{ float:left;}
4+
.sy{ float:left; font-size:15px; font-family:Verdana, Geneva, sans-serif; margin-top:10px;}
5+
</style>
6+
<script type="text/javascript" src="js/ajax.js"></script>
7+
<script>
8+
function printDiv(divID) {
9+
//Get the HTML of div
10+
var divElements = document.getElementById(divID).innerHTML;
11+
//Get the HTML of whole page
12+
var oldPage = document.body.innerHTML;
13+
14+
//Reset the page's HTML with div's HTML only
15+
document.body.innerHTML =
16+
"<nav>" +
17+
divElements + "</nav>";
18+
19+
//Print Page
20+
window.print();
21+
22+
//Restore orignal HTML
23+
document.body.innerHTML = oldPage;
24+
window.location='index.php?Booklist';
25+
}
26+
</script>
27+
<div class="bar">
28+
29+
<select name="classID" style=" font-size:15px; padding:3px; width:200px; float:left;" class="com" onChange="getbooks(this.value)">
30+
<option ></option>
31+
<?php
32+
include('config.php');
33+
$sql="SELECT * FROM sy";
34+
$rs=mysql_query($sql);
35+
$class=0;
36+
37+
while($row=mysql_fetch_array($rs)){
38+
$class++;
39+
?>
40+
<option value="<?php echo $row['year'];?>">
41+
<?php
42+
43+
echo $row['year'];
44+
45+
}
46+
?>
47+
</option>
48+
</select>
49+
50+
<?php
51+
if(isset($_REQUEST['classid'])){
52+
53+
echo "res";
54+
55+
}
56+
?>
57+
<input type="button" value="Print" onClick="javascript:printDiv('printablediv')" />
58+
</div>
59+
<div id="printablediv">
60+
<table width="360" border="0" align="center" style="margin-top:40px;">
61+
<tr>
62+
<td align="center" style="font-size:20px; font-weight:bold;font-family:Arial, 'Arial Black', 'Arial Narrow';">St. Mary's Academy of San Nicolas</td>
63+
64+
</tr>
65+
<tr>
66+
<td style="font-size:17px; font-weight:bold; font-family:Arial, 'Arial Black', 'Arial Narrow';" align="center">T. Abella St., Cebu City</td>
67+
</tr>
68+
<tr height="10"><td></td>
69+
</tr>
70+
<tr>
71+
<td style=" margin-top:20px;font-size:19px; font-weight:bold; font-family:Arial, 'Arial Black', 'Arial Narrow';" align="center">HIGH SCHOOL LIBRARY</td>
72+
</tr>
73+
74+
<tr align="center" >
75+
<td style="font-size:15px; font-family:Verdana, Geneva, sans-serif; font-weight:bold;">List of Acquisitions
76+
</td>
77+
</tr>
78+
79+
</table>
80+
<div id="getresult">
81+
82+
<table width="853" border="0" cellspacing="1" style=" margin-bottom:30px; margin-left:38px;font-size:12px; margin-top:20px; font-family:Verdana, Geneva, sans-serif;">
83+
<thead>
84+
85+
<tr style="font-size:15px; font-weight:bold; font-family:Verdana, Geneva, sans-serif;" height="30" align="center" >
86+
<td width="100">Acc No</td>
87+
<td width="400">Title</td>
88+
<td width="200">Author</td>
89+
<td width="70">Copies</td>
90+
</tr>
91+
<tr>
92+
<td colspan="4" style="border-bottom:#000 solid 1px;"></td>
93+
</tr>
94+
</thead>
95+
96+
<?php
97+
include('config.php');
98+
$q="select * from books where status='1'";
99+
$rs=mysql_query($q);
100+
while($row=mysql_fetch_array($rs)){
101+
?>
102+
103+
<tr align="center" class="hr" height="25">
104+
<td bgcolor="" width="100">
105+
<?php echo $row['accNo'];?>
106+
</td>
107+
<td width="400"><?php echo $row['booktitle']; ?></td>
108+
<td width="200"><?php echo $row['author1']; ?></td>
109+
<td width="70" ><?php echo $row['bookcopies'];?></td>
110+
111+
112+
</tr>
113+
<?php }
114+
115+
?>
116+
117+
</table>
118+
</div>
119+
</div>

BorrowerSearch.php

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<style>
2+
.r:hover{
3+
background:#D5DEFF;}
4+
</style>
5+
<?php
6+
include('config.php');
7+
$classid=$_GET['classid'];
8+
$q=mysql_query("select * from books where bookclass='$classid' and status='1'");
9+
$num=mysql_num_rows($q)or die(mysql_error());
10+
11+
12+
if(empty($_POST)){?>
13+
<table width="100%" bgcolor="#0099FF" border="0" cellspacing="1" style=" text-align:center;margin-top:-2px; float:left; margin-left:" >
14+
<thead>
15+
<tr align="center" bgcolor="#F90" height="30">
16+
<td class="web" width="100"><strong>Book ID</strong></td>
17+
<td class="web" width="400"><strong>Title</strong></td>
18+
<td class="web" width="300"><strong>Author</strong></td>
19+
<td class="web" width="100" colspan="2"><img src="icons/phone_book_edit.png" height="25"/></td>
20+
</tr>
21+
22+
<?php
23+
}
24+
25+
26+
if($num==0){ ?>
27+
<tr bgcolor="#E8EDFF">
28+
<td colspan="5" align="center">No Books Found!</td>
29+
</tr>
30+
<?php }else{
31+
while($class=mysql_fetch_array($q)or die(mysql_error())){
32+
//$link="<a class='classlink' href='?classid=$name[classid]&$name[classname]'>";
33+
?>
34+
<tr bgcolor="#E8EDFF" class="r">
35+
<td><?php echo $class['accNo']; ?></td>
36+
<td><?php echo $class['booktitle']; ?></td>
37+
<td><?php echo $class['author1']; ?></td>
38+
<td><img src="icons/phone_book_edit.png" height="25"/></td>
39+
</tr>
40+
41+
42+
<?php }} ?>
43+
</thead>
44+
</table>
45+
46+

0 commit comments

Comments
 (0)