write_log("Auto Transfer Task ({$tx_name}) Has Completed.", "T"); } } } // One Shot Amount Match Transfer if ($tx_type == "repeatamount") { $tx_key3 = find_string("---key3=", "---amount", $sql_row["field_data"]); $tx_key3 = mysql_result(mysql_query("SELECT field_data FROM `my_keys` WHERE `field_name` = '{$tx_key3}' LIMIT 1"), 0, 0); $tx_amount = find_string("---amount=", "---amount_match", $sql_row["field_data"]); $amount_match = find_string("---amount_match=", "---end", $sql_row["field_data"]); // Only check once per transaction cycle or otherwise it will just make a transfer every time it scans // Check allowed 180 seconds before and 60 seconds after transaction cycle. if (transaction_cycle(1) - time() > 180 && time() - transaction_cycle(0) >= 60) { if (check_crypt_balance($tx_key2) >= $amount_match) { // Create Transaction if (send_timekoins($tx_key1, $tx_key2, $tx_key3, $tx_amount, NULL) == TRUE) { write_log("Auto Transfer Task ({$tx_name}) Has Completed.", "T"); } } } } // Repeating Amount Match Transfer } // Check if enabled } // Looping through all task // Idle State mysql_query("UPDATE `main_loop_status` SET `field_data` = '2' WHERE `main_loop_status`.`field_name` = 'autotransfer.php' LIMIT 1"); sleep(AUTOCHECK); } // Infinite Loop :)
$current_balance = db_cache_balance($my_public_key); if ($send_amount > $current_balance) { // Can't send this much silly $display_balance = db_cache_balance($my_public_key); $body_string = send_receive_body($public_key_64); $body_string .= '<hr><font color="red"><strong>This exceeds your current balance, send failed...</strong></font><br><br>'; } else { if ($my_public_key == $public_key_to) { // Can't send to yourself $display_balance = db_cache_balance($my_public_key); $body_string = send_receive_body(); $body_string .= '<hr><font color="red"><strong>Can Not send to yourself, send failed...</strong></font><br><br>'; } else { // Now it's time to send the transaction $my_private_key = my_private_key(); if (send_timekoins($my_private_key, $my_public_key, $public_key_to, $send_amount, $message) == TRUE) { $display_balance = db_cache_balance($my_public_key); $body_string = send_receive_body($public_key_64, $send_amount); $body_string .= '<hr><font color="green"><strong>You just sent ' . $send_amount . ' timekoins to the above public key.</strong></font><br> <font color="blue"><strong>Your balance will not reflect this until the transaction is recorded across the entire network.</strong></font><br><br>'; } else { $display_balance = db_cache_balance($my_public_key); $body_string = send_receive_body($public_key_64, $send_amount); $body_string .= '<hr><font color="red"><strong>Send failed...</strong></font><br><br>'; } } // End duplicate self check } // End Balance Check } else { if ($_GET["easykey"] == "grab") {