Index: trunk/www/sites/www/fundraisers/yearend2016/index.php =================================================================== --- trunk/www/sites/www/fundraisers/yearend2016/index.php (revision 1530168) +++ trunk/www/sites/www/fundraisers/yearend2016/index.php (revision 1530169) @@ -1,326 +1,326 @@ i18n_noop("Make the World a Better Place! - KDE End of Year 2016 Fundraising"), 'cssFile' => '/css/announce.css' ]); require('../../aether/header.php'); $site_root = "../../"; require("donations_auth.inc"); $query = "select count(*) from yearend2016donations;"; $q = mysql_query($query,$sq); echo mysql_error(); $row = mysql_fetch_array($q); $index = $row[0]; $query = "select *,unix_timestamp(date) as date_t from yearend2016donations order by date desc;"; $q = mysql_query($query,$sq); echo mysql_error(); $total = 0; $table = ""; - $table.=""; + $table.=""; while ($row = mysql_fetch_array($q)) { $msg = htmlspecialchars($row["message"]); if ($msg == "") { $msg = "".i18n_var("Anonymous donation").""; } $amount = $row["amount"]; $table.=""; $table.=""; $table.=""; $table.=""; $total += $amount; $table.=""; $table.=""; $index--; } $table.="
".i18n_var("Date")."".i18n_var("Amount")."".i18n_var("Donor Name")."
".i18n_var("Date")."".i18n_var("Amount")."".i18n_var("Donor Name")."
".$index."".date("jS F Y", $row["date_t"])."€ ".number_format($amount,2)."".$msg."

"; $total = number_format($total, 0, ".", " "); // This is select from select seems mysql specific? $query = "select MIN(sum_amount) from ( select sum(amount) as sum_amount from yearend2016donations group by email order by sum_amount DESC LIMIT 9 ) as tops;"; $q = mysql_query($query,$sq); echo mysql_error(); $limit_amount = mysql_fetch_array($q)[0]; $query = "select * from ( select email, sum(amount) as sum_amount from yearend2016donations group by email order by sum_amount ) as tops where sum_amount >= ".$limit_amount." order by sum_amount DESC;"; $q = mysql_query($query,$sq); echo mysql_error(); $top9table = ""; $top9table.=""; $count = 0; $last_amount = -1; $last_was_same_amount = false; while ($row = mysql_fetch_array($q)) { $amount = $row["sum_amount"]; $email = $row['email']; $query2 = "select distinct message as name from yearend2016donations where email='".$email."';"; $q2 = mysql_query($query2,$sq); echo mysql_error(); $donation_count = 0; while ($row2 = mysql_fetch_array($q2)) { $msg = $row2["name"]; $donation_count++; } if ($donation_count !== 1) { $msg = "".i18n_var("Anonymous donation").""; } if ($msg == "") { $msg = "".i18n_var("Anonymous donation").""; } if ($amount == $last_amount) { // Do not touch index } else { // Set index to correct value $index = $count + 1; } $top9table.=""; if ($amount == $limit_amount) { $top9table.=""; } else { $top9table.=""; } $top9table.=""; $top9table.=""; $top9table.=""; $last_amount = $amount; $count++; } $top9table.="
".i18n_var("Total Amount")."".i18n_var("Donor Name")."
".$index." *".$index."€ ".number_format($amount,2)."".$msg."

"; if ($count - $index == 0) { // This means that the last entry is a 9 and is not tied with anyone else, so change the 9 * to a simple 9 $top9table = str_replace("9 *", "9", $top9table); } else if (10 - $index == $count - $index + 1) { // This means that the last entries are tied but they add up to 9 exactly so no random needed either $top9table = str_replace("".$index." *", "".$index."", $top9table); } else { $top9table.=i18n_var("* %1 art print winners will be randomly selected out of these %2 donors", 10 - $index, $count - $index + 1); } ?>

Make the World a Better Place! - KDE End of Year 2016 Fundraising

".i18n_var("%1 raised", "€ $total")."

"; ?>



donor list", "#donorlist");?>
KDE donation page if you would like to support us further.", "https://www.kde.org/community/donations/index.php"); } ?>

English | Català | Italiano | Svenska | Українська

€ 30", "€ 10"); ?>

Postcard Design #1 Postcard Design #2
Postcard Design #3 Postcard Design #4

unique art prints in size A4. At our last conference, QtCon, we asked 46 prominent current and former KDE contributors (including core developers from Plasma, KDE Edu and Qt, board members, designers, community organizers, translators and more) to sign artwork created for KDE's 20th birthday. This is a one-time chance to get a nice and unique KDE print for your wall."); ?>

Art Sample #1 Art Sample #2

Sprints are in person meetings and are really important for a team of hard-working volunteers around the world to focus their efforts and discuss technical matters around the project. The amount of output we get from the sprints is really worthwhile for all users of the software.", "https://community.kde.org/Sprints"); ?>

quarterly reports.", "http://ev.kde.org/reports/"); ?>

see this page.", "/community/donations/others.php#moneytransfer"); ?>
an email so we can add you to the list of donors manually.", "mailto:kde-ev-campaign@kde.org"); ?>