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; }
@@ -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 = ' | |||||
'; + foreach ($basic as $head) + echo " | $head | "; - if ($i == 0) - echo 'GPU'; - else - echo ' '; - - echo ''; - } + foreach ($options as $name => $des) + echo "$des | "; + $n = 0; for ($c = 0; $c < $count; $c++) { echo '|||
$c | "; - echo ""; - echo " | "; - echo " | "; + foreach ($basic as $name) + { + echo ' | '; + + if ($name == 'GPU') + echo $c; + else + { + echo ""; + } + + echo ' | '; + } + + foreach ($options as $name => $des) + { + echo ''; + if (!isset($devs["GPU$c"][$des])) + echo ' '; + else + { + $value = $devs["GPU$c"][$des]; + echo ""; + echo ""; + $n++; + } + + echo ' | '; + } + } echo '