Example #1
0
<?php

if (!check_perms('users_mod')) {
    error(403);
}
$Title = "Unprocessed Bitcoin Donations";
View::show_header($Title);
// Find all donors
$AllDonations = DonationsBitcoin::get_received();
$DB->query("\n\tSELECT BitcoinAddress, SUM(Amount)\n\tFROM donations_bitcoin\n\tGROUP BY BitcoinAddress");
$OldDonations = G::$DB->to_pair(0, 1, false);
?>
<div class="thin">
	<div class="header">
		<h2><?php 
echo $Title;
?>
</h2>
	</div>
	<div class="box2">
		<div class="pad"><strong>Do not process these donations manually!</strong> The Bitcoin parser <em>will</em> get them sooner or later (poke a developer if something seems broken).</div>
	</div>
<?php 
$NewDonations = array();
$TotalUnproc = 0;
foreach ($AllDonations as $Address => $Amount) {
    if (isset($OldDonations[$Address])) {
        if ($Amount == $OldDonations[$Address]) {
            // Direct comparison should be fine as everything comes from bitcoind
            continue;
        }
Example #2
0
	<div class="header">
		<h3><?php 
echo $Balance;
?>
</h3>
	</div>
<?php 
if (empty($_GET['list'])) {
    ?>
	<a href="?action=<?php 
    echo $_GET['action'];
    ?>
&amp;list=1" class="brackets">Show donor list</a>
<?php 
} else {
    $BitcoinAddresses = DonationsBitcoin::get_received();
    $DB->query("\n\t\tSELECT i.UserID, i.BitcoinAddress\n\t\tFROM users_info AS i\n\t\t\tJOIN users_main AS m ON m.ID = i.UserID\n\t\tWHERE BitcoinAddress != ''\n\t\tORDER BY m.Username ASC");
    ?>
	<table>
	<tr class="colhead">
		<th>Username</th>
		<th>Receiving Bitcoin Address</th>
		<th>Amount</th>
	</tr>
<?php 
    while (list($UserID, $BitcoinAddress) = $DB->next_record(MYSQLI_NUM, false)) {
        if (!isset($BitcoinAddresses[$BitcoinAddress])) {
            continue;
        }
        ?>
	<tr>