Esempio n. 1
0
function process_debug_info($host_data)
{
    global $debug_param_arr;
    $arr = array('command' => 'debug', 'parameter' => '');
    $debug_arr = send_request_to_host($arr, $host_data);
    $output = '<tr>';
    foreach ($debug_param_arr as $param) {
        $output .= "<th> {$param} </th>";
    }
    $output .= '</tr></tr>';
    foreach ($debug_param_arr as $param) {
        if ($debug_arr['DEBUG']['0'][$param]) {
            $checked = 'checked';
        } else {
            $checked = '';
        }
        $output .= "<td><input type='checkbox' value={$param} name={$param} {$checked} ></td>";
    }
    $output .= "<tr><th colspan=7>Select debug level and click submit, or click default to reset to defaults &nbsp; \n  \t            <button type='submit' name='debug_submit' value='debug'>Submit</button>\n  \t            <button type='submit' name='default_submit' value='debug'>Default</button>\n  \t            </th><tr>";
    return $output;
}
Esempio n. 2
0
                        $gpu_response[1] = send_request_to_host($arr, $host_data);
                        $value_changed = true;
                    }
                    if (isset($_POST['gpuvolt_chk'])) {
                        $arr = array('command' => 'gpuvddc', 'parameter' => $dev . ',' . $_POST['gpuvolt_dro']);
                        $gpu_response[2] = send_request_to_host($arr, $host_data);
                        $value_changed = true;
                    }
                    if (isset($_POST['gpufan_chk'])) {
                        $arr = array('command' => 'gpufan', 'parameter' => $dev . ',' . $_POST['gpufan_dro']);
                        $gpu_response[3] = send_request_to_host($arr, $host_data);
                        $value_changed = true;
                    }
                    if (isset($_POST['intensity_chk'])) {
                        $arr = array('command' => 'gpuintensity', 'parameter' => $dev . ',' . $_POST['intensity_dro']);
                        $gpu_response[4] = send_request_to_host($arr, $host_data);
                        $value_changed = true;
                    }
                }
            }
            /* wait a couple of seconds if a change occured */
            if ($value_changed) {
                sleep(2);
            }
        }
        $gpu_data_array = get_dev_data($host_data, $dev, $type);
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Esempio n. 3
0
                db_error();
                $arr = array('command' => 'save', 'parameter' => $conf_path);
                $pool_response = send_request_to_host($arr, $host_data);
                sleep(2);
                // as host data is updated, re-load it.
                $host_data = get_host_data($id);
            }
            if (isset($_POST['restartbut']) && isset($_POST['restartchk'])) {
                $arr = array('command' => 'restart', 'parameter' => '');
                send_request_to_host($arr, $host_data);
                $host_alive = FALSE;
                sleep(2);
            }
            if (isset($_POST['quitbut']) && isset($_POST['quitchk'])) {
                $arr = array('command' => 'quit', 'parameter' => '');
                send_request_to_host($arr, $host_data);
                $host_alive = FALSE;
                sleep(2);
            }
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Anubis - a cgminer web frontend</title>

<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
Esempio n. 4
0
            }
            if (isset($_POST['default_submit'])) {
                $arr = array('command' => 'debug', 'parameter' => 'Normal');
                $debug_response[$index++] = send_request_to_host($arr, $host_data);
                $wait = true;
            }
            if (isset($_POST['flashpga'])) {
                $pga_id = filter_input(INPUT_POST, 'flashpga', FILTER_SANITIZE_NUMBER_INT);
                $arr = array('command' => 'pgaidentify', 'parameter' => $pga_id);
                $dev_response = send_request_to_host($arr, $host_data);
                $wait = true;
            }
            if (isset($_POST['flashasc'])) {
                $asc_id = filter_input(INPUT_POST, 'flashasc', FILTER_SANITIZE_NUMBER_INT);
                $arr = array('command' => 'ascidentify', 'parameter' => $asc_id);
                $dev_response = send_request_to_host($arr, $host_data);
                $wait = true;
            }
            if ($wait) {
                sleep(2);
            }
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Anubis - a cgminer web frontend</title>