diff --git a/sections/forums/main.php b/sections/forums/main.php
index 9048d691..2cd48712 100644
--- a/sections/forums/main.php
+++ b/sections/forums/main.php
@@ -67,7 +67,7 @@
} else { ?>
- =display_str(Format::cut_string($LastTopic, 50, 1))?>
+ =display_str(Format::cut_string($LastTopic, 50, 1))?>
if (!empty($LastRead[$LastTopicID])) { ?>
diff --git a/sections/tools/data/bitcoin_unproc.php b/sections/tools/data/bitcoin_unproc.php
new file mode 100644
index 00000000..eb7a54d9
--- /dev/null
+++ b/sections/tools/data/bitcoin_unproc.php
@@ -0,0 +1,66 @@
+
+if (!check_perms('users_mod')) {
+ error(403);
+}
+View::show_header('Unprocessed Bitcoin donations');
+
+// Find all donors
+$AllDonations = DonationsBitcoin::get_received();
+
+$DB->query("
+ SELECT BitcoinAddress, SUM(Amount)
+ FROM donations_bitcoin
+ GROUP BY BitcoinAddress");
+$OldDonations = G::$DB->to_pair(0, 1, false);
+?>
+
+
+
+ Do not process these donations manually! The bitcoin parser will get them sooner or later (poke a developer if something seems broken).
+
+
+
+ Bitcoin address |
+ User |
+ Unprocessed amount |
+ Total amount |
+ Donor rank |
+ Special rank |
+
+
+$NewDonations = array();
+foreach ($AllDonations as $Address => $Amount) {
+ if (isset($OldDonations[$Address])) {
+ if ($Amount == $OldDonations[$Address]) { // Direct comparison should be fine as everything comes from bitcoind
+ continue;
+ }
+ $Debug->log_var(array('old' => $OldDonations[$Address], 'new' => $Amount), "New donations from $Address");
+ // PHP doesn't do fixed-point math, and json_decode has already botched the precision
+ // so let's just round this off to satoshis and pray that we're on a 64 bit system
+ $Amount = round($Amount - $OldDonations[$Address], 8);
+ }
+ $NewDonations[$Address] = $Amount;
+}
+if (!empty($NewDonations)) {
+ foreach(DonationsBitcoin::get_userids(array_keys($NewDonations)) as $Address => $UserID) {
+?>
+
+ =$Address?> |
+ =Users::format_username($UserID, true, false, false)?> |
+ =$NewDonations[$Address]?> |
+ =$AllDonations[$Address]?> |
+ =(int)Donations::get_rank($UserID)?> |
+ =(int)Donations::get_special_rank($UserID)?> |
+
+ }
+} else { ?>
+
+ No unprocessed Bitcoin donations |
+
+ } ?>
+
+
+
+View::show_footer();
diff --git a/sections/tools/index.php b/sections/tools/index.php
index 41dbeb11..b0821742 100644
--- a/sections/tools/index.php
+++ b/sections/tools/index.php
@@ -353,6 +353,13 @@
include('data/donation_log.php');
break;
+ case 'bitcoin_unproc':
+ include('data/bitcoin_unproc.php');
+ break;
+
+ case 'bitcoin_balance':
+ include('data/bitcoin_balance.php');
+ break;
case 'donor_rewards':
include('data/donor_rewards.php');
diff --git a/sections/tools/tools.php b/sections/tools/tools.php
index 59409c70..8c874298 100644
--- a/sections/tools/tools.php
+++ b/sections/tools/tools.php
@@ -46,7 +46,8 @@
Data |
if (check_perms('admin_donor_log')) { ?>
Donation log |
- Bitcoin donation balance |
+ Bitcoin donations (balance) |
+ Bitcoin donations (unprocessed) |
} if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
Registration log |
} if (check_perms('users_view_invites')) { ?>
|