/
special_mnt.php
96 lines (88 loc) · 2 KB
/
special_mnt.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
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-body">
<div class="form-group col-xs-3">
<label for="start_date">Start Date</label>
<input type="date" class="form-control" id="start_date">
</div>
<div class="form-group col-xs-3">
<label for="end_date">End Date</label>
<input type="date" class="form-control" id="end_date">
</div>
<div class="form-group col-xs-2">
<label for="withdraw"></label>
<button class="form-control" id="gens">Generate</button>
</div>
</div></div></div></div>
<div id="content">
<div class="box">
<div class="box-body no-padding">
<table class="table">
<thead>
<tr>
<td>
<strong><h4>SPECIAL SAVINGS MONTHLY REPORT</h4></strong>
</td>
</tr>
</thead>
<tr>
<th>
Total Number Deposits
</th>
<td><?php echo thrift_special_mnt(2)[0]; ?></td>
</tr>
<tr>
<th>
Total Amount Deposited
</th>
<td><?php echo thrift_special_mnt(2)[1]; ?></td>
</tr>
<tr>
<th>
Total Number of Accounts Opened
</th>
<td><?php echo thrift_special_mnt(2)[2]; ?></td>
</tr>
</table>
</div>
</div>
</div>
<?php
$date = date("Y-m-d");
$date =split('-', $date);
$date = $date[0] . "-" . $date['1'];
$arr = [0,0,0,0];
$result = query("SELECT * FROM deposit WHERE acct_type='2' AND date LIKE '$date-%' ORDER BY date");
$body = '';
$i = 0;
while($row = mysql_fetch_array($result)){
$date = $row['date'];
$acct_no = $row['acct_no'];
++$i;
$amount1 = $row['amount'];
// $amount += $row['amount'];
$body .= "<tr>
<td>$i</td>
<td><a href=index.php?page=../dep_witd&id=$acct_no> $acct_no</a></td>
<td>$amount1</td>
<td>$date</td>
</tr>";
}
$table_top = "
<div class=box>
<div class=box-body no-padding>
<table class=table id=tableentry>
<thead>
<tr>
<th>S/N</th>
<th>ACCT NO</th>
<th>AMOUNT</th>
<th>DATE</th>
</tr>
</thead>
<tbody>";
$end = "</tbody></table></div></div>";
$htm = $table_top . $body . $end;
echo $htm;
?>