-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpopuppenalty.php
executable file
·176 lines (129 loc) · 5.01 KB
/
popuppenalty.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
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
<title>Payment</title>
<script>
function printDiv(divID) {
//Get the HTML of div
var divElements = document.getElementById(divID).innerHTML;
//Get the HTML of whole page
var oldPage = document.body.innerHTML;
//Reset the page's HTML with div's HTML only
document.body.innerHTML =
"<nav>" +
divElements + "</nav>";
//Print Page
window.print();
//Restore orignal HTML
document.body.innerHTML = oldPage;
}
</script>
<img src="icons/print.png" height="20" style="cursor:pointer;" title="Print" onClick="javascript:printDiv('print')"/>
<div id="print" >
<?php
include('config.php');
$sql="SELECT * FROM tblreciept where borrowid='".$_GET['borrowid']."'";
$rs=mysql_query($sql);
$rowpay=mysql_fetch_array($rs);
$sqls="SELECT * FROM tblborrower where studentid='".$rowpay['studentid']."'";
$rss=mysql_query($sqls);
$print=mysql_fetch_array($rss);
$bok="SELECT * FROM books where accNo='".$rowpay['accNo']."'";
$r=mysql_query($bok);
$book=mysql_fetch_array($r);
$b="SELECT * FROM tblborrow where accNo='".$rowpay['accNo']."'";
$rsss=mysql_query($b);
$am=mysql_fetch_array($rsss);
?>
<div style="font-size:15px;padding-top:20px; width:380px; height:303px; margin-right:10px; margin-left:10px; font-family:Arial, Helvetica, sans-serif;">
<img src="images/st mary.png" height="200" style=" margin-left:80px; margin-top:50px;position:absolute; opacity:0.1;" />
<span style="font-weight:bold; font-size:12px; color:#3B5998;">St. Mary's Academy of San Nicolas</span><br/>
<span style="font-size:11px; color:#3B5998;">T. Abella St., Cebu City</span><br/>
<span style="font-size:11px; color:#3B5998;">Tel. No. (63) (32) 286-5875</span><br/>
<div style="font-weight:bold; width:100%; font-size:12px; margin-top:10px; border-bottom:1px solid #3B5998;"></div>
<div style=" margin-top:8px; width:230px; float:left;">
<table border="0">
<tr>
<td><span style="font-size:11px; color:#3B5998;">Recieved from:</span></td>
<td style="font-size:11px;"><?php echo $print['lname']." ".$print['fname']." ".$print['mi'];?></td>
</tr>
<tr>
<td style="font-size:11px; color:#3B5998;">Year/level Section:</td>
<td style="font-size:11px;"><?php
if($print['levelyr']==1){
echo "1st Year";
}
elseif($print['levelyr']==2){
echo "2nd Year";
}
elseif($print['levelyr']==3){
echo "3rd Year";
}
elseif($print['levelyr']==4){
echo "4th Year";
}
echo " ".$print['section'];?></td>
</tr>
<tr>
<td style="font-size:11px; color:#3B5998;">The sum of PESOS:</td>
<td style="font-size:11px;"><?php echo "Php"." ".$rowpay['totalpay']; ?></td>
</tr>
</table>
</div>
<div style=" height:60px; margin-top:8px; width:150px; float:left;">
<table border="0">
<tr>
<td><span style="font-size:11px; color:#3B5998;">Date:</span></td>
<td style="font-size:11px;"><?php echo date('m/d/Y') ?></td>
</tr>
<tr>
<td style="font-size:11px;color:#3B5998;">Borrowers ID:</td>
<td style="font-size:11px;"><?php echo $print['studentid']; ?></td>
</tr>
</table>
</div>
<div style=" width:380px; float:left; margin-top:10px;">
<table border="0" cellspacing="1" width="380">
<tr>
<tr>
<td colspan="3" style="border-top:1px #3B5998 solid;"></td>
</tr>
<td style="color:#3B5998; border-right:1px #666 solid;font-size:11px; font-weight:bold;" align="center" colspan="2">Particulars</td>
<td width="100" style="font-size:11px; font-weight:bold;color:#3B5998;" align="center">Amount</td>
</tr>
<tr>
<td colspan="3" style="border-top:1px #3B5998 solid;"></td>
</tr>
<tr>
<td style="font-size:11px;" width="180"><?php echo $book['booktitle']; ?></td>
<td style="font-size:11px;" align="right"><?php echo $am['amount']; ?></td>
<td style="font-size:11px;" align="right"><?php echo $am['amount']; ?></td>
</tr>
<tr>
<td style="font-size:11px; font-weight:bold;" width="180">Total of days</td>
<td style="font-size:11px;" align="right"><?php echo $rowpay['totaldays']; ?></td>
<td style="font-size:11px;" align="right"><?php echo $rowpay['totaldays']; ?></td>
</tr>
<tr>
<td style="font-size:11px; font-weight:bold;" width="180">Total</td>
<td style="font-size:11px;" align="right"><?php echo number_format($rowpay['totalpay'],2); ?></td>
<td style="font-size:11px;" align="right"><?php echo number_format($rowpay['totalpay'],2); ?></td>
</tr>
</table>
</div>
<div style=" width:380px; margin-bottom:30px; float:left; margin-top:10px;">
<table border="0" cellspacing="1" width="380">
<tr>
<td colspan="3" style="border-top:1px #3B5998 solid;"></td>
</tr>
</table>
</div>
<span style="font-weight:bold;color:#3B5998; text-align:center; font-size:12px;">
<table border="0" cellspacing="1" style="border-top:1px #3B5998 solid; float:left;margin-top:3px;" width="200">
<tr>
<td colspan="3" ></td>
</tr>
<tr>
<td colspan="3">Librarian</td>
</tr>
</table>|
</span>
</div>
</div>