Skip to content

Commit d5254a3

Browse files
committed
menu edited
1 parent ceef12b commit d5254a3

File tree

3 files changed

+21
-230
lines changed

3 files changed

+21
-230
lines changed

overdue.php

+12-19
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
?>
66
<style>
7-
.trss:nth-child(2n+1){
8-
9-
background-color:#CCC;}
10-
.trss:hover{background-color:#D5DEFF;
7+
.trss{
8+
background-color:#FFCC99;}
9+
.trss:hover{background-color:#F90;
1110

1211
}
1312

@@ -62,7 +61,7 @@
6261

6362
<table border="0" style="margin-top:20px; margin-left:38px;">
6463
<tr>
65-
<td rowspan="3"><img src="icons/phone_book_edit.png" height="50"></td>
64+
<td rowspan="3">&nbsp;</td>
6665
<tr>
6766
<td style="font-size:18px;font-family:Verdana, Geneva, sans-serif; border-bottom:#666 solid 1px; ">List of Overdue Books</td>
6867
</tr>
@@ -75,15 +74,14 @@
7574

7675
<form action="" method="post">
7776

78-
<table width="89%" bordercolor="#999999" class="web" border="0" cellspacing="1" style="border:#666 solid 1px;
77+
<table cellpadding="5px" width="92%" align="center" bordercolor="#999999" class="web" border="0" cellspacing="1" style="border:#666 solid 1px;
7978
margin-bottom:20px; margin-left:38px; margin-right:45px; font-size:12px;font-family:Verdana, Geneva, sans-serif; margin-top:20px;">
8079
<thead>
81-
<tr bgcolor="#3B5998" height="30" style="color:white; font-weight:bold; text-align:left;" >
82-
<td><input type="checkbox" id="selectall"/></td>
80+
<tr bgcolor="#F90" height="30" style="color:#000; font-weight:bold; text-align:left;" >
8381
<td>No.</td>
84-
<td class="web" width="100" align="center">Acc No</td>
85-
<td class="web" width="300" align="center">Boook Title</td>
86-
<td class="web" width="200" align="center">Borrowers Name</td>
82+
<td class="web" width="100" align="center">Card No</td>
83+
<td class="web" width="300" align="center">Book Title</td>
84+
<td class="web" width="200" align="center">Borrower's Name</td>
8785
<td class="web" width="150" align="center">Due Date</td>
8886
<td class="web" width="200" align="center" colspan="3">Count&nbsp;of&nbsp;days</td>
8987
</tr>
@@ -127,8 +125,7 @@
127125
// and you might want to convert to integer
128126
$numberDays = intval($numberDays); ?>
129127

130-
<tr class="trss" >
131-
<td><input name="checkbox[]" class="name" type="checkbox" value="<?php echo $row['borrowid']; ?>"></td>
128+
<tr class="trss" align="center" >
132129
<td><?php echo $count;?></td>
133130
<td><?php echo $row['card_no']; ?></td>
134131
<td><?php echo $book['title']; ?></td>
@@ -160,8 +157,6 @@
160157
<tr>
161158
<?php
162159
if(isset($_POST['overreport'])){ ?>
163-
<td>Print Record(s)</td>
164-
<td><input type="text" value="<?php echo $printcount; ?>" style="padding:2px; width:60px;" readonly="readonly"></td>
165160

166161
<?php }else{?>
167162
<td>Count of Over Due Books</td>
@@ -171,10 +166,8 @@
171166
<td>
172167
<?php
173168
if(isset($_POST['overreport'])){ ?>
174-
<img src="icons/print.png" height="20" style="cursor:pointer;" title="Print" onClick="javascript:printDiv('printablediv')"/>
175-
<?php }else{?>
176-
<input type="submit" value="Print Report" name="overreport">
177-
</form>
169+
<?php }else{?>
170+
</form>
178171

179172
<?php } ?>
180173
</td>

overreport.php

-94
Original file line numberDiff line numberDiff line change
@@ -25,97 +25,3 @@ function printDiv(divID) {
2525
window.location='index.php?overdue';
2626
}
2727
</script>
28-
29-
<div class="hed" id="printablediv">
30-
31-
<table width="360" border="0" align="center">
32-
<tr>
33-
<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>
34-
35-
</tr>
36-
<tr>
37-
<td style="font-size:17px; font-weight:bold; font-family:Arial, 'Arial Black', 'Arial Narrow';" align="center">T. Abella St., Cebu City</td>
38-
</tr>
39-
<tr>
40-
<td height="50" align="center" style="font-size:22px; font-family:Arial, 'Arial Black', 'Arial Narrow';">List of OverDue Books</td>
41-
42-
</table>
43-
44-
45-
<table width="90%" bordercolor="#999999" a class="web" border="0" cellspacing="1" style=" margin-bottom:50px;
46-
margin-left:35px;font-size:12px;font-family:Verdana, Geneva, sans-serif; margin-top:20px;">
47-
<thead>
48-
<tr style="font-weight:bold; font-size:15px;" height="30">
49-
50-
<td class="web" width="100" align="center">Acc No</td>
51-
<td class="web" width="400" align="center">Boook Title</td>
52-
<td class="web" width="240" align="center">Borrowers Name</td>
53-
<td class="web" width="240" align="center">Due Date</td>
54-
<td class="web" width="240" align="center">Count of days</td>
55-
</tr>
56-
<tr>
57-
<td colspan="5" style="border-bottom:1px #000 solid;">
58-
59-
</td>
60-
</tr>
61-
<?php include('config.php');
62-
$printcount=0;
63-
for($i=0;$i<count($_POST['checkbox']);$i++){
64-
$printcount++;
65-
$borrowid = $_POST['checkbox'][$i];
66-
67-
68-
$sql =mysql_query("SELECT * FROM tblborrow WHERE borrowid='$borrowid'");
69-
70-
71-
while($row=mysql_fetch_array($sql)){
72-
73-
$qsa=mysql_query("select * from books where accNo=$row[accNo]");
74-
$book=mysql_fetch_array($qsa);
75-
$b=mysql_query("select * from tblborrower where studentid=$row[studentid]");
76-
$bor=mysql_fetch_array($b);
77-
78-
?>
79-
<tr align="center" height="30">
80-
<td align="left"><?php echo $row['accNo'];?></td>
81-
<td><?php echo $book['booktitle'];?></td>
82-
<td><?php echo $bor['fname']."&nbsp".$bor['lname'];?></td>
83-
<td><?php echo date_format(date_create($row['duedate']), 'F d, Y'); ?></td>
84-
<td>
85-
<?php
86-
87-
$date1=date_format(date_create($row['duedate']), 'Y/m/d')."<br>";
88-
89-
$date2=date_format(date_create(date("Y/m/d")), 'Y/m/d')."<br>";
90-
91-
if($date1<$date2){
92-
93-
$j= count+($c++);
94-
95-
$start=date_format(date_create($row['duedate']), 'Y/m/d')."<br>";
96-
$today=date_format(date_create(date("Y/m/d")), 'Y/m/d')."<br>";
97-
98-
$endTimeStamp = strtotime(date("Y/m/d"));
99-
$startTimeStamp = strtotime($row['duedate']);
100-
$timeDiff = abs($endTimeStamp - $startTimeStamp);
101-
102-
$numberDays = $timeDiff/86400; // 86400 seconds in one day
103-
104-
// and you might want to convert to integer
105-
$numberDays = intval($numberDays);
106-
echo $numberDays;
107-
}
108-
?>
109-
</td>
110-
</tr>
111-
112-
<?php } }?>
113-
114-
<!--end of printing -->
115-
116-
</thead>
117-
118-
119-
</table>
120-
121-
</div>

unreturnedBooks.php

+9-117
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ function printDiv(divID) {
9696
</div>
9797

9898
<style>
99-
.trsss:nth-child(2n+1){
100-
101-
background-color:#CCC;}
102-
.trsss:hover{background-color:#D5DEFF;
99+
.trsss{
100+
background-color:#FFCC99;}
101+
.trsss:hover{background-color:#F90;
103102

104103
</style>
105104
<div class="hed" id="printablediv">
@@ -116,76 +115,6 @@ function printDiv(divID) {
116115

117116
<?php }else{}
118117
?>
119-
<table width="360" border="0" align="center">
120-
<tr>
121-
<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>
122-
123-
</tr>
124-
<tr>
125-
<td style="font-size:17px; font-weight:bold; font-family:Arial, 'Arial Black', 'Arial Narrow';" align="center">T. Abella St., Cebu City</td>
126-
</tr>
127-
<tr>
128-
<td height="50" align="center" style="font-size:22px; font-family:Arial, 'Arial Black', 'Arial Narrow';">List of Unreturned Books</td>
129-
130-
</table>
131-
132-
133-
<table width="95%" bordercolor="#999999" a class="web" border="0" cellspacing="1" style=" margin-bottom:50px; margin-left:22px;font-size:12px;font-family:Verdana, Geneva, sans-serif; margin-top:20px;">
134-
<thead>
135-
<tr style="font-weight:bold; font-size:15px;" height="30">
136-
137-
<td class="web" width="100" align="center">Acc No</td>
138-
<td class="web" width="400" align="center">Boook Title</td>
139-
<td class="web" width="240" align="center">Borrowers Name</td>
140-
<td class="web" width="240" align="center">Date of Lend</td>
141-
</tr>
142-
<tr>
143-
<td colspan="4" style="border-bottom:1px #000 solid;">
144-
145-
</td>
146-
</tr>
147-
<?php include('config.php');
148-
$printcount=0;
149-
for($i=0;$i<count($_POST['checkbox']);$i++){
150-
$printcount++;
151-
$borrowid = $_POST['checkbox'][$i];
152-
153-
$sql =mysql_query("SELECT * FROM tblborrow WHERE borrowid='$borrowid'");
154-
155-
156-
while($row=mysql_fetch_array($sql)){
157-
158-
?>
159-
160-
<tr align="center" height="30">
161-
<td><?php echo $row['accNo']; ?></td>
162-
<td>
163-
<?php
164-
$qsa=mysql_query("select * from books where accNo=$row[accNo]");
165-
while($acc=mysql_fetch_array($qsa)){
166-
echo $acc['booktitle']; }?>
167-
</td>
168-
<td>
169-
<?php
170-
$qs=mysql_query("select * from tblborrower where studentid=$row[studentid]");
171-
while($title=mysql_fetch_array($qs)){
172-
echo $title['fname']."&nbsp;".$title['lname']; }?>
173-
174-
</td>
175-
<td><?php echo date_format(date_create($row['dateborrow']), 'F d, Y'); ?></td>
176-
</tr>
177-
178-
179-
180-
<!--end of printing -->
181-
<?php }
182-
}
183-
184-
?>
185-
</thead>
186-
187-
188-
</table>
189118
<?php
190119
}
191120
else{
@@ -194,16 +123,11 @@ function printDiv(divID) {
194123
<?php
195124
include('config.php');
196125

197-
$qss="SELECT * FROM tblborrow where status='Unsigned'";
198-
$rss=mysql_query($qss);
199-
200-
//
201126
?>
202127
<form action="" method="post">
203128

204129
<table border="0" style="margin-top:20px; margin-left:0;">
205130
<tr>
206-
<td rowspan="3"><img src="icons/phone_book_edit.png" height="50"></td>
207131
<tr>
208132
<td style="font-size:18px;font-family:Verdana, Geneva, sans-serif; border-bottom:#666 solid 1px; ">List of Unreturned Books</td>
209133
</tr>
@@ -215,14 +139,13 @@ function printDiv(divID) {
215139
</table>
216140

217141

218-
<table width="100%"bordercolor="#999999" class="web" border="0" cellspacing="1" style="border:#666 solid 1px; margin-bottom:20px; margin-left:0px;font-size:12px;font-family:Verdana, Geneva, sans-serif; margin-top:20px;">
142+
<table width="100%" bordercolor="#999999" class="web" border="0" cellspacing="1" style="border:#666 solid 1px; margin-bottom:20px; margin-left:0px;font-size:12px;font-family:Verdana, Geneva, sans-serif; margin-top:20px;">
219143
<thead>
220-
<tr bgcolor="#3B5998" height="30" style="color:white; font-weight:bold; text-align:left;">
221-
<td><input type="checkbox" id="selectall"/></td>
144+
<tr bgcolor="#F90" height="30" style="color:white; font-weight:bold; text-align:left;">
222145
<td>No.</td>
223-
<td class="web" width="100" align="center">Acc No</td>
224-
<td class="web" width="400" align="center">Boook Title</td>
225-
<td class="web" width="240" align="center">Borrowers Name</td>
146+
<td class="web" width="100" align="center">Card No.</td>
147+
<td class="web" width="400" align="center">Book Title</td>
148+
<td class="web" width="240" align="center">Borrower's Name</td>
226149
<td class="web" width="240" align="center">Date of Lend</td>
227150

228151

@@ -243,14 +166,11 @@ function printDiv(divID) {
243166

244167

245168
<tr class="trsss" align="center" height="25">
246-
<td>
247-
248-
<input name="checkbox[]" class="name" type="checkbox" value="<?php echo $row['borrowid']; ?>"></td>
249169
<td><?php echo $count; ?></td>
250170
<td bgcolor="" width="100">
251171
<?php
252172

253-
echo $row['accNo']; ?>
173+
echo $row['card_no']; ?>
254174
</td>
255175
<td width="400"><?php
256176
$qs= mysql_query("SELECT * from book where book_id={$row['book_id']}");
@@ -278,42 +198,14 @@ function printDiv(divID) {
278198

279199
<!--footer-->
280200

281-
<script>
282-
/* function OpenPopUp(borrowid, pageURL, title,w,h) {
283-
//alert("Pardeep")
284-
var left = (screen.width/2)-(w/2);
285-
var top = (screen.height/2)-(h/2);
286-
var targetWin = window.open('http://localhost/lib/unreturn_check.php?borrowid=' + borrowid, 'name', 'location=no,menubar=no,wiscrollbars=no,resizable=no,fullscreen=no,width='+w+', height='+h+', top='+top+', left='+left);
287-
return false;
288-
}*/
289-
290-
291-
</script>
292201
<div class="footer">
293202
<div class="leftfoot"></div>
294203
<div class="bodyfoot">
295204
<table border="0" style="margin-top:20px; font-family:Verdana, Geneva, sans-serif; font-size:10px;">
296205
<tr>
297-
<?php
298-
if(isset($_POST['print'])){ ?>
299-
<td>Print Record(s)</td>
300-
<td><input type="text" value="<?php echo $printcount; ?>" style="padding:2px; width:60px;" readonly="readonly"></td>
301-
302-
<?php }else{?>
303206
<td>Count of Unreturn Books</td>
304207
<td><input type="text" value="<?php echo $num; ?>" style="padding:2px; width:60px;" readonly="readonly"></td>
305-
<?php } ?>
306-
307-
<td>
308-
<?php
309-
if(isset($_POST['print'])){ ?>
310-
<img src="icons/print.png" height="20" style="cursor:pointer;" title="Print" onClick="javascript:printDiv('printablediv')"/>
311-
<?php }else{?>
312-
<input type="submit" value="Print Report" name="print">
313-
314208

315-
<?php } ?>
316-
</td>
317209
</tr>
318210
</table>
319211

0 commit comments

Comments
 (0)