function spectra_block_setformat() { if (!spectra_node_isalive()) { spectra_log_write(1, "Unable to connect to " . $GLOBALS["currency"]["name"] . " node."); } // Retrieve the first block from the chain without specifying // verbose mode $hash = getblockhash(1); $block = getblock($hash); // Determine the format of the returned block data if (is_array($block)) { system_flag_set("block_req_verbose", 0); spectra_log_write(0, "Block format set to ignore verbose mode."); } else { system_flag_set("block_req_verbose", 1); spectra_log_write(0, "Block format set to require verbose mode."); } }
<?php // Enable the spectra functionality require_once "lib/spectra_config.php"; // If there is no live node the page is a spew of errors if (!spectra_node_isalive()) { $message = "<p>"; $message .= "\tUnable to connect to the specified node."; $message .= "</p>"; spectra_page_error("No Network", $message); } spectra_site_head($GLOBALS["currency"]["code"] . " Network Status"); // Network status and description spectra_network_statistics(); // Connection list for the specified node spectra_network_nodelist(); spectra_site_foot(); /****************************************************************************** Developed By Jake Paysnoe - Copyright © 2015 SPEC Development Team SPEC Block Explorer is released under the MIT Software License. For additional details please read license.txt in this package. ******************************************************************************/ ?>