function autotx_home() { $default_public_key_font = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'public_key_font_size' LIMIT 1"), 0, "field_data"); $sql = "SELECT * FROM `options` WHERE `field_name` LIKE 'auto_currency_transfer_%' ORDER BY `options`.`field_name` ASC"; $sql_result = mysql_query($sql); $sql_num_results = mysql_num_rows($sql_result); $plugin_output; for ($i = 0; $i < $sql_num_results; $i++) { $sql_row = mysql_fetch_array($sql_result); $tx_record_name = $sql_row["field_name"]; $tx_name = find_string("---name=", "---enable", $sql_row["field_data"]); $tx_enable = intval(find_string("---enable=", "---type", $sql_row["field_data"])); $tx_type = find_string("---type=", "---key1", $sql_row["field_data"]); $tx_key2 = find_string("---key2=", "---key3", $sql_row["field_data"]); $tx_key2 = base64_encode(mysql_result(mysql_query("SELECT field_data FROM `my_keys` WHERE `field_name` = '{$tx_key2}' LIMIT 1"), 0, 0)); if ($tx_type == "onedelay") { $tx_key3 = find_string("---key3=", "---delay", $sql_row["field_data"]); $tx_key3 = base64_encode(mysql_result(mysql_query("SELECT field_data FROM `my_keys` WHERE `field_name` = '{$tx_key3}' LIMIT 1"), 0, 0)); $tx_delay = find_string("---delay=", "---amount", $sql_row["field_data"]); $tx_amount = find_string("---amount=", "---end", $sql_row["field_data"]); $tx_type = "One Time<br>Delay"; if ($tx_delay == 0) { $tx_conditions = "Finished"; } else { $tx_conditions = tk_time_convert($tx_delay) . " Remain"; } } if ($tx_type == "repeatdelay") { $tx_key3 = find_string("---key3=", "---delay_start", $sql_row["field_data"]); $tx_key3 = base64_encode(mysql_result(mysql_query("SELECT field_data FROM `my_keys` WHERE `field_name` = '{$tx_key3}' LIMIT 1"), 0, 0)); $tx_delay = find_string("---delay=", "---amount", $sql_row["field_data"]); $tx_amount = find_string("---amount=", "---end", $sql_row["field_data"]); $tx_type = "Repeating<br>Delay"; $tx_conditions = tk_time_convert($tx_delay) . " Remain"; } if ($tx_type == "oneamount") { $tx_key3 = find_string("---key3=", "---amount", $sql_row["field_data"]); $tx_key3 = base64_encode(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"]); $tx_type = "One Time<br>Amount Match"; if ($tx_amount == 0) { $tx_conditions = "Finished"; } else { $tx_conditions = "Amount >= {$amount_match}"; } } if ($tx_type == "repeatamount") { $tx_key3 = find_string("---key3=", "---amount", $sql_row["field_data"]); $tx_key3 = base64_encode(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"]); $tx_type = "Repeating<br>Amount Match"; $tx_conditions = "Amount >= {$amount_match}"; } if ($tx_enable == TRUE) { $tx_toggle = '<FORM ACTION="autotransfer.php?task=disable" METHOD="post"><font color="blue"><strong>Enabled</strong></font><br><input type="submit" name="Submit' . $i . '" value="Disable Here" /> <input type="hidden" name="tx_record_name" value="' . $tx_record_name . '"></FORM>'; } else { $tx_toggle = '<FORM ACTION="autotransfer.php?task=enable" METHOD="post"><font color="red">Disabled</font><br><input type="submit" name="Submit' . $i . '" value="Enable Here" /> <input type="hidden" name="tx_record_name" value="' . $tx_record_name . '"></FORM>'; } $plugin_output .= '<tr><td>' . $tx_name . '</td><td>' . $tx_type . '</td><td>' . $tx_conditions . '</td><td><p style="word-wrap:break-word; width:90px; font-size:' . $default_public_key_font . 'px;">' . $tx_key2 . '</p></td> <td><p style="word-wrap:break-word; width:90px; font-size:' . $default_public_key_font . 'px;">' . $tx_key3 . '</p></td><td align="center">' . $tx_amount . '</td><td valign="top" align="center">' . $tx_toggle . '</td> <td><FORM ACTION="autotransfer.php?task=delete_task" METHOD="post" onclick="return confirm(\'Delete ' . $tx_name . '?\');"><input type="image" src="../img/hr.gif" title="Delete ' . $tx_name . '" name="remove' . $i . '" border="0"> <input type="hidden" name="tx_record_name" value="' . $tx_record_name . '"></FORM></td></tr> <tr><td colspan="8"><hr></td></tr>'; } return '<table border="0" cellpadding="2" cellspacing="10"><tr><td valign="bottom" align="center" colspan="8"><strong>Auto Currency Transfer Task List</strong> </td></tr> <tr><td align="center"><strong>Name</strong></td><td align="center"><strong>Type</strong></td><td align="center"><strong>Conditions</strong></td> <td align="center"><strong>Key From</strong></td><td align="center"><strong>Key To</strong></td><td align="center"><strong>Transfer<br>Amount</strong></td> <td align="center"><strong>Status</strong></td><td></td></tr>' . $plugin_output . ' <tr><td align="right" colspan="8"><FORM ACTION="autotransfer.php?task=new" METHOD="post"><input type="submit" name="SubmitNew" value="Create New Task" /></FORM></td></tr> </table>'; }
function system_screen() { $max = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'max_active_peers' LIMIT 1"), 0, "field_data"); $new = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'max_new_peers' LIMIT 1"), 0, "field_data"); $domain = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'server_domain' LIMIT 1"), 0, "field_data"); $subfolder = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'server_subfolder' LIMIT 1"), 0, "field_data"); $port = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'server_port_number' LIMIT 1"), 0, "field_data"); $gen_hash = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'generating_peers_hash' LIMIT 1"), 0, "field_data"); $trans_history_hash = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'transaction_history_hash' LIMIT 1"), 0, "field_data"); $trans_queue_hash = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'transaction_queue_hash' LIMIT 1"), 0, "field_data"); $block_check_start = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'block_check_start' LIMIT 1"), 0, "field_data"); $uptime = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'timekoin_start_time' LIMIT 1"), 0, "field_data"); $request_max = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'server_request_max' LIMIT 1"), 0, "field_data"); $allow_lan_peers = intval(mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'allow_LAN_peers' LIMIT 1"), 0, "field_data")); $allow_ambient_peer_restart = intval(mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'allow_ambient_peer_restart' LIMIT 1"), 0, "field_data")); $trans_history_check = intval(mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'trans_history_check' LIMIT 1"), 0, "field_data")); $gen_list_no_sync = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'generation_peer_list_no_sync' LIMIT 1"), 0, "field_data"); $super_peer_mode = mysql_result(mysql_query("SELECT * FROM `main_loop_status` WHERE `field_name` = 'super_peer' LIMIT 1"), 0, "field_data"); if ($gen_list_no_sync == 0) { $gen_hash = '<font color="green">' . $gen_hash . '</font>'; } else { $gen_hash = '<font color="red">' . $gen_hash . '</font>'; } if ($super_peer_mode == 1) { $super_peer_check_1 = "CHECKED"; } else { $super_peer_check_0 = "CHECKED"; } if ($allow_lan_peers == 1) { $LAN_enable = "CHECKED"; } else { $LAN_disable = "CHECKED"; } if ($allow_ambient_peer_restart == 1) { $ambient_restart_enable = "CHECKED"; } else { $ambient_restart_disable = "CHECKED"; } if ($trans_history_check == 2) { $trans_history_check_2 = "CHECKED"; } else { if ($trans_history_check == 1) { $trans_history_check_1 = "CHECKED"; } else { $trans_history_check_0 = "CHECKED"; } } if ($block_check_start == "0") { $trans_history_hash_color1 = '<font color="green">'; $trans_history_hash_color2 = '</font>'; } else { $trans_history_hash_color1 = '<font color="red">'; $trans_history_hash_color2 = '</font>'; } // Total number of records $total_records = mysql_result(mysql_query("SELECT COUNT(*) FROM `transaction_history`"), 0); // Total number of transaction foundations in database $total_foundations = mysql_result(mysql_query("SELECT COUNT(*) FROM `transaction_foundation`"), 0); if ($total_foundations == foundation_cycle(0, TRUE)) { $total_foundations = '<font color="green">' . number_format($total_foundations) . '</font>'; } else { $total_foundations = '<font color="red">' . number_format($total_foundations) . '</font>'; } // Total number of transaction cycle hashes in database $total_trans_hash = mysql_result(mysql_query("SELECT COUNT(attribute) FROM `transaction_history` WHERE `attribute` = 'H'"), 0); if ($total_trans_hash == transaction_cycle(0, TRUE)) { $total_trans_hash = '<font color="green">' . number_format($total_trans_hash) . '</font>'; } else { $total_trans_hash = '<font color="red">' . number_format($total_trans_hash) . '</font>'; } // Database Size $db_size = mysql_result(mysql_query("SELECT CONCAT(SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2)),\" MB\") AS Size FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA LIKE '" . MYSQL_DATABASE . "'"), 0); return '<FORM ACTION="index.php?menu=system&peer_settings=change" METHOD="post"> <table border="0"><tr><td align="right"> Maximum Active Peers: <input type="text" name="max_peers" size="3" value="' . $max . '"/></br> Maximum Reserve Peers: <input type="text" name="max_new_peers" size="3" value="' . $new . '"/></br> </td><td align="right"> <input type="submit" name="Submit1" value="Change Peer Settings" /> </FORM> </td></tr> </table> <hr></hr> <FORM ACTION="index.php?menu=system&server_settings=change" METHOD="post"> <table border="0"><tr><td align="right"> Server Domain: <input type="text" name="domain" size="25" maxlength="256" value="' . $domain . '"/></br> Timekoin Subfolder: <input type="text" name="subfolder" size="25" maxlength="256" value="' . $subfolder . '"/></br> Server Port Number: <input type="text" name="port" size="6" maxlength="5" value="' . $port . '"/></br> Max Peer Query: <input type="text" name="max_request" size="6" maxlength="4" value="' . $request_max . '"/></br> </br>Allow LAN Peers: <input type="radio" name="allow_LAN" value="0" ' . $LAN_disable . '>Disable <input type="radio" name="allow_LAN" value="1" ' . $LAN_enable . '>Enable </br></br>Allow Ambient Peer Restarts: <input type="radio" name="allow_ambient" value="0" ' . $ambient_restart_disable . '>Disable <input type="radio" name="allow_ambient" value="1" ' . $ambient_restart_enable . '>Enable </br></br>Super Peer: <input type="radio" name="super_peer" value="0" ' . $super_peer_check_0 . '>Disabled <input type="radio" name="super_peer" value="1" ' . $super_peer_check_1 . '> Enable </br></br>Transaction History Checks: <input type="radio" name="trans_history_check" value="0" ' . $trans_history_check_0 . '>Rare <input type="radio" name="trans_history_check" value="1" ' . $trans_history_check_1 . '> Normal <input type="radio" name="trans_history_check" value="2" ' . $trans_history_check_2 . '>Frequent </td><td align="right"> <input type="submit" name="Submit2" value="Change Server Settings" /> </FORM> </td></tr> </table> <hr></hr> <table border="0"><tr><td><FORM ACTION="index.php?menu=system&time=poll" METHOD="post"><input name="Submit3" type="submit" value="Check Peer Clock & Ping Times" /></FORM></td></tr></table> <hr></hr> <table border="0"><tr><td align="right"> <strong>Miscellaneous Server</strong></br></br> Generating Peers List Hash:</br> Transaction History Hash:</br> Transaction Queue Hash:</br> Transaction History Records:</br> Transaction Cycles:</br> Transaction Foundations:</br> Uptime:</br> Database Size: </td><td align="left"> <strong>Information</br></br> ' . $gen_hash . '</br> ' . $trans_history_hash_color1 . $trans_history_hash . $trans_history_hash_color2 . '</br> ' . $trans_queue_hash . '</br> ' . number_format($total_records) . '</br> ' . $total_trans_hash . ' of ' . number_format(transaction_cycle(0, TRUE)) . '</br> ' . $total_foundations . ' of ' . number_format(foundation_cycle(0, TRUE)) . '</br> ' . tk_time_convert(time() - $uptime) . '</br> ' . $db_size . '</strong></td></tr></table><hr></hr>'; }
$sql = "SELECT * FROM `active_peer_list`"; } $sql_result = mysql_query($sql); $sql_num_results = mysql_num_rows($sql_result); for ($i = 0; $i < $sql_num_results; $i++) { $sql_row = mysql_fetch_array($sql_result); if ($_GET["show"] != "reserve") { $last_heartbeat = time() - $sql_row["last_heartbeat"]; $last_heartbeat = tk_time_convert($last_heartbeat); if ($sql_row["join_peer_list"] == 0) { $joined = 'P'; $permanent1 = '<font color="blue">'; $permanent2 = '</font>'; } else { $joined = time() - $sql_row["join_peer_list"]; $joined = tk_time_convert($joined); $permanent1 = NULL; $permanent2 = NULL; } $failed_column_name = 'failed_sent_heartbeat'; } else { $failed_column_name = 'poll_failures'; } $body_string .= '<tr> <td class="style2"><p style="word-wrap:break-word; width:90px; font-size:11px;">' . $permanent1 . $sql_row["IP_Address"] . $permanent2 . '</p></td> <td class="style2"><p style="word-wrap:break-word; width:155px; font-size:11px;">' . $permanent1 . $sql_row["domain"] . $permanent2 . '</p></td> <td class="style2"><p style="word-wrap:break-word; width:60px; font-size:11px;">' . $permanent1 . $sql_row["subfolder"] . $permanent2 . '</p></td> <td class="style2"><p style="word-wrap:break-word; font-size:11px;">' . $permanent1 . $sql_row["port_number"] . $permanent2 . '</p></td> <td class="style2"><p style="word-wrap:break-word; font-size:11px;">' . $permanent1 . $last_heartbeat . $permanent2 . '</p></td> <td class="style2"><p style="word-wrap:break-word; font-size:11px;">' . $permanent1 . $joined . $permanent2 . '</p></td>'; if ($_GET["show"] == "reserve") {
} $body_string .= '</table></div>'; } // Next Election Calculator $max_cycles_ahead = 723; for ($i = 0; $i < $max_cycles_ahead; $i++) { $current_generation_cycle = transaction_cycle($i); if (election_cycle($i) == TRUE) { $time_election = '<font color="blue"><strong>' . tk_time_convert($current_generation_cycle - time()); break; } } for ($i = 0; $i < $max_cycles_ahead; $i++) { $current_generation_cycle = transaction_cycle($i); if (generation_cycle($i) == TRUE) { $time_generate = '<font color="blue"><strong>' . tk_time_convert($current_generation_cycle - time()); break; } } $text_bar = '<table cellspacing="10" border="0"><tr><td valign="top" width="230">' . $generate_currency . '</td><td>Generating Peers: <font color="green"><strong>' . $generating_peers_now . '</strong></font><br> Queue for Election: <font color="blue"><strong>' . $generate_peer_queue . '</strong></font></td></tr> <tr><td align="right">' . $continuous_production . '</td><td>' . $generate_rate . '</td></tr> <tr><td colspan="2">' . $my_gen_IP_form . '</td></tr></table>'; $quick_info = 'You must remain online and have a valid Internet accessible server to generate currency.<br><br> Timekoin will attempt to auto-detect the <font color="blue">Generation IP</font> when the field is left blank upon service starting.<br><br> There also exist a setting in the system tab to auto-update the server IP if it changes frequently.<br><br> You can manually update this field if the IP address detected is incorrect.<br><br> Next Peer Election in<br>' . $time_election . '</strong></font><br><br> Currency Generation in<br>' . $time_generate . '</strong></font>'; if ($_GET["firewall"] == "tool") { $body_string = '<strong>This will use the settings set in the system tab (domain,folder, & port) to attempt a reverse connection attempt.</strong><br><br>
function system_screen() { $max = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'max_active_peers' LIMIT 1"), 0, 0); $new = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'max_new_peers' LIMIT 1"), 0, 0); $domain = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'server_domain' LIMIT 1"), 0, 0); $subfolder = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'server_subfolder' LIMIT 1"), 0, 0); $port = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'server_port_number' LIMIT 1"), 0, 0); $gen_hash = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'generating_peers_hash' LIMIT 1"), 0, 0); $trans_history_hash = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'transaction_history_hash' LIMIT 1"), 0, 0); $trans_queue_hash = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'transaction_queue_hash' LIMIT 1"), 0, 0); $block_check_start = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'block_check_start' LIMIT 1"), 0, 0); $uptime = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'timekoin_start_time' LIMIT 1"), 0, 0); $request_max = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'server_request_max' LIMIT 1"), 0, 0); $allow_lan_peers = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'allow_LAN_peers' LIMIT 1"), 0, 0)); $allow_ambient_peer_restart = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'allow_ambient_peer_restart' LIMIT 1"), 0, 0)); $trans_history_check = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'trans_history_check' LIMIT 1"), 0, 0)); $gen_list_no_sync = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'generation_peer_list_no_sync' LIMIT 1"), 0, 0); $super_peer_mode = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'super_peer' LIMIT 1"), 0, 0); $perm_peer_priority = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'perm_peer_priority' LIMIT 1"), 0, 0); $auto_update_generation_IP = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'auto_update_generation_IP' LIMIT 1"), 0, 0)); $cli_mode = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'cli_mode' LIMIT 1"), 0, 0)); $cli_port = mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'cli_port' LIMIT 1"), 0, 0); $network_mode = intval(mysql_result(mysql_query("SELECT field_data FROM `options` WHERE `field_name` = 'network_mode' LIMIT 1"), 0, 0)); if ($network_mode == 3) { $network_mode_3 = "SELECTED"; } else { if ($network_mode == 2) { $network_mode_2 = "SELECTED"; } else { $network_mode_1 = "SELECTED"; } } if ($cli_mode == 1) { $cli_mode_1 = "SELECTED"; } else { $cli_mode_0 = "SELECTED"; } if ($auto_update_generation_IP == 1) { $auto_update_generation_IP_1 = "SELECTED"; } else { $auto_update_generation_IP_0 = "SELECTED"; } if ($gen_list_no_sync == 0) { $gen_hash = '<font color="green">' . $gen_hash . '</font>'; } else { $gen_hash = '<font color="red">' . $gen_hash . '</font>'; } if ($perm_peer_priority == 1) { $perm_peer_priority_1 = "SELECTED"; } else { $perm_peer_priority_0 = "SELECTED"; } if ($super_peer_mode >= 1) { $super_peer_check_1 = "SELECTED"; } else { $super_peer_check_0 = "SELECTED"; $super_peer_mode = 1; } if ($allow_lan_peers == 1) { $LAN_enable = "SELECTED"; } else { $LAN_disable = "SELECTED"; } if ($allow_ambient_peer_restart == 1) { $ambient_restart_enable = "SELECTED"; } else { $ambient_restart_disable = "SELECTED"; } if ($trans_history_check == 2) { $trans_history_check_2 = "SELECTED"; } else { if ($trans_history_check == 1) { $trans_history_check_1 = "SELECTED"; } else { $trans_history_check_0 = "SELECTED"; } } if ($block_check_start == "0") { $trans_history_hash_color1 = '<font color="green">'; $trans_history_hash_color2 = '</font>'; } else { $trans_history_hash_color1 = '<font color="red">'; $trans_history_hash_color2 = '</font>'; } // Total number of records $total_records = mysql_result(mysql_query("SELECT COUNT(*) FROM `transaction_history`"), 0); // Total number of transaction foundations in database $total_foundations = mysql_result(mysql_query("SELECT COUNT(*) FROM `transaction_foundation`"), 0); if ($total_foundations == foundation_cycle(0, TRUE)) { $total_foundations = '<font color="green">' . number_format($total_foundations) . '</font>'; } else { $total_foundations = '<font color="red">' . number_format($total_foundations) . '</font>'; } // Total number of transaction cycle hashes in database $total_trans_hash = count_transaction_hash(); if ($total_trans_hash == transaction_cycle(0, TRUE)) { $total_trans_hash = '<font color="green">' . number_format($total_trans_hash) . '</font>'; } else { $total_trans_hash = '<font color="red">' . number_format($total_trans_hash) . '</font>'; } // Database Size $db_size = mysql_result(mysql_query("SELECT CONCAT(SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2)),\" MB\") AS Size FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA LIKE '" . MYSQL_DATABASE . "'"), 0); $html_return = '<FORM ACTION="index.php?menu=system&server_settings=change" METHOD="post"> <table border="0"><tr><td align="right" style="width:325px"> Maximum Active Peers: <input type="text" name="max_peers" size="3" value="' . $max . '"/><br> Maximum Reserve Peers: <input type="text" name="max_new_peers" size="3" value="' . $new . '"/><br><br> Domain: <input type="text" name="domain" size="25" maxlength="256" value="' . $domain . '"/><br> Subfolder: <input type="text" name="subfolder" size="12" maxlength="256" value="' . $subfolder . '"/><br><br> CLI Mode: <select name="cli_mode"><option value="0" ' . $cli_mode_0 . '>Disable</option><option value="1" ' . $cli_mode_1 . '>Enable</option></select><br><br> Allow LAN Peers: <select name="allow_LAN"><option value="0" ' . $LAN_disable . '>Disable</option><option value="1" ' . $LAN_enable . '>Enable</option></select><br><br> Allow Ambient Peer Restarts: <select name="allow_ambient"><option value="0" ' . $ambient_restart_disable . '>Disable</option><option value="1" ' . $ambient_restart_enable . '>Enable</option></select><br><br> Super Peer: <select name="super_peer"><option value="0" ' . $super_peer_check_0 . '>Disable</option><option value="' . $super_peer_mode . '" ' . $super_peer_check_1 . '>Enable</option></select><br><br> </td> <td valign="top" align="right" style="width:300px"> Public Server Port: <input type="text" name="port" size="6" maxlength="5" value="' . $port . '"/><br> Max Peer Query: <input type="text" name="max_request" size="6" maxlength="6" value="' . $request_max . '"/><br> Local Server Port: <input type="text" name="cli_port" size="6" maxlength="5" value="' . $cli_port . '"/><br><br> Network Mode: <select name="network_mode"><option value="1" ' . $network_mode_1 . '>IPv4 + IPv6</option><option value="2" ' . $network_mode_2 . '>IPv4 Only</option><option value="3" ' . $network_mode_3 . '>IPv6 Only</option></select><br><br> Permanent Peer Priority: <select name="perm_peer_priority"><option value="0" ' . $perm_peer_priority_0 . '>Disable</option><option value="1" ' . $perm_peer_priority_1 . '>Enable</option></select><br><br> Auto Generation IP Update: <select name="auto_update_IP"><option value="0" ' . $auto_update_generation_IP_0 . '>Disable</option><option value="1" ' . $auto_update_generation_IP_1 . '>Enable</option></select><br><br> Transaction History Checks: <select name="trans_history_check"><option value="0" ' . $trans_history_check_0 . '>Rare</option><option value="1" ' . $trans_history_check_1 . '>Normal</option><option value="2" ' . $trans_history_check_2 . '>Frequent</option></select><br><br> </td></tr></table><input type="submit" name="submit_server" value="Update System Settings" /></FORM> <hr> <table border="0"><tr><td align="right"> <strong>Miscellaneous Server</strong><br><br> Generating Peers List Hash:<br> Transaction History Hash:<br> Transaction Queue Hash:<br> Transaction History Records:<br> Transaction Cycles:<br> Transaction Foundations:<br> Uptime:<br> Database Size: </td><td align="left"> <strong>Information<br><br> ' . $gen_hash . '<br> ' . $trans_history_hash_color1 . $trans_history_hash . $trans_history_hash_color2 . '<br> ' . $trans_queue_hash . '<br> ' . number_format($total_records) . '<br> ' . $total_trans_hash . ' of ' . number_format(transaction_cycle(0, TRUE)) . '<br> ' . $total_foundations . ' of ' . number_format(foundation_cycle(0, TRUE)) . '<br> ' . tk_time_convert(time() - $uptime) . '<br> ' . $db_size . '</strong></td></tr></table><hr>'; return $html_return; }