diff --git a/miner.php b/miner.php index 763c0228..8ba2b4ea 100644 --- a/miner.php +++ b/miner.php @@ -18,6 +18,7 @@ td.sta { color:green; font-family:verdana,arial,sans; font-size:14pt; } '; echo $tb.''; - for ($i = 0; $i < 4; $i++) - { - echo '"; - if ($i == 0) - echo 'GPU'; - else - echo ' '; - - echo ''; - } + foreach ($options as $name => $des) + echo ""; + $n = 0; for ($c = 0; $c < $count; $c++) { echo ''; - echo ""; - echo ""; - echo ""; - echo ""; + foreach ($basic as $name) + { + echo ''; + } + + foreach ($options as $name => $des) + { + echo ''; + } + } echo ''.$te; @@ -315,7 +355,7 @@ function processgpus($rd, $ro) # function process($cmds, $rd, $ro) { - global $error; + global $error, $devs; foreach ($cmds as $cmd => $des) { @@ -331,6 +371,8 @@ function process($cmds, $rd, $ro) { details($process); echo ''; + if ($cmd == 'devs') + $devs = $process; } } } @@ -356,7 +398,8 @@ function display() $cmds = array( 'devs' => 'device list', 'summary' => 'summary information', - 'pools' => 'pool list'); + 'pools' => 'pool list', + 'config' => 'cgminer config'); process($cmds, $rd, $ro);
@@ -156,6 +157,9 @@ function fmt($section, $name, $value) switch ($section.'.'.$name) { + case 'GPU0.Last Share Time': + return date('H:i:s', $value); + break; case 'SUMMARY.Elapsed': $s = $value % 60; $value -= $s; @@ -258,33 +262,69 @@ function details($list) echo $te; } # -function gpubuttons($count) +global $devs; +$devs = null; +# +function gpubuttons($count, $info) { + global $devs; + + $basic = array( 'GPU', 'Enable', 'Disable', 'Restart' ); + + $options = array( 'intensity' => 'Intensity', + 'fan' => 'Fan Percent', + 'engine' => 'GPU Clock', + 'mem' => 'Memory Clock', + 'vddc' => 'GPU Voltage' ); + $tb = '
'; $te = '
'; + foreach ($basic as $head) + echo "$head$des
$c'; + + if ($name == 'GPU') + echo $c; + else + { + echo ""; + } + + echo ''; + if (!isset($devs["GPU$c"][$des])) + echo ' '; + else + { + $value = $devs["GPU$c"][$des]; + echo ""; + echo ""; + $n++; + } + + echo '