-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
108 lines (97 loc) · 4.51 KB
/
index.php
File metadata and controls
108 lines (97 loc) · 4.51 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
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
<?php require_once './lib/config.php'; require_once './lib/info.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Kulme Wallet Manager">
<meta name="author" content="Kulme">
<link rel="icon" href="./favicon.ico">
<title><?php echo $config['site_title']; ?> | Home</title>
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
<script src="./js/clipboard.min.js"></script>
<script src="./js/jquery-3.1.1.min.js"></script>
<script src="./js/ie10-viewport-bug-workaround.js"></script>
</head>
<body>
<div class="container">
<div class="header clearfix">
<nav>
<ul class="nav nav-pills float-right">
<li class="nav-item">
<a class="nav-link active" href="./index.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="./transaction_list.php">Transactions List</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./send_coins.php">Send Coins</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./dump_private_key.php">Dump Private Key</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./get_raw_transaction.php">Get Raw Transaction</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./broadcast_transaction.php">Broadcast Transaction</a>
</li>
</ul>
</nav>
<h3 class="text-muted"><?php echo $config['site_name']; ?></h3>
</div>
<div class="jumbotron">
<h1 class="display-1"><?php echo $config['coin_name']; ?> Status</h1>
<p class="borderspace"></p>
<div id="bitcoininfo">
<?php if($bitcoin->error){ echo "<p class='lead bg-warning'><strong>There was a problem while connecting to your $config[coin_name] Daemon.<br>$config[coin_name] response message: " . $bitcoin->error . "<br><br>Please fix and try again.</strong></p>"; } else { ?>
<p class="lead"><strong>Main Address: <?php echo $main_address; ?></strong></p>
<p class="lead"><strong>Balance: <?php echo $wallet_info['balance']; ?> <?php echo $config['coin_symbol']; ?><?php if ($config['show_fiat'] === true) { $bitcoin_fiat = file_get_contents($price_url); echo " | ". $bitcoin_fiat; } ?></strong></p>
<p class="lead"><strong>Unconfirmed Balance: <?php echo $wallet_info['unconfirmed_balance']; ?> <?php echo $config['coin_symbol']; ?></strong></p>
<p class="lead"><strong>Total Transactions: <?php echo $wallet_info['txcount']; ?></strong></p>
<p class="lead"><strong>Connections: <?php echo $total_connection; ?></strong></p>
<p class="lead"><strong>Total Transactions in Memory Pool: <?php echo $mempool_total['size']; ?></strong></p>
<p class="lead"><strong>Blocks Height: <?php echo $blockchain_info['blocks']; ?></strong></p>
<p class="lead"><strong>Blockchain Height: <?php echo $blockchain_info['headers']; ?></strong></p>
<p class="lead"><strong>Network Sent: <?php echo convert_byte($byte_recv_sent_info['totalbytessent']); ?></strong></p>
<p class="lead"><strong>Network Received: <?php echo convert_byte($byte_recv_sent_info['totalbytesrecv']); ?></strong></p>
</div>
<p class="lead"><a class="btn btn-outline-primary" onclick="NewAddress()" role="button">Generate New Address</a></p>
<p id="newaddress" class="lead"></p>
<?php } ?>
</div>
<script>
function coininfo(){
$("#bitcoininfo").load("./lib/reload.php");
}
setInterval(function(){coininfo()}, 5000);
</script>
<script>
var clipboard = new Clipboard('.btn');
clipboard.on('success', function(e) {
console.log(e);
});
clipboard.on('error', function(e) {
console.log(e);
});
</script>
<script>
function NewAddress() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
document.getElementById("newaddress").innerHTML = xhttp.responseText;
}
};
xhttp.open("GET", "lib/new_address.php", true);
xhttp.send();
}
</script>
<footer class="footer">
<p>© <?php echo $config['site_name']; ?> 2016 <?php if ($config['show_github'] === true) { echo "| <a href='https://github.com/Kulme/Wallet-Manager' target='_blank' class='text-primary'>Wallet Manager</a>"; } ?></p>
</footer>
</div>
</body>
</html>