|
12 | 12 | <?php
|
13 | 13 | include('config.php');
|
14 | 14 | if(isset($_GET['borrowid'])){
|
15 |
| - |
16 |
| - $q=mysql_query("select * from tblborrow where borrowid='".$_GET['borrowid']."'"); |
17 |
| - |
| 15 | + |
| 16 | + $q=mysql_query("select * from book_loans where loan_id='".$_GET['borrowid']."'"); |
| 17 | + |
18 | 18 | $name=mysql_fetch_array($q)or die(mysql_error());
|
19 | 19 |
|
20 | 20 | }
|
|
31 | 31 | <input type="text" readonly="readonly" name="borrowersid" style="padding:4px; width:250px;" value="<?php echo $name['studentid']; ?>"><br/>
|
32 | 32 | </td></tr>
|
33 | 33 | <?php
|
34 |
| -$q=mysql_query("select * from tblborrower where studentid='".$name['studentid']."'"); |
35 |
| - |
| 34 | +$q=mysql_query("select * from borrower where card_no='".$name['card_no']."'"); |
| 35 | + |
36 | 36 | $id=mysql_fetch_array($q)or die(mysql_error());
|
37 |
| - |
| 37 | + |
38 | 38 | ?>
|
39 | 39 | <tr><td>
|
40 | 40 | Borrowers Name:
|
|
50 | 50 | </td><td>
|
51 | 51 | <input type="text" readonly="readonly" name="datedue" style="padding:4px; width:250px;" value="<?php echo date_format(date_create($name['duedate']), 'F d Y'); ?>" />
|
52 | 52 | </td></tr>
|
53 |
| -<?php |
| 53 | +<?php |
54 | 54 |
|
55 | 55 | include('config.php');
|
56 | 56 | $sql="SELECT * FROM tblpayment";
|
|
94 | 94 | </td></tr>
|
95 | 95 | <tr><td>
|
96 | 96 | Php
|
97 |
| -</td> |
| 97 | +</td> |
98 | 98 | <td><input type="text" readonly="readonly" value="<?php echo number_format($numberDays*$rowpay['amount'],2); ?>"></td></tr>
|
99 | 99 | </table>
|
100 | 100 |
|
|
108 | 108 |
|
109 | 109 | <?php
|
110 | 110 | if(isset($_POST['resibo'])){
|
111 |
| - |
| 111 | + |
112 | 112 | /*$borrowersid=$_POST['borrowersid'];
|
113 | 113 | $datedue=$_POST['datedue'];
|
114 | 114 | $datereturn=$_POST['datereturn'];
|
115 | 115 | $totaldays=$_POST['totaldays'];
|
116 | 116 | $total=$_POST['total'];
|
117 |
| - |
| 117 | +
|
118 | 118 | $sql="insert into tblreciept (borrowersid,datedue,datereturn,totaldays,totalpay) values(
|
119 | 119 | '".$borrowersid."',
|
120 | 120 | '".$datedue."',
|
121 | 121 | '".$datereturn."',
|
122 | 122 | '".$totaldays."',
|
123 | 123 | '".$total."'
|
124 | 124 | )";
|
125 |
| - |
| 125 | +
|
126 | 126 | $pay=mysql_query($sql) or die (mysql_error());
|
127 |
| - if($pay){*/ |
128 |
| - |
| 127 | + if($pay){*/ |
| 128 | + |
129 | 129 | ?>
|
130 | 130 |
|
131 | 131 | <script>
|
132 |
| -$(document).ready(function(){ |
| 132 | +$(document).ready(function(){ |
133 | 133 | $("#div5").fadeIn(1000);
|
134 |
| - |
135 | 134 |
|
136 |
| - |
| 135 | + |
| 136 | + |
137 | 137 | });
|
138 | 138 | </script>
|
139 |
| - <?php |
| 139 | + <?php |
140 | 140 | // }
|
141 | 141 | ?>
|
142 |
| - |
143 |
| - |
| 142 | + |
| 143 | + |
144 | 144 | <?php
|
145 | 145 | }
|
146 | 146 | if(isset($_GET['print/save'])){?>
|
147 | 147 | <script>
|
148 |
| -$(document).ready(function(){ |
| 148 | +$(document).ready(function(){ |
149 | 149 | $("#div5").fadeIn(1000);
|
150 |
| - |
151 | 150 |
|
152 |
| - |
| 151 | + |
| 152 | + |
153 | 153 | });
|
154 | 154 | </script>
|
155 | 155 | <?php
|
156 | 156 | }
|
157 | 157 | ?>
|
158 | 158 |
|
159 | 159 |
|
160 |
| -<?php |
| 160 | +<?php |
161 | 161 | /*if(isset($_POST['pay'])){
|
162 |
| - include('config.php'); |
| 162 | + include('config.php'); |
163 | 163 | $borrowersid=$_POST['borrowersid'];
|
164 | 164 | $datedue=$_POST['datedue'];
|
165 | 165 | $datereturn=$_POST['datereturn'];
|
|
174 | 174 | '".$totaldays."',
|
175 | 175 | '".$total."'
|
176 | 176 | )";
|
177 |
| - |
| 177 | +
|
178 | 178 | $pay=mysql_query($sql) or die (mysql_error());
|
179 | 179 | if($pay){
|
180 | 180 | echo "success";
|
|
0 commit comments