Add enable/disablepool to miner.php example and reduce font size 1pt
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
diff --git a/miner.php b/miner.php
index b7d2f19..0ff19ab 100644
--- a/miner.php
+++ b/miner.php
@@ -10,9 +10,9 @@ $here = $_SERVER['PHP_SELF'];
?>
<html><head><title>Mine</title>
<style type='text/css'>
-td { color:blue; font-family:verdana,arial,sans; font-size:14pt; }
-td.h { color:blue; font-family:verdana,arial,sans; font-size:14pt; background:#d0ffff }
-td.sta { color:green; font-family:verdana,arial,sans; font-size:14pt; }
+td { color:blue; font-family:verdana,arial,sans; font-size:13pt; }
+td.h { color:blue; font-family:verdana,arial,sans; font-size:13pt; background:#d0ffff }
+td.sta { color:green; font-family:verdana,arial,sans; font-size:13pt; }
</style>
</head><body bgcolor=#ecffff>
<script type='text/javascript'>
@@ -229,6 +229,10 @@ function details($cmd, $list)
$section = '';
+ $poolcmd = array( 'Switch to' => 'switchpool',
+ 'Enable' => 'enablepool',
+ 'Disable' => 'disablepool' );
+
foreach ($list as $item => $values)
{
if ($item != 'STATUS')
@@ -245,7 +249,8 @@ function details($cmd, $list)
}
if ($cmd == 'pools')
- echo "<td valign=bottom class=h>Switch</td>";
+ foreach ($poolcmd as $name => $pcmd)
+ echo "<td valign=bottom class=h>$name</td>";
echo '</tr>';
@@ -258,24 +263,27 @@ function details($cmd, $list)
if ($item == 'STATUS')
continue;
+ echo '<tr>';
+
foreach ($values as $name => $value)
echo '<td>'.fmt($section, $name, $value).'</td>';
if ($cmd == 'pools')
{
- echo '<td>';
-
reset($values);
$pool = current($values);
- if ($pool === false)
- echo ' ';
- else
+ foreach ($poolcmd as $name => $pcmd)
{
- echo "<input type=button value='Pool $pool'";
- echo " onclick='prc(\"switchpool|$pool\",\"Switch to Pool $pool\")'>";
+ echo '<td>';
+ if ($pool === false)
+ echo ' ';
+ else
+ {
+ echo "<input type=button value='Pool $pool'";
+ echo " onclick='prc(\"$pcmd|$pool\",\"$name Pool $pool\")'>";
+ }
+ echo '</td>';
}
-
- echo '</td>';
}
echo '</tr>';