|
|
@@ -8,6 +8,10 @@ include_once("includes/header.php"); |
|
|
|
require "donate/config.php"; |
|
|
|
require "donate/connect.php"; |
|
|
|
|
|
|
|
global $biggest_donation_date; |
|
|
|
global $biggest_donation_value; |
|
|
|
global $total_ever; |
|
|
|
|
|
|
|
$biggest_donation_date = "Unknown"; |
|
|
|
$biggest_donation_value = 0.0; |
|
|
|
$total_ever = 0.0; |
|
|
@@ -21,6 +25,10 @@ if ($db_link === false) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
global $biggest_donation_date; |
|
|
|
global $biggest_donation_value; |
|
|
|
global $total_ever; |
|
|
|
|
|
|
|
$amount = 0.0; |
|
|
|
|
|
|
|
$max_month = 0.0; |
|
|
@@ -50,14 +58,14 @@ $total_ever += $total_year; |
|
|
|
echo '<tr>'; |
|
|
|
echo ' <td>' . $year . '</td>'; |
|
|
|
echo ' <td>' . $donation_count . '</td>'; |
|
|
|
echo ' <td>' . $total_year . '€</td>'; |
|
|
|
echo ' <td>' . number_format($total_year, 2) . '€</td>'; |
|
|
|
if ($donation_count > 0.0) { |
|
|
|
echo ' <td>' . ($total_year/$donation_count) . '€</td>'; |
|
|
|
echo ' <td>' . number_format($total_year/$donation_count, 2) . '€</td>'; |
|
|
|
} else { |
|
|
|
echo ' <td>0€</td>'; |
|
|
|
} |
|
|
|
echo ' <td>' . ($total_year/12.0) . '€</td>'; |
|
|
|
echo ' <td>' . $max_month . '€</td>'; |
|
|
|
echo ' <td>' . number_format($total_year/12.0, 2) . '€</td>'; |
|
|
|
echo ' <td>' . number_format($max_month, 2) . '€</td>'; |
|
|
|
echo '</tr>'; |
|
|
|
|
|
|
|
} |
|
|
@@ -72,8 +80,8 @@ echo '</tr>'; |
|
|
|
|
|
|
|
<p> |
|
|
|
This page contain statistics regarding donations made to the KXStudio project over time.<br/> |
|
|
|
So far the KXStudio project has received <?php echo $total_ever; ?>€ in donations.<br/> |
|
|
|
The biggest donation ever made was on <?php echo $biggest_donation_date; ?>, with a value of <?php echo $biggest_donation_value; ?>€.<br/> |
|
|
|
So far the KXStudio project has received <?php echo number_format($total_ever, 2); ?>€ in donations.<br/> |
|
|
|
The biggest donation ever made was on <?php echo $biggest_donation_date; ?>, with a value of <?php echo number_format($biggest_donation_value, 2); ?>€.<br/> |
|
|
|
Thank you very much for your generosity! |
|
|
|
</p> |
|
|
|
|
|
|
@@ -81,7 +89,7 @@ echo '</tr>'; |
|
|
|
<table style="text-align:center;"> |
|
|
|
<tr> |
|
|
|
<td> Year </td> |
|
|
|
<td> Donations count </td> |
|
|
|
<td> Donation count </td> |
|
|
|
<td> Total received </td> |
|
|
|
<td> Average per donation </td> |
|
|
|
<td> Average per month </td> |
|
|
@@ -89,7 +97,7 @@ echo '</tr>'; |
|
|
|
</tr> |
|
|
|
<?php |
|
|
|
|
|
|
|
for ($year = strftime("%Y"); $year >= "2014"; $year -= 1) { |
|
|
|
for ($year = strftime("%Y"); $year >= "2012"; $year -= 1) { |
|
|
|
print_donation_year($year); |
|
|
|
} |
|
|
|
|
|
|
|