forked from Encrypt-S/navpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listtransactionsbyaccount.php
executable file
·46 lines (45 loc) · 1.67 KB
/
listtransactionsbyaccount.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
<?php
include ("header.php");
include ("pass.php");
$account = $_POST['account'];
$count = $_POST['count'];
$trans = $coin->listtransactions($account, (int)$count);
$x = array_reverse($trans);
?>
<p><b>The Last <?php print_r($count);?> Transactions For The Account "<?php print_r($account);?>":</b></p>
<div class="panel panel-default">
<div class="table-responsive">
<?php
echo "<table class='table-hover table-condensed table-bordered table'>
<thead><tr><th>Method</th><th>Address</th><th>Account</th><th>Amount</th><th>Confirmations</th><th>Time</th><th>Txid</th></tr></thead>";
foreach ($x as $x) {
if($x['amount'] > 0) {
$coloramount = "green";
}
else {
$coloramount = "red";
}
if($x['confirmations'] >= 6) {
$colorconfirms = "green";
}
else {
$colorconfirms = "red";
}
$date = date('D M j y g:i a', $x['time']);
echo "<tr>";
echo "<tr>";
echo "<td>" . ucfirst($x['category']) . "</td>";
echo "<td>{$x['address']}</td>
<td><div style='width:60px;overflow:hidden'>{$x['account']}</div></td>
<td><div style='width:70px;overflow:hidden'><font color='{$coloramount}'>{$x['amount']}</font></div></td>
<td><div style='width:110px;overflow:hidden'><font color='{$colorconfirms}'>{$x['confirmations']}</font></div></td>
<td>{$date}</td>
<td><div style='width:120px;overflow:hidden'>{$x['txid']}</div></td>
</tr>";
}
echo "</table>";
?>
</div>
</div>
</div>
<?php include("footer.php"); ?>