-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathethermine.php
67 lines (67 loc) · 3.08 KB
/
ethermine.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
<?php
include 'includes/constant.php';
include 'classes/Etherminecontent.php';
$ethermine = new Etherminecontent();
$dash_values = $ethermine->showContents(1,'');
$miner_values = $ethermine->showContents(2,'');
$countarray = count($miner_values);
?>
<?php include_once('includes/header.php'); ?>
<?php include_once('includes/header-menu.php'); ?>
<hr>
<div id="active_workers">
<div class="row">
<div class="col-sm-3">
<div class="card text-white bg-info mb-3">
<div class="card-body">
<h5 class="card-title text-center">Hash Rates</h5>
<h3 class="card-text text-center"><?php echo '<span data-toggle="tooltip" data-placement="bottom" title="Reported Hashrate">'.$ethermine::getHashRate($dash_values["currentStatistics"]["reportedHashrate"],1,2) . '</span><span data-toggle="tooltip" data-placement="bottom" title="Your effective current hashrate">' ." " . $ethermine::getHashRate($dash_values["currentStatistics"]["currentHashrate"],1,2).'</span>'; ?></h3>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="card text-white bg-success mb-3">
<div class="card-body">
<h5 class="card-title text-center">Active Workers</h5>
<h3 class="card-text text-center"><?php echo $dash_values["currentStatistics"]["activeWorkers"]; ?></h3>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="card text-white bg-warning mb-3">
<div class="card-body">
<h5 class="card-title text-center">Unpaid Balance</h5>
<h3 class="card-text text-center"><?php echo $ethermine::getUnpaidValue($dash_values["currentStatistics"]["unpaid"]); ?></h3>
</div>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">Name</th>
<th scope="col">Reported Hash Rate</th>
<th scope="col">Current Hash Rate</th>
<th scope="col">Average Hash Rate</th>
<th scope="col">Last Seen</th>
</tr>
</thead>
<tbody>
<?php
for($cnt = 0;$cnt < $countarray;$cnt++) {
echo "<tr>";
$result = $miner_values[$cnt];
echo '<td><a href="riginfo.php?worker='.$result["worker"].'">'.$result["worker"].'</a></td>';
echo "<td>".$ethermine::getHashRate($result["reportedHashrate"],1,1)."</td>";
echo "<td class='hashes'>".$ethermine::getHashRate($result["currentHashrate"],1,1)."</td>";
echo "<td>".$ethermine::getHashRate($result["averageHashrate"],1,1)."</td>";
echo "<td>". $ethermine::lastSeen(date('Y-m-d H:i',$result["lastSeen"])) ."</td>";
echo "</tr>";
?>
<?php } ?>
</tbody>
</table>
</div>
<?php include_once('includes/footer.php'); ?>