2011-08-09 21:03:28 +00:00
< ?
if ( ! check_perms ( 'admin_donor_log' )) { error ( 403 ); }
include ( SERVER_ROOT . '/sections/donate/config.php' );
show_header ( 'Bitcoin donation balance' );
$Balance = btc_balance () . " BTC " ;
$Receiveds = btc_received ();
$DB -> query ( " SELECT m.ID, m.Username, i.Donor, i.BitcoinAddress FROM users_main m INNER JOIN users_info i ON m.ID = i.UserID WHERE BitcoinAddress IS NOT NULL " );
?>
< div class = " thin " >
< h3 >< ? = $Balance ?> </h3>
< table >
< tr >
< th > Username </ th >
< th > Receiving bitcoin address </ th >
< th > Amount </ th >
</ tr >
< ?
while ( $row = $DB -> next_record ()) {
2011-08-22 08:00:05 +00:00
$amount = false ;
2011-08-09 21:03:28 +00:00
foreach ( $Receiveds as $R ) {
if ( $R -> address == $row [ 'BitcoinAddress' ]) {
$amount = $R -> amount . ' BTC' ;
}
}
2011-08-22 08:00:05 +00:00
if ( $amount === false ) { continue ; }
2011-08-09 21:03:28 +00:00
?>
< tr >
< td >< ? = format_username ( $row [ 'ID' ], $row [ 'Username' ], $row [ 'Donor' ]) ?> </td>
< td >< tt >< ? = $row [ 'BitcoinAddress' ] ?> </tt></td>
< td >< ? = $amount ?> </td>
</ tr >
< ?
}
?>
</ table >
</ div >
< ? show_footer (); ?>