while ($counter <= 5) { $hashcode = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode{$counter}' LIMIT 1"), 0, "field_data"); $hashcode_name = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode" . $counter . "_name' LIMIT 1"), 0, "field_data"); $hashcode_permissions = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode" . $counter . "_permissions' LIMIT 1"), 0, "field_data"); $body_text .= '<tr><td valign="bottom" align="right"><strong>Name: <input type="text" name="name' . $counter . '" size="15" value="' . $hashcode_name . '"/> <br>Hashcode: <input type="text" name="hashcode' . $counter . '" size="15" value="' . $hashcode . '"/></strong></td> <td><input type="checkbox" name="pk_balance' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_balance", TRUE) . '>pk_balance <input type="checkbox" name="pk_gen_amt' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_gen_amt", TRUE) . '>pk_gen_amt <input type="checkbox" name="pk_gen_total' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_gen_total", TRUE) . '>pk_gen_total <input type="checkbox" name="pk_history' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_history", TRUE) . '>pk_history<br> <input type="checkbox" name="pk_recv' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_recv", TRUE) . '>pk_recv <input type="checkbox" name="pk_sent' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_sent", TRUE) . '>pk_sent <input type="checkbox" name="pk_valid' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_valid", TRUE) . '>pk_valid <input type="checkbox" name="send_tk' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "send_tk", TRUE) . '>send_tk<br> <input type="checkbox" name="tk_trans_total' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "tk_trans_total", TRUE) . '>tk_trans_total <input type="checkbox" name="tk_process_status' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "tk_process_status", TRUE) . '>tk_process_status </td></tr><tr><td colspan="2"><hr></td></tr>'; $counter++; } $body_text .= '</table><input type="submit" name="save_hashcode" value="Save Settings" /></FORM>'; if ($hash_settings_saved == TRUE) { $body_text .= '<br><font color="blue"><strong>Hashcode Settings Saved!</strong></font>'; } } if ($_GET["plugin"] == "install") { // Install New Plugin $plugin_install = file_upload("plugin_file"); if ($plugin_install == FALSE) { $plugin_install_output .= '<font color="red">Plugin File (' . $plugin_install . ') Install FAILED!</font><br>'; } else { $plugin_install_output .= '<font color="blue">Plugin File (' . $plugin_install . ') Install Complete</font><br>';
} $transaction_amount_sent = find_string("AMOUNT=", "---TIME", $transaction_info); $crypto_balance += $transaction_amount_sent; } } echo $crypto_balance; } // End Permission Check // Log inbound IP activity log_ip("AP", scale_trigger(100)); exit; } //*********************************************************************************** //*********************************************************************************** if ($_GET["action"] == "pk_gen_total") { if (check_hashcode_permissions($hash_permissions, "pk_sent") == TRUE) { // Total of *all* the Timekoins ever generated by the provided public key $public_key = filter_sql(base64_decode($_POST["public_key"])); set_decrypt_mode(); // Figure out which decrypt method can be best used //Initialize objects for Internal RSA decrypt if ($GLOBALS['decrypt_mode'] == 2) { require_once 'RSA.php'; $rsa = new Crypt_RSA(); $rsa->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1); } // Find every Time Koin sent to this public Key $sql = "SELECT public_key_from, public_key_to, crypt_data3, attribute FROM `transaction_history` WHERE `public_key_from` = '{$public_key}'"; $sql_result = mysql_query($sql); $sql_num_results = mysql_num_rows($sql_result); $crypto_balance = 0;
$body_text = '<table border="0"><tr><td style="width:230px"><FORM ACTION="index.php?menu=options&hashcode=save" METHOD="post"></td></tr>'; while ($counter <= 5) { $hashcode = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode{$counter}' LIMIT 1"), 0, "field_data"); $hashcode_name = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode" . $counter . "_name' LIMIT 1"), 0, "field_data"); $hashcode_permissions = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode" . $counter . "_permissions' LIMIT 1"), 0, "field_data"); $body_text .= '<tr><td valign="bottom" align="right"><strong>Name: <input type="text" name="name' . $counter . '" size="15" value="' . $hashcode_name . '"/> <br>Hashcode: <input type="text" name="hashcode' . $counter . '" size="15" value="' . $hashcode . '"/></strong></td> <td><input type="checkbox" name="pk_balance' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_balance", TRUE) . '>pk_balance <input type="checkbox" name="pk_gen_amt' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_gen_amt", TRUE) . '>pk_gen_amt <input type="checkbox" name="pk_gen_total' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_gen_total", TRUE) . '>pk_gen_total <input type="checkbox" name="pk_history' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_history", TRUE) . '>pk_history<br> <input type="checkbox" name="pk_recv' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_recv", TRUE) . '>pk_recv <input type="checkbox" name="pk_sent' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_sent", TRUE) . '>pk_sent <input type="checkbox" name="pk_valid' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_valid", TRUE) . '>pk_valid <input type="checkbox" name="send_tk' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "send_tk", TRUE) . '>send_tk<br> <input type="checkbox" name="tk_trans_total' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "tk_trans_total", TRUE) . '>tk_trans_total </td></tr><tr><td colspan="2"><hr></td></tr>'; $counter++; } $body_text .= '</table><input type="submit" name="save_hashcode" value="Save Settings" /></FORM>'; if ($hash_settings_saved == TRUE) { $body_text .= '<br><font color="blue"><strong>Hashcode Settings Saved!</strong></font>'; } } if ($_GET["plugin"] == "install") { // Install New Plugin $plugin_install = file_upload("plugin_file"); if ($plugin_install == FALSE) { $plugin_install_output .= '<font color="red">Plugin File (' . $plugin_install . ') Install FAILED!</font><br>'; } else { $plugin_install_output .= '<font color="blue">Plugin File (' . $plugin_install . ') Install Complete</font><br>';
$hashcode = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode{$counter}' LIMIT 1"), 0, "field_data"); $hashcode_name = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode" . $counter . "_name' LIMIT 1"), 0, "field_data"); $hashcode_permissions = mysql_result(mysql_query("SELECT * FROM `options` WHERE `field_name` = 'hashcode" . $counter . "_permissions' LIMIT 1"), 0, "field_data"); $body_text .= '<tr><td valign="bottom" align="right"><strong>Name: <input type="text" name="name' . $counter . '" size="15" value="' . $hashcode_name . '"/> <br>Hashcode: <input type="text" name="hashcode' . $counter . '" size="15" value="' . $hashcode . '"/></strong></td> <td><input type="checkbox" name="pk_balance' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_balance", TRUE) . '>pk_balance <input type="checkbox" name="pk_gen_amt' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_gen_amt", TRUE) . '>pk_gen_amt <input type="checkbox" name="pk_gen_total' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_gen_total", TRUE) . '>pk_gen_total <input type="checkbox" name="pk_history' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_history", TRUE) . '>pk_history<br> <input type="checkbox" name="pk_recv' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_recv", TRUE) . '>pk_recv <input type="checkbox" name="pk_sent' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_sent", TRUE) . '>pk_sent <input type="checkbox" name="pk_valid' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "pk_valid", TRUE) . '>pk_valid <input type="checkbox" name="send_tk' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "send_tk", TRUE) . '>send_tk<br> <input type="checkbox" name="tk_trans_total' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "tk_trans_total", TRUE) . '>tk_trans_total <input type="checkbox" name="tk_process_status' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "tk_process_status", TRUE) . '>tk_process_status <input type="checkbox" name="tk_start_stop' . $counter . '" value="1" ' . check_hashcode_permissions($hashcode_permissions, "tk_start_stop", TRUE) . '>tk_start_stop </td></tr><tr><td colspan="2"><hr></td></tr>'; $counter++; } $body_text .= '</table><input type="submit" name="save_hashcode" value="Save Settings" /></FORM>'; if ($hash_settings_saved == TRUE) { $body_text .= '<br><font color="blue"><strong>Hashcode Settings Saved!</strong></font>'; } } if ($_GET["plugin"] == "install") { // Install New Plugin $plugin_install = file_upload("plugin_file"); if ($plugin_install == FALSE) { $plugin_install_output .= '<font color="red">Plugin File (' . $plugin_install . ') Install FAILED!</font><br>'; } else { $plugin_install_output .= '<font color="blue">Plugin File (' . $plugin_install . ') Install Complete</font><br>';