function doOne($rig, $preprocess) { global $haderror, $readonly, $notify, $rigs; global $placebuttons; if ($placebuttons == 'top' || $placebuttons == 'both') { pagebuttons($rig, null); } if ($preprocess != null) { process(array($preprocess => $preprocess), $rig); } $cmds = array('devs' => 'device list', 'summary' => 'summary information', 'pools' => 'pool list'); if ($notify) { $cmds['notify'] = 'device status'; } $cmds['config'] = 'cgminer config'; process($cmds, $rig); if ($haderror == false && $readonly === false) { processgpus($rig); } if ($placebuttons == 'bot' || $placebuttons == 'both') { pagebuttons($rig, null); } }
function display() { global $error; $error = null; $rd = '<font color=red><b>'; $ro = '</b></font>'; echo "<tr><td><table cellpadding=0 cellspacing=0 border=0><tr><td>"; echo "<input type=button value='Refresh' onclick='pr(\"\",null)'>"; echo "</td><td width=100%> </td><td>"; echo "<input type=button value='Quit' onclick='prc(\"quit\",\"Quit CGMiner\")'>"; echo "</td></tr></table></td></tr>"; $arg = trim(getparam('arg', true)); if ($arg != null and $arg != '') { process(array($arg => $arg), $rd, $ro); } $cmds = array('devs' => 'device list', 'summary' => 'summary information', 'pools' => 'pool list', 'config' => 'cgminer config'); process($cmds, $rd, $ro); if ($error == null) { processgpus($rd, $ro); } }