-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtransactions.php
More file actions
69 lines (59 loc) · 2 KB
/
transactions.php
File metadata and controls
69 lines (59 loc) · 2 KB
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
<?php
require "includes/nav-header.php";
$dirPage = 'transactions.php';
$stkData = $user->getTransReport('stock');
$moneyData = $user->getTransReport('money');
?>
<div id="trans-selector">
<span id="stk-btn">Stocks</span>
<span id="money-btn">Money</span>
</div>
<div id="stock-trans-tab">
<?php
if(sizeof($stkData) == 0) {
echo "<h3 style=\"text-align:center;\">no stocks purchased yet</h3>";
} else {
echo '
<table class="table">
<thead>
<th>Type</th>
<th>Symbol</th>
<th>Qty</th>
<th>Unit Price</th>
<th>Total</th>
<th>Date</th>
</thead>
<tbody>
';
foreach($stkData as $stockTransInfo) {
echo $stockTransInfo;
}
echo '</tbody></table>';
}
?>
</div>
<div id="money-trans-tab">
<?php
if(sizeof($moneyData) == 0) {
echo "<h3 style=\"text-align:center;\">no monetary transactions yet made</h3>";
} else {
echo '
<table class="table">
<thead>
<th>Type</th>
<th>Amount</th>
<th>Date</th>
</thead>
<tbody>
';
foreach($moneyData as $moneyTransInfo) {
echo $moneyTransInfo;
}
echo '</tbody></table>';
}
?>
</div>
<script src="js/trans.js"></script>
<?php
require "includes/footer.php";
?>