mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 10:31:37 +00:00
Empty commit
This commit is contained in:
parent
c2584ed7e8
commit
a382d91a35
@ -67,7 +67,7 @@
|
|||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<td>
|
<td>
|
||||||
<span style="float: left;" class="last_topic">
|
<span style="float: left;" class="last_topic">
|
||||||
<a href="forums.php?action=viewthread&threadid=<?=$LastTopicID?>" class="tooltip" data-title-plain="<?=$LastTopic?>"><?=display_str(Format::cut_string($LastTopic, 50, 1))?></a>
|
<a href="forums.php?action=viewthread&threadid=<?=$LastTopicID?>" class="tooltip" data-title-plain="<?=display_str($LastTopic)?>"><?=display_str(Format::cut_string($LastTopic, 50, 1))?></a>
|
||||||
</span>
|
</span>
|
||||||
<? if (!empty($LastRead[$LastTopicID])) { ?>
|
<? if (!empty($LastRead[$LastTopicID])) { ?>
|
||||||
<span style="float: left;" class="<?=$Tooltip?> last_read" title="Jump to last read">
|
<span style="float: left;" class="<?=$Tooltip?> last_read" title="Jump to last read">
|
||||||
|
66
sections/tools/data/bitcoin_unproc.php
Normal file
66
sections/tools/data/bitcoin_unproc.php
Normal file
@ -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);
|
||||||
|
?>
|
||||||
|
<div id="thin">
|
||||||
|
<div class="header">
|
||||||
|
<h2>Unprocessed Bitcoin donations</h2>
|
||||||
|
</div>
|
||||||
|
<div class="box2">
|
||||||
|
<div class="pad">Do not process these donations manually! The bitcoin parser <em>will</em> get them sooner or later (poke a developer if something seems broken).</div>
|
||||||
|
</div>
|
||||||
|
<table class="border" width="100%">
|
||||||
|
<tr class="colhead">
|
||||||
|
<td>Bitcoin address</td>
|
||||||
|
<td>User</td>
|
||||||
|
<td>Unprocessed amount</td>
|
||||||
|
<td>Total amount</td>
|
||||||
|
<td>Donor rank</td>
|
||||||
|
<td>Special rank</td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
$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) {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?=$Address?></td>
|
||||||
|
<td><?=Users::format_username($UserID, true, false, false)?></td>
|
||||||
|
<td><?=$NewDonations[$Address]?></td>
|
||||||
|
<td><?=$AllDonations[$Address]?></td>
|
||||||
|
<td><?=(int)Donations::get_rank($UserID)?></td>
|
||||||
|
<td><?=(int)Donations::get_special_rank($UserID)?></td>
|
||||||
|
</tr>
|
||||||
|
<? }
|
||||||
|
} else { ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7">No unprocessed Bitcoin donations</td>
|
||||||
|
</tr>
|
||||||
|
<? } ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
View::show_footer();
|
@ -353,6 +353,13 @@
|
|||||||
include('data/donation_log.php');
|
include('data/donation_log.php');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'bitcoin_unproc':
|
||||||
|
include('data/bitcoin_unproc.php');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'bitcoin_balance':
|
||||||
|
include('data/bitcoin_balance.php');
|
||||||
|
break;
|
||||||
|
|
||||||
case 'donor_rewards':
|
case 'donor_rewards':
|
||||||
include('data/donor_rewards.php');
|
include('data/donor_rewards.php');
|
||||||
|
@ -46,7 +46,8 @@
|
|||||||
<tr class="colhead"><td>Data</td></tr>
|
<tr class="colhead"><td>Data</td></tr>
|
||||||
<? if (check_perms('admin_donor_log')) { ?>
|
<? if (check_perms('admin_donor_log')) { ?>
|
||||||
<tr><td><a href="tools.php?action=donation_log">Donation log</a></td></tr>
|
<tr><td><a href="tools.php?action=donation_log">Donation log</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=bitcoin_balance">Bitcoin donation balance</a></td></tr>
|
<tr><td><a href="tools.php?action=bitcoin_balance">Bitcoin donations (balance)</a></td></tr>
|
||||||
|
<tr><td><a href="tools.php?action=bitcoin_unproc">Bitcoin donations (unprocessed)</a></td></tr>
|
||||||
<? } if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
|
<? } if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
|
||||||
<tr><td><a href="tools.php?action=registration_log">Registration log</a></td></tr>
|
<tr><td><a href="tools.php?action=registration_log">Registration log</a></td></tr>
|
||||||
<? } if (check_perms('users_view_invites')) { ?>
|
<? } if (check_perms('users_view_invites')) { ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user