예제 #1
0
 $sha_hardware = check_post($_POST["sha_hardware"], $sha_hardware);
 $scrypt_hardware = check_post($_POST["scrypt_hardware"], $scrypt_hardware);
 $skein_hardware = check_post($_POST["skein_hardware"], $skein_hardware);
 $groestl_hardware = check_post($_POST["groestl_hardware"], $groestl_hardware);
 $qubit_hardware = check_post($_POST["qubit_hardware"], $qubit_hardware);
 $sha_poolfee = check_post($_POST["sha_poolfee"], $sha_poolfee);
 $scrypt_poolfee = check_post($_POST["scrypt_poolfee"], $scrypt_poolfee);
 $skein_poolfee = check_post($_POST["skein_poolfee"], $skein_poolfee);
 $groestl_poolfee = check_post($_POST["groestl_poolfee"], $groestl_poolfee);
 $qubit_poolfee = check_post($_POST["qubit_poolfee"], $qubit_poolfee);
 $power_cost = check_post($_POST["power_cost"], $power_cost);
 $myr_price = check_post($_POST["myr_price"], $myr_price);
 $btc_price = check_post($_POST["btc_price"], $btc_price);
 $coins_per_block = check_post($_POST["coins_per_block"], $coins_per_block);
 $results = calculate();
 if (search_ip_address($user_array, $ip) >= 0) {
     update_user($ip, $sha_hashrate, $scrypt_hashrate, $skein_hashrate, $groestl_hashrate, $qubit_hashrate, $sha_power, $scrypt_power, $skein_power, $groestl_power, $qubit_power, $sha_hardware, $scrypt_hardware, $skein_hardware, $groestl_hardware, $qubit_hardware, $sha_poolfee, $scrypt_poolfee, $skein_poolfee, $groestl_poolfee, $qubit_poolfee, $power_cost);
 } else {
     add_user($ip, $sha_hashrate, $scrypt_hashrate, $skein_hashrate, $groestl_hashrate, $qubit_hashrate, $sha_power, $scrypt_power, $skein_power, $groestl_power, $qubit_power, $sha_hardware, $scrypt_hardware, $skein_hardware, $groestl_hardware, $qubit_hardware, $sha_poolfee, $scrypt_poolfee, $skein_poolfee, $groestl_poolfee, $qubit_poolfee, $power_cost);
 }
 if ($_POST["clear"]) {
     $diff = get_avg_diffs($avg);
     $average_string = "(24 hr average)";
     $sha_diff = number_format($diff[0], 2, '.', '');
     $scrypt_diff = number_format($diff[1], 2, '.', '');
     $skein_diff = number_format($diff[2], 2, '.', '');
     $groestl_diff = number_format($diff[3], 2, '.', '');
     $qubit_diff = number_format($diff[4], 2, '.', '');
     $sha_hashrate = "";
     $scrypt_hashrate = "";
     $skein_hashrate = "";
예제 #2
0
     $groestl_hashrate = 1;
     $groestl_input = "";
 } else {
     $groestl_hashrate = $_POST["groestl"];
     $groestl_input = $groestl_hashrate;
 }
 if (is_numeric($_POST["qubit"]) == false or empty($_POST["qubit"])) {
     $qubit_hashrate = 1;
     $qubit_input = "";
 } else {
     $qubit_hashrate = $_POST["qubit"];
     $qubit_input = $qubit_hashrate;
 }
 calculate_profit($sha_hashrate, $scrypt_hashrate, $skein_hashrate, $groestl_hashrate, $qubit_hashrate);
 if ($sha_hashrate != $users[$user_position_in_array]->get_sha_hashrate() or $scrypt_hashrate != $users[$user_position_in_array]->get_scrypt_hashrate() or $skein_hashrate != $users[$user_position_in_array]->get_skein_hashrate() or $groestl_hashrate != $users[$user_position_in_array]->get_groestl_hashrate() or $qubit_hashrate != $users[$user_position_in_array]->get_qubit_hashrate()) {
     if (search_ip_address($filename, $users, $ip) >= 0) {
         remove_user($filename, $users, $user_position_in_array);
         file_put_contents($filename, "ip: " . $ip . "\n" . "sha: " . $sha_hashrate . "\n" . "scrypt: " . $scrypt_hashrate . "\n" . "skein: " . $skein_hashrate . "\n" . "groestl: " . $groestl_hashrate . "\n" . "qubit: " . $qubit_hashrate . "\n" . $separator . "\n", FILE_APPEND);
     }
 } else {
 }
 if ($_POST["refresh_values"]) {
     scrape("http://birdonwheels5.no-ip.org:3000/status", "scrape.html");
     $diff = getDifficulties("scrape.html");
     $sha_diff = number_format($diff[0], 2, '.', ',');
     $sha_net_hashrate = number_format($diff[0] / 34.92331797 / 1000, 2, '.', ',');
     $scrypt_diff = number_format($diff[1], 2, '.', ',');
     $scrypt_net_hashrate = number_format($diff[1] / 34.92331797, 2, '.', ',');
     $skein_diff = number_format($diff[2], 2, '.', ',');
     $skein_net_hashrate = number_format($diff[2] / 34.92331797, 2, '.', ',');
     $groestl_diff = number_format($diff[3], 2, '.', ',');