Index: trunk/www/sites/www/aetherlibs/feeds.php =================================================================== --- trunk/www/sites/www/aetherlibs/feeds.php (revision 1552589) +++ trunk/www/sites/www/aetherlibs/feeds.php (revision 1552590) @@ -1,78 +1,130 @@ - * - * @author Ken Vermette - * @copyright 2017 Ken Vermette - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - * - */ +/** +* News Lib +* +* @author Frank Karlitschek +* @copyright 2010 Frank Karlitschek karlitschek@kde.org +* +* @modifications Added default image fallback +* Improve code readability +* @author Sayak Banerjee +* @copyright 2010 Sayak Banerjee +* +* @author Ken Vermette +* @copyright 2017 Ken Vermette +* @copyright 2019 Carl Schwan +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library. If not, see . +* +*/ +require_once __DIR__.'/../vendor/autoload.php'; +use Symfony\Contracts\Cache\ItemInterface; +use Symfony\Component\Cache\Adapter\FilesystemAdapter; -class Feeds +/** + * Extract feeds from database + */ +class Feeds { - static function news ($count) - { - $output = []; - $request = DB::query('SELECT title, url, timestamp FROM news ORDER BY timestamp DESC LIMIT '.$count); - $num = DB::numrows($request); - - for($x = 0; $x < $num; $x++) { - $data = DB::fetch_assoc($request); - $output[] = [ - 'title' => $data['title'], - 'time' => $data['timestamp'], - 'url' => $data['url'], - 'source' => 'news', - 'user' => 'KDE Community', - ]; - } - - DB::free_result($request); - return $output; - } - - - static function blog($count) - { - $output = []; - $request = DB::query('SELECT user, title, url, timestamp FROM blog ORDER BY timestamp DESC LIMIT ' . $count); - $num = DB::numrows($request); - - for($x = 0; $x < $num; $x++) { - $data = DB::fetch_assoc($request); - $output[] = [ - 'title' => $data['title'], - 'time' => $data['timestamp'], - 'url' => $data['url'], - 'source' => 'blog', - 'user' => $data['user'] - ]; - } - - DB::free_result($request); - return $output; - } + private $db; + + /** + * @params PDO $db Database connection + */ + public function __construct(PDO $db) + { + $this->db = $db; + } + + /** + * @params int $count Number of news that need to be fetched + * @return array an array of news + */ + function news(int $count): array + { + $output = []; + try { + $stmt = $this->db->prepare('SELECT title, url, timestamp FROM news ORDER BY timestamp DESC LIMIT :count'); + $stmt->execute(['count' => $count]); + + while ($row = $stmt->fetch()) { + $output[] = [ + 'title' => $row['title'], + 'time' => $row['timestamp'], + 'url' => $row['url'], + 'source' => 'news', + 'user' => 'KDE Community', + ]; + } + } catch (PDOException $e) { + print "Error!: " . $e->getMessage() . "
"; + } + return $output; + } + + + /** + * @params int $count Number of blog posts that need to be fetched + * @return array an array of blog posts + * @deprecated + */ + function blog(int $count): array + { + $output = []; + try { + $db = new DB(); + $stmt = $this->db->prepare('SELECT title, url, timestamp FROM blog ORDER BY timestamp DESC LIMIT :count'); + $stmt->execute(['count' => $count]); + + while ($row = $stmt->fetch()) { + $output[] = [ + 'title' => $row['title'], + 'time' => $row['timestamp'], + 'url' => $row['url'], + 'source' => 'blog', + 'user' => $row['user'], + ]; + } + } catch (PDOException $e) { + print "Error!: " . $e->getMessage() . "
"; + } + return $output; + } + + static function planet(int $count): array + { + $cache = new FilesystemAdapter(); + $output = $cache->get('feedrss', function (ItemInterface $item) use ($count) { + $item->expiresAfter(3600); + + $feed = simplexml_load_file('https://planet.kde.org/rss20.xml'); + $output = []; + if ($feed) { + for($i = 0 ; $i <= $count ; $i++) { + $item = $feed->channel->item[$i]; + $output[] = [ + 'title' => (string) $item->title, + 'url' => (string) $item->link, + ]; + } + } + + return $output; + }); + return $output; + } } Index: trunk/www/sites/www/community/donations/graph.php =================================================================== --- trunk/www/sites/www/community/donations/graph.php (revision 1552589) +++ trunk/www/sites/www/community/donations/graph.php (revision 1552590) @@ -1,98 +1,64 @@ 2020) { +$year = (int)$_GET["year"]; +if ($year < 2001 || $year > 2030) { echo "year check failed"; exit(1); } // initialise for ($i = 1; $i <= 12; $i++) { $i < 10 ? $i_s = "0".$i : $i_s = $i; $data[ $year."-".$i_s ] = 0; } +// $dbConnection->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );//Error Handling -$query = "select sum(amount) as don, DATE_FORMAT(date,\"%Y-%m\") as month from donations "; -$query .= "where year(date) = '".$year."' "; -$query .= "group by month order by month desc"; -$q = mysql_query($query,$sq); -while ($row = mysql_fetch_array($q)) { - $data[ $row["month"] ] = $row["don"]; -} - -$keys = array_keys($data); -$values = array_values($data); - -// below is taken from http://code.web-max.ca/image_graph.php -// and adapted a bit. - -// Get the total number of columns we are going to plot - - $columns = count($values); - -// Get the height and width of the final image - - $width = 400; - $height = 200; - -// Set the amount of space between each column - - $padding = 5; - -// Get the width of 1 column - - $column_width = $width / $columns ; - -// Generate the image variables - - $im = imagecreate($width,$height); - $gray = imagecolorallocate ($im,0xcc,0xcc,0xcc); - $gray_lite = imagecolorallocate ($im,0xee,0xee,0xee); - $gray_dark = imagecolorallocate ($im,0x7f,0x7f,0x7f); - $white = imagecolorallocate ($im,0xff,0xff,0xff); - - $blue_lite = imagecolorallocate($im, 0xE7, 0xF8, 0xFF); - $blue_dark = imagecolorallocate($im, 0x4A, 0x81, 0xCA); - $black = imagecolorallocate($im, 0x00, 0x00, 0x00); - -// Fill in the background of the image +$stmt = $dbConnection->prepare("SELECT SUM(amount) as don, DATE_FORMAT(date,\"%Y-%m\") as month from donations WHERE YEAR(date) = :year GROUP BY month ORDER BY month DESC"); - imagefilledrectangle($im,0,0,$width,$height,$white); - - $maxv = 0; +$stmt->execute([ + 'year' => $year, +]); -// Calculate the maximum value we are going to plot - - for($i=0;$i<$columns;$i++)$maxv = max($values[$i],$maxv); - -// Now plot each column - - $font_file = '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf'; - for($i=0;$i<$columns;$i++) - { - $column_height = ($height / 100) * (( $values[$i] / $maxv) *100); - - $x1 = $i*$column_width; - $y1 = $height-$column_height; - $x2 = (($i+1)*$column_width)-$padding; - $y2 = $height; - - imagefilledrectangle($im,$x1,$y1,$x2,$y2,$blue_dark); - -// This part is just for 3D effect - - imageline($im,$x1,$y1,$x1,$y2,$gray_lite); - imageline($im,$x1,$y2,$x2,$y2,$gray_lite); - imageline($im,$x2,$y1,$x2,$y2,$gray_dark); - - imagefttext( $im, 9, 0, $x1+8, $y2-5 , $black, $font_file, $i+1); +while ($row = $stmt->fetch()) { + $data[ $row["month"] ] = $row["don"]; +} +?> + + + + + + + +
+ + + +
+ + Index: trunk/www/sites/www/community/donations/notify.php =================================================================== --- trunk/www/sites/www/community/donations/notify.php (revision 1552589) +++ trunk/www/sites/www/community/donations/notify.php (revision 1552590) @@ -1,146 +1,141 @@ $value) { - if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { + if($get_magic_quotes_exists === true && get_magic_quotes_gpc() === 1) { $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } if ($do_debug) { $debug = fopen('/tmp/data.txt', 'a+'); fwrite($debug, "Raw Data: $raw_post_data\n"); fwrite($debug, "PHP Decoded: " . var_export($_POST, true) . "\n"); fwrite($debug, "verify: $req\n"); } $ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $req); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); // In wamp-like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set // the directory path of the certificate as shown below: // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { if ($do_debug) { fwrite($debug, "Error in calling curl_exec\n"); } curl_close($ch); exit; } curl_close($ch); -if (strcmp ($res, "VERIFIED") == 0) { +if (strcmp ($res, "VERIFIED") === 0) { // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $memo = $_POST['memo']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; $donate_url = $_POST['custom']; - require("donations_auth.inc"); - - /* - $query = "CREATE TABLE IF NOT EXISTS donations ( id "; - $query .= "INT AUTO_INCREMENT PRIMARY KEY, date DATETIME, "; - $query .= "amount float(10,2), message VARCHAR(255), "; - $query .= "transactionid VARCHAR(255) UNIQUE, donate_url VARCHAR(255) )"; - mysql_query($query,$sq); - echo mysql_error(); - */ + require("www_config.php"); // check the payment_status is Completed - if ( $payment_status != "Completed") { + if ( $payment_status !== "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } // check that receiver_email is your Primary PayPal email - if ( $receiver_email != "kde-ev-board@kde.org") { + if ( $receiver_email !== "kde-ev-board@kde.org") { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unknown email"); } // check that payment_amount/payment_currency are correct - if ( $payment_currency != "EUR" ) { + if ( $payment_currency !== "EUR" ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } // sanitise date $date = strtotime( $_POST["payment_date"] ); - if ( $date === false ) { + if (!$date) { echo "Date parsing failed, assuming now()"; $date = time(); } $date = date("Y-m-d H:i:s", $date); // process payment - $query = "REPLACE into donations VALUES( '', \"".$date."\""; - $query .= ", ".$payment_amount.", \"".addslashes( $memo )."\""; - $query .= ",\"".$txn_id."\", \"".addslashes( $donate_url )."\" )"; - mysql_query($query, $sq); - + $stmt = $dbConnection->prepare("REPLACE into donations VALUES( NULL, :date, :payment_amount, :memo, :txn_id, :donate_url)"); + $stmt->execute([ + 'date' => $date, + 'payment_amount' => $payment_amount, + 'memo' => addslashes($memo), + 'txn_id' => $txn_id, + 'donate_url' => addslashes($donate_url), + ]); + if ($do_debug) { - fwrite( $debug, "\nQuery:".$query."\n" ); - fwrite( $debug, "Error:".mysql_error()."\n" ); + fwrite( $debug, "\nQuery:".$stmt->debugDumpParams()."\n" ); } -} else if (strcmp ($res, "INVALID") == 0) { +} else if (strcmp ($res, "INVALID") === 0) { if ($do_debug) { fwrite($debug, "Invalid transaction\n"); } } else { if ($do_debug) { fwrite($debug, "Paypal returned neither VERIFIED nor INVALID\n"); fwrite($debug, $res."\n"); } } if ($do_debug) { fwrite( $debug, "\n---------------------------------------\n" ); fclose($debug); } ?> Index: trunk/www/sites/www/community/donations/previousdonations.php =================================================================== --- trunk/www/sites/www/community/donations/previousdonations.php (revision 1552589) +++ trunk/www/sites/www/community/donations/previousdonations.php (revision 1552590) @@ -1,77 +1,118 @@ "PayPal Donations", 'cssFile' => '/css/announce.css' ]); require('../../aether/header.php'); $site_root = "../../"; ?>

PayPal Donations

The following contributions have been generously made through PayPal to KDE using the donation form. If you want to contribute in other ways, look at the overview page to see all the ways you can contribute. We thank the donors listed below for their support!

Note this list does not include campaign specific donations like:

+ prepare("SELECT SUM(amount) as don, DATE_FORMAT(date,\"%Y-%m\") as month from donations WHERE YEAR(date) = :year GROUP BY month ORDER BY month DESC"); + $stmt->execute([ + 'year' => $year, + ]); + + while ($row = $stmt->fetch()) { + $data[ $row["month"] ] = $row["don"]; + } ?> +
+ +
+ + prepare("SELECT *, UNIX_TIMESTAMP(date) AS date_t FROM donations WHERE date >= ':year-:month_s-01' AND date <= ':year-:month_s-31 23:59:59' ORDER BY date DESC;"); +$count = $dbConnection->prepare("SELECT COUNT(*) WHERE date >= ':year-:month_s-01' AND date <= ':year-:month_s-31 23:59:59';"); for ($year = date("Y", time()); $year > 2001; $year--) { echo "

$year

"; - echo "
"; - echo ""; + echo "
"; + display_graph($year, $dbConnection); echo "
"; echo "

"; for ($month = 12; $month >=1 ; $month--) { - $month < 10 ? $month_s = "0".$month : $month_s = $month; - $query = "select *,unix_timestamp(date) as date_t from donations "; - $query .= "where date >= '".$year."-".$month_s."-01' and "; - $query .= "date <= '".$year."-".$month_s."-31 23:59:59' order by date desc"; - # echo "
".$query."

"; - $q = mysql_query($query,$sq); - echo mysql_error(); - if (mysql_num_rows($q) == 0) { - continue; - } + # echo "
".$query."

"; + $month < 10 ? $month_s = "0".$month : $month_s = $month; + $count->execute([ + 'year' => $year, + 'month_s' => $month_s, + ]); + if ($count->fetchColumn() === 0) { + continue; + } + $query->execute([ + 'year' => $year, + 'month_s' => $month_s, + ]); $total = 0; echo ""; echo ""; echo ""; - while ($row = mysql_fetch_array($q)) { + while ($row = $query->fetch()) { $msg = htmlentities($row["message"]); if ($msg == "") { $msg = "Anonymous donation"; } $total += $row["amount"]; echo ""; echo ""; echo ""; echo ""; echo ""; } echo ""; echo "
".date("Y - F", mktime(0,0,0,$month,1,$year))."
DateAmountMessage
".date("jS H:i", $row["date_t"])."€ ".number_format($row["amount"],2)."".$msg."
Total€ ".number_format($total,2)." 

"; } } ?>

Note: donations that have been made in the past in US$ are converted to Euro on Aug 8th 2011 with a current exchange rate of 1 US$ = 0.7002 Euro. The original amount is listed.

"Donations Statistics" + ]); + require('../../../aether/header.php'); + $site_root = "../../"; + echo '
'; function standard_deviation($aValues) { + if (count($aValues) === 0) { + return 0; + } $fMean = array_sum($aValues) / count($aValues); $fVariance = 0.0; foreach ($aValues as $i) { $fVariance += pow($i - $fMean, 2); } $fVariance /= count($aValues); return (float) sqrt($fVariance); } function endsWith($haystack, $needle) { return substr($haystack, -strlen($needle)) === $needle; } echo "

Per Month

"; + $dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + for ($year = date("Y", time()); $year > 2010; $year--) { echo ""; echo ""; echo ""; $year_total = 0; $year_number = 0; $year_max = -1; $year_min = INF; $year_all_amounts = array(); + $stmt = $dbConnection->prepare('SELECT amount, UNIX_TIMESTAMP(date) AS date_t FROM donations WHERE date >= :begin AND date <= :end'); + $stmtCount = $dbConnection->prepare('SELECT COUNT(*) FROM donations WHERE date >= :begin AND date <= :end'); + for ($month = 1; $month <= 12 ; $month++) { $month < 10 ? $month_s = "0".$month : $month_s = $month; - $query = "select amount,unix_timestamp(date) as date_t from donations "; - $query .= "where date >= '".$year."-".$month_s."-01' and "; - $query .= "date <= '".$year."-".$month_s."-31 23:59:59'"; - $q = mysql_query($query,$sq); - echo mysql_error(); - if (mysql_num_rows($q) == 0) { + + $stmtCount->execute([ + 'begin' => $year.'-'.$month_s.'-01', + 'end' => $year.'-'.$month_s.'-31 23:59:59', + ]); + + if ($stmtCount->fetchColumn() === 0) { continue; } + + $stmt->execute([ + 'begin' => $year.'-'.$month_s.'-01', + 'end' => $year.'-'.$month_s.'-31 23:59:59', + ]); $total = 0; $number = 0; $max = -1; $min = INF; $all_amounts = array(); - while ($row = mysql_fetch_array($q)) { + while ($row = $stmt->fetch()) { $amount = $row["amount"]; $total += $amount; $number += 1; $max = max($amount, $max); $min = min($amount, $min); $all_amounts[] = $amount; $year_total += $amount; $year_number += 1; $year_max = max($amount, $year_max); $year_min = min($amount, $year_min); $year_all_amounts[] = $amount; } echo " - + "; } echo " - + "; echo "
".$year."
Month Number of Donations Total Amount Average Donation Donation StdDev Max Donation Min Donation
".date("F", mktime(0,0,0,$month,1,$year))." ".$number." ".$total."".round($total/$number, 2)."".($number !== 0 ? round($total/$number, 2) : 0)." ".round(standard_deviation($all_amounts),2)." ".$max." ".$min."
Year Total ".$year_number." ".$year_total."".round($year_total/$year_number, 2)."".($year_number !== 0 ? round($year_total/$year_number, 2) : 0)." ".round(standard_deviation($year_all_amounts),2)." ".$year_max." ".$year_min."

"; } ?>

Per Donation Url

Period:
= '".$_POST["from"]."' and date <= '".$_POST["to"]." 23:59:59'"; - } - $q = mysql_query($query,$sq); - echo mysql_error(); - - $urls = array(); - while ($row = mysql_fetch_array($q)) { - if ($row[0] == "") + if ($period === "today") { + $query .= ' WHERE DATE(date) = CURDATE()'; + $q = $dbConnection->query($query); + } else if ($period === "yesterday") { + $query .= ' WHERE DATE(date) = SUBDATE(CURDATE(), 1)'; + $q = $dbConnection->query($query); + } else if ($period === "month") { + $query .= ' WHERE YEAR(date) = YEAR(NOW()) AND MONTH(date) = MONTH(NOW())'; + $q = $dbConnection->query($query); + } else if ($period === "custom") { + $query .= ' WHERE date >= :from and date <= :to'; + $q = $dbConnection->prepare($query); + $q->execute([ + 'from' => $_POST['from'], + 'to' => $_POST['to'] . ' 23:59:59', + ]); + } else if ($period === "all") { + $q = $dbConnection->query($query); + } else { + echo "bug: $period"; + } + + $urls = []; + while ($row = $q->fetch()) { + if ($row[0] === "") { continue; + } - $query2 = "select amount from donations where donate_url = '".$row[0]."'"; - if ($period == "today") { - $query2 .= " and DATE(date) = CURDATE()"; - } else if ($period == "yesterday") { - $query2 .= " and DATE(date) = SUBDATE(CURDATE(), 1)"; - } else if ($period == "month") { - $query2 .= " and YEAR(date) = YEAR(NOW()) and MONTH(date) = MONTH(NOW())"; - } else if ($period == "custom") { - $query2 .= " and date >= '".$_POST["from"]."' and date <= '".$_POST["to"]." 23:59:59'"; + $query2 = 'SELECT amount FROM donations where donate_url = :donate_url'; + if ($period === 'today') { + $query2 .= ' AND DATE(date) = CURDATE()'; + $q2 = $dbConnection->prepare($query2); + $q2->execute([ + 'donate_url' => $row[0], + ]); + } else if ($period === 'yesterday') { + $query2 .= ' AND DATE(date) = SUBDATE(CURDATE(), 1)'; + $q2 = $dbConnection->prepare($query2); + $q2->execute([ + 'donate_url' => $row[0], + ]); + } else if ($period === 'month') { + $query2 .= ' AND YEAR(date) = YEAR(NOW()) and MONTH(date) = MONTH(NOW())'; + $q2 = $dbConnection->prepare($query2); + $q2->execute([ + 'donate_url' => $row[0], + ]); + } else if ($period === 'custom') { + $query2 .= ' AND date >= :from AND date <= :to'; + $q2 = $dbConnection->prepare($query2); + $q2->execute([ + 'donate_url' => $row[0], + 'from' => $_POST['from'], + 'to' => $_POST['to'] . ' 23:59:59', + ]); + } else if ($period === "all") { + $q2 = $dbConnection->prepare($query2); + $q2->execute([ + 'donate_url' => $row[0], + ]); + } else { + echo "bug: $period"; } - $q2 = mysql_query($query2,$sq); - echo mysql_error(); $total = 0; $number = 0; $max = -1; $min = INF; $all_amounts = array(); - while ($row2 = mysql_fetch_array($q2)) { + while ($row2 = $q2->fetch()) { $amount = $row2["amount"]; $total += $amount; $number += 1; $max = max($amount, $max); $min = min($amount, $min); $all_amounts[] = $amount; } $urls[$row[0]] = array( $total, $number, $max, $min, $all_amounts ); } // Simplify urls and merge www. with non www. $merged_urls = array(); foreach ($urls as $url => $value) { if (strpos($url, "//www.") === 0) { $newurl = "//".substr($url, 6); } else { $newurl = $url; } if (endsWith($newurl, "index.php/donation_button")) { $newurl = substr($newurl, 0, -strlen("index.php/donation_button"))."/donation_button"; } if (endsWith($newurl, "index.php/donation_box")) { $newurl = substr($newurl, 0, -strlen("index.php/donation_box"))."/donation_box"; } if (array_key_exists($newurl, $merged_urls)) { $othervalue = $merged_urls[$newurl]; $othervalue[0] = $othervalue[0] + $value[0]; $othervalue[1] = $othervalue[1] + $value[1]; $othervalue[2] = max($othervalue[2], $value[2]); $othervalue[3] = min($othervalue[3], $value[3]); $othervalue[4] = array_merge($othervalue[4], $value[4]); $merged_urls[$newurl] = $othervalue; } else { $merged_urls[$newurl] = $value; } } uasort($merged_urls, function($a, $b) { if ($a['1'] != $b['1']) return $a['1'] < $b['1']; else return $a['0'] < $b['0']; }); echo ""; echo ""; foreach ($merged_urls as $url => $value) { echo ""; } - echo "
Url Number of Donations Total Amount Average Donation Donation StdDev Max Donation Min Donation
".$url." ".$value[1]." ".$value[0]." ".round($value[0]/$value[1], 2)." ".round(standard_deviation($value[4]),2)." ".$value[2]." ".$value[3]."

"; - - include "footer.inc"; + echo "
"; + include "../../../aether/footer.php"; ?> Index: trunk/www/sites/www/composer.json =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/json Index: trunk/www/sites/www/composer.json =================================================================== --- trunk/www/sites/www/composer.json (nonexistent) +++ trunk/www/sites/www/composer.json (revision 1552590) Property changes on: trunk/www/sites/www/composer.json ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/json \ No newline at end of property Index: trunk/www/sites/www/fundraisers/kdesprints2015/index.php =================================================================== --- trunk/www/sites/www/fundraisers/kdesprints2015/index.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/kdesprints2015/index.php (revision 1552590) @@ -1,230 +1,230 @@ "KDE Sprints 2015 fundraising", 'cssFile' => '/css/announce.css' ]); require('../../aether/header.php'); $site_root = "../../"; - require("donations_auth.inc"); + require("www_config.php"); - $query = "select *,unix_timestamp(date) as date_t from randameetings2015donations order by date desc;"; - $q = mysql_query($query,$sq); - echo mysql_error(); + $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(date) AS date_t FROM randameetings2015donations ORDER BY date DESC;"); + $res->execute(); $total = 0; $count = 0; $table = ""; $table.=""; - while ($row = mysql_fetch_array($q)) { + while ($row = $res->fetch()) { $msg = htmlspecialchars($row["message"]); if ($msg == "") { $msg = "Anonymous donation"; } $total += $row["amount"]; $count++; $table.=""; $table.=""; $table.=""; $table.=""; $table.=""; $table.=""; } $table.="
No.DateAmountDonor Name
".$row["id"]."".date("jS F Y", $row["date_t"])."€ ".number_format($row["amount"],2)."".$msg."

"; $percent=round($total * 100 / $goal); $percent=min($percent, 100); $graph_style = "width: 100%; height: 30px; border: 1px solid #888; background: rgb(204,204,204); position: relative;"; $bar_style = "height: 30px; background: rgb(68,132,242); width: ".$percent."%"; ?>

KDE Sprints 2015 fundraising

- + --> */ ?> €$total raised of a €$goal goal

"; echo "
"; echo "
" -?> - + -->*/ +?> The Randa Meetings 2015 Fundraiser has finished. Thank you everybody who supported us in this fundraiser. We didn't reach the set goal but we collected quite some money and that means there will be more KDE Sprints thanks to your support! See
http://planet.kde.org for more information to come and go to the KDE donation page if you want to support us further.

[update] The fundraising campaign has been extended. We had intended to have ongoing updates from the Randa Meetings. However, developers were working rather than writing articles and blogposts. By extending the campaign, more information can be provided about what was actually accomplished.

For the sixth year, the KDE sprints in Randa, Switzerland will include key projects and top developers, working concurrently under one roof, free from noise and distractions.

The week-long Randa Meetings have been intense and productive, generating exceptional results. Expectations are high again this year. Most importantly, the Randa Meetings have produced significant breakthroughs that benefit all KDE software users and developers.

Randa Meetings participants donate their time to work on important KDE projects. The Randa Meetings organizers prepare meals and arrange breaks to maintain energy and effectiveness. Volunteer staff people take care of details that can interfere with the highly productive software development.

While the developers cover some of their own costs, there are still hard expenses like accommodation and travel to get the volunteer contributors to Randa. Having these expenses covered is a valuable incentive for Randa developers.

The theme of the 2015 Randa Meetings is Bring Touch to KDE. Participants will be working to expand touch capabilities in KDE applications for tablets, smartphones and other touch-enabled devices. These efforts will augment Plasma Mobile, the Free Mobile Platform announced on July 25th at Akademy 2015.

Some of the 2015 Randa projects are:

  • KDE Connect integrated communication for multiple devices
  • KDE apps on Android
  • digiKam photo management
  • GCompris educational software
  • Interface design
  • Personal Information Management
  • Kdenlive video editor
  • KDE and mobile integration with ownCloud user-controlled cloud storage and applications
  • Security and privacy
The organizers have included other top developers so that the Randa Meetings produce extraordinary results.

This year, the Randa Meetings fundraising campaign has been expanded to include all KDE sprints. In addition to the Randa Meetings, various KDE work teams gather for a few days throughout the year to make exceptional progress that simply would not be possible working only via the Internet and email. As one long-time Randa participant said:

In agile development, sprints are a very important element to push the project forward. While sprints can be done over the web, they are hindered by timezones, external distractions, availability of contributors, etc. In-person sprints are more productive as all the hindrances of the web meetings are eliminated and productivity is greatly enhanced overall.

The results of sprints are directly reflected in the quality of KDE software for users. Consequently, sprints and similar high impact get-togethers are one of the primary uses of funds within KDE. This means that the KDE Community consistently offers the best of Free and Open technology for anyone to use.

To support development sprints, we have set a fundraising goal of €. Would you make a donation to support KDE development? Any amount will help and is appreciated. The fundraising campaign has been extended until September 30 so that the participants at the Randa Meetings can report on what they accomplished.

Donors can choose to receive a memorable thank you from the Randa Meetings. If you want to receive such a thank you memento, please send an email to fundraiser@kde.org. Include your name and full mailing address.

Links:

All money received during this fundraising campaign will be used for KDE sprints, including the Randa Meetings.

If you prefer to use international bank transfers please see this page.
Please write us an email so we can add you to the list of donors manually.

List of donations

$value) { if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } if ($do_debug) { $debug = fopen('/tmp/randa2015.txt', 'a+'); fwrite($debug, "verify: $req\n"); } $ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $req); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); // In wamp-like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set // the directory path of the certificate as shown below: // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { if ($do_debug) { fwrite($debug, "Error in calling curl_exec\n"); } curl_close($ch); exit; } curl_close($ch); if (strcmp ($res, "VERIFIED") == 0) { // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if ($_POST['option_selection1'] === "Yes") { $memo = $_POST['address_name']; } else { $memo = ""; } require("donations_auth.inc"); // check the payment_status is Completed if ( $payment_status != "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } // check that receiver_email is your Primary PayPal email if ( $receiver_email != "kde-ev-board@kde.org") { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unknown email"); } // check that payment_amount/payment_currency are correct if ( $payment_currency != "EUR" ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } // sanitise date $date = strtotime( $_POST["payment_date"] ); if ( $date === false ) { echo "Date parsing failed, assuming now()"; $date = time(); } $date = date("Y-m-d H:i:s", $date); // process payment $query = "REPLACE into randameetings2015donations VALUES( '', \"".$date."\""; $query .= ", ".$payment_amount.", \"".addslashes( $memo )."\""; $query .= ",\"".$txn_id."\" )"; mysql_query($query, $sq); if ($do_debug) { fwrite( $debug, "\nQuery:".$query."\n" ); fwrite( $debug, "Error:".mysql_error()."\n" ); } } else if (strcmp ($res, "INVALID") == 0) { if ($do_debug) { fwrite($debug, "Invalid transacion\n"); } } else { if ($do_debug) { fwrite($debug, "Paypal returned neither VERIFIED nor INVALID\n"); fwrite($debug, $res."\n"); } } if ($do_debug) { fwrite( $debug, "\n---------------------------------------\n" ); fclose($debug); } ?> Index: trunk/www/sites/www/fundraisers/randameetings2014/index.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2014/index.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2014/index.php (revision 1552590) @@ -1,216 +1,214 @@ "Randa Meetings 2014 fundraising", 'cssFile' => '/css/announce.css' ]); require('../../aether/header.php'); $site_root = "../../"; - require("donations_auth.inc"); + require("www_config.php"); - $query = "select *,unix_timestamp(date) as date_t from randameetings2014donations order by date desc;"; - $q = mysql_query($query,$sq); - echo mysql_error(); + $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(date) AS date_t FROM randameetings2014donations ORDER BY date DESC;"); + $res->execute(); $total = 0; $count = 0; $table = ""; $table.=""; - while ($row = mysql_fetch_array($q)) { + while ($row = $res->fetch()) { $msg = htmlspecialchars($row["message"]); if ($msg == "") { $msg = "Anonymous donation"; } $total += $row["amount"]; $count++; $table.=""; $table.=""; $table.=""; $table.=""; $table.=""; $table.=""; } $table.="
No.DateAmountDonor Name
".$row["id"]."".date("jS F Y", $row["date_t"])."€ ".number_format($row["amount"],2)."".$msg."

"; $percent=round($total * 100 / $goal); $percent=min($percent, 100); $graph_style = "width: 100%; height: 30px; border: 1px solid #888; background: rgb(204,204,204); position: relative;"; $bar_style = "height: 30px; background: rgb(68,132,242); width: ".$percent."%"; ?>

Randa Meetings 2014 fundraising

- +--> */ ?> €$total raised of a €$goal goal

"; echo "
"; echo "
" -?> - +--> */ ?> The Randa Meetings 2014 Fundraiser has finished. Thank you everybody who supported us in this fundraiser. We didn't reach the set goal but we collected quite some money and that means there is going to be Randa Meetings in August 2014. See http://planet.kde.org for more information to come and go to the KDE donation page if you want to support us further.

For the fifth year, the intense sprints in Randa, Switzerland will include key KDE projects and top developers, all working concurrently under one roof, isolated from noise and distractions.

Previous Randa Meetings have been concentrated and productive, generating exceptional results; organizers and participants expect the same and more this year. And the meetings have produced significant breakthroughs for KDE software users and developers.

Participants donate their time to help improve the software you love and this is why we need money to cover hard expenses like accommodation and travel to get the volunteer contributors to Randa. If you are not attending, you can still support the Randa Meetings by making a donation. As in the past, the Randa Meetings will benefit everyone who uses KDE software.

We have a fundraising goal of €. Please donate what you can to help make the Randa Meetings 2014 possible. This fund campaign ends on the 9th of July (one month before the beginning of the Randa Meetings 2014).

Randa Meetings 2014 projects:

Links:

Read more about the Randa Meetings and the Fundraising on KDE.News where you can write your comments.

The costs for the Randa Meetings 2014 are composed of the following items:

  • International travel costs: EUR 10'000
  • Swiss train tickets: EUR 3'000
  • House rental: EUR 4'000
  • Expense allowance: EUR 2'000
  • Miscellaneous: EUR 1'000

Even if we don't reach our ambitious goal, the money received will be spent for the Randa Meetings (although with fewer participants) or other KDE purposes (like other sprints).

If you prefer to use international bank transfers please see this page.
Please write us an email so we can add you to the list of donors manually.

List of donations

Donnations"); + // STEP 1: read POST data // Reading POSTed data directly from $_POST causes serialization issues with array data in the POST. // Instead, read raw POST data from the input stream. $raw_post_data = file_get_contents('php://input'); $raw_post_array = explode('&', $raw_post_data); $myPost = array(); foreach ($raw_post_array as $keyval) { $keyval = explode ('=', $keyval); if (count($keyval) == 2) $myPost[$keyval[0]] = urldecode($keyval[1]); } // read the IPN message sent from PayPal and prepend 'cmd=_notify-validate' $req = 'cmd=_notify-validate'; if(function_exists('get_magic_quotes_gpc')) { $get_magic_quotes_exists = true; } foreach ($myPost as $key => $value) { if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } if ($do_debug) { $debug = fopen('/tmp/randa2014.txt', 'a+'); fwrite($debug, "verify: $req\n"); } $ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $req); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); // In wamp-like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set // the directory path of the certificate as shown below: // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { if ($do_debug) { fwrite($debug, "Error in calling curl_exec\n"); } curl_close($ch); exit; } curl_close($ch); if (strcmp ($res, "VERIFIED") == 0) { // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if ($_POST['option_selection1'] === "Yes") { $memo = $_POST['address_name']; } else { $memo = ""; } - require("donations_auth.inc"); + require("www_config.php"); // check the payment_status is Completed if ( $payment_status != "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } // check that receiver_email is your Primary PayPal email if ( $receiver_email != "kde-ev-board@kde.org") { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unknown email"); } // check that payment_amount/payment_currency are correct if ( $payment_currency != "EUR" ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } // sanitise date $date = strtotime( $_POST["payment_date"] ); if ( $date === false ) { echo "Date parsing failed, assuming now()"; $date = time(); } $date = date("Y-m-d H:i:s", $date); // process payment $query = "REPLACE into randameetings2014donations VALUES( '', \"".$date."\""; $query .= ", ".$payment_amount.", \"".addslashes( $memo )."\""; $query .= ",\"".$txn_id."\" )"; mysql_query($query, $sq); if ($do_debug) { fwrite( $debug, "\nQuery:".$query."\n" ); fwrite( $debug, "Error:".mysql_error()."\n" ); } } else if (strcmp ($res, "INVALID") == 0) { if ($do_debug) { fwrite($debug, "Invalid transacion\n"); } } else { if ($do_debug) { fwrite($debug, "Paypal returned neither VERIFIED nor INVALID\n"); fwrite($debug, $res."\n"); } } if ($do_debug) { fwrite( $debug, "\n---------------------------------------\n" ); fclose($debug); } ?> Index: trunk/www/sites/www/fundraisers/randameetings2016/index.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2016/index.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2016/index.php (revision 1552590) @@ -1,686 +1,685 @@ KDE ‒ Randa Meetings 2016 Fundraising Campaign prepare("SELECT *, UNIX_TIMESTAMP(date) AS date_t FROM randameetings2016donations ORDER BY date DESC;"); + $res->execute(); $total = 0; $count = 0; $table = ""; - while ($row = mysql_fetch_array($q)) { + while ($row = $res->fetch()) { $msg = htmlspecialchars($row["message"]); if ($msg == "") { $msg = "Anonymous donation"; } $total += $row["amount"]; $count++; $table.=""; $table.="".$row["id"].""; $table.="".date("jS F Y", $row["date_t"]).""; $table.="€".number_format($row["amount"],2).""; $table.="".$msg.""; $table.=""; } $table.=""; $percent=round($total * 100 / $goal); $percent=min($percent, 100); $graph_style = "width: 100%; height: 30px; border: 1px solid #888; background: rgb(204,204,204); position: relative;"; $bar_style = "height: 30px; background: rgb(68,132,242); width: ".$percent."%"; ?>


banner
"; $alert.="
"; $alert.="
"; $alert.="

Thanks for donating to Randa Meetings 2016 Fundraising Campaign!

"; $alert.="
"; echo $alert; } ?>
[update] The Randa Meetings 2016 Fundraiser has finished. Thank you everybody who supported us in this fundraiser. We didn't reach the set goal but we collected quite some money and that means there will be more KDE Sprints thanks to your support! See Planet KDE for more information to come and go to the KDE donation page if you want to support us further.
Randa Meetings 2016 ‒ KDE technology on every device!
Status

Total backers

Pledged of € goal

%

"; ?>
- + */ ?>
About this fundraising campaign

KDE is one of the biggest free software communities in the world and has been delivering high quality technology and spreading the principles of hacker culture for nearly two decades. KDE brings together users, developers, maintainers, translators and many more contributors from across six continents and over fifty countries, all of them working with the bonds and spirits of a truthful community.

KDE has a vision:

A world in which everyone has control over their digital life and enjoys freedom and privacy

Randa Meetings is the largest sprint organized by KDE. Roughly fifty KDE contributors meet yearly at Swiss alps to enjoy seven days of intense in-person work, pushing KDE technologies forward and discussing how to address the next-generation demands for software systems. One of the biggest challenges we've historically had for KDE technology is that we haven't completely reached the platforms where all of our users work. Aligned with our vision and pursuing the delivery of KDE technologies to every user, Randa Meetings 2016 ‒ which happened from 12th to 19th June ‒ was centered on bringing KDE technology on every device.

This fundraising campaign aims at supporting the continuity of KDE efforts, over the year, towards the following goal:

KDE technology on every device; be it in your pocket, in your bag or perched on your table; with the clear intention to start delivering software that will empower its users regardless of the platform they use

Different teams worked in this direction at Randa Meetings 2016 and are still working on it. Making software work on the platforms is not everything that's needed. We'll also need to have the infrastructure that makes sure this effort will have continuity over time, maintaining the quality our users deserve. This also means investing quite some effort in the KDE DevOps technology such as the CI (Continuous Integration) system for the different platforms and mechanisms to properly distribute binaries.

How are we doing that?

Randa Meetings 2016 activities and subsequent efforts were centered around three important topics:

  1. Have a defined set of KDE Applications ported to specific platform of interest.
  2. Come up with a reasonably generic plan to distribute on each platform.
  3. Come up with a sustainability plan for keeping those applications and binaries up to date.

Here's a list of applications and platforms that were tackled by Randa Meetings 2016 participants: Marble on Android and Linux; Kdenlive on Windows; Artikulate on Android; Calligra on Android; KDE Frameworks on Android and Windows; Kate on OS X and Windows; KDevelop on OS X and Windows; Kube on Windows, OS X, and Android; KDE Connect on Windows; and LabPlot on OS X and Windows.

As for distribution efforts, we investigated the use of technologies such as AppImage and Flatpak to build distribution-independent bundled applications.

Randa Meetings 2015 ‒ Selected Pictures
Randa Meetings 2015 ‒ Short Presentations
Randa Meetings 2015 ‒ Final Report
Help make this vision come true!

Some examples of the direct connection between your donation and the realization of KDE technology on every device:

You + a friend support our CI and development infrastructure

€100 each

You keep the ball rolling by supporting other sprints by the end of the year

€300

All donations to Randa Meetings 2016 Fundraising Campaign are one-time donations!

List of donations
# Date Amount Donor Name
Index: trunk/www/sites/www/fundraisers/randameetings2016/notify.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2016/notify.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2016/notify.php (revision 1552590) @@ -1,138 +1,139 @@ Donnations"); // STEP 1: read POST data // Reading POSTed data directly from $_POST causes serialization issues with array data in the POST. // Instead, read raw POST data from the input stream. $raw_post_data = file_get_contents('php://input'); $raw_post_array = explode('&', $raw_post_data); $myPost = array(); foreach ($raw_post_array as $keyval) { $keyval = explode ('=', $keyval); if (count($keyval) == 2) $myPost[$keyval[0]] = urldecode($keyval[1]); } // read the IPN message sent from PayPal and prepend 'cmd=_notify-validate' $req = 'cmd=_notify-validate'; if(function_exists('get_magic_quotes_gpc')) { $get_magic_quotes_exists = true; } foreach ($myPost as $key => $value) { if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } if ($do_debug) { $debug = fopen('/tmp/randa2016.txt', 'a+'); fwrite($debug, "verify: $req\n"); } $ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $req); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); // In wamp-like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set // the directory path of the certificate as shown below: // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { if ($do_debug) { fwrite($debug, "Error in calling curl_exec\n"); } curl_close($ch); exit; } curl_close($ch); if (strcmp ($res, "VERIFIED") == 0) { // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if ($_POST['option_selection1'] === "Yes") { $memo = $_POST['address_name']; } else { $memo = ""; } - require("donations_auth.inc"); + require("www_config.php"); // check the payment_status is Completed if ( $payment_status != "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } // check that receiver_email is your Primary PayPal email if ( $receiver_email != "kde-ev-board@kde.org") { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unknown email"); } // check that payment_amount/payment_currency are correct if ( $payment_currency != "EUR" ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } // sanitise date $date = strtotime( $_POST["payment_date"] ); if ( $date === false ) { echo "Date parsing failed, assuming now()"; $date = time(); } $date = date("Y-m-d H:i:s", $date); // process payment $query = "REPLACE into randameetings2016donations VALUES( '', \"".$date."\""; $query .= ", ".$payment_amount.", \"".addslashes( $memo )."\""; $query .= ",\"".$txn_id."\" )"; mysql_query($query, $sq); if ($do_debug) { fwrite( $debug, "\nQuery:".$query."\n" ); fwrite( $debug, "Error:".mysql_error()."\n" ); } } else if (strcmp ($res, "INVALID") == 0) { if ($do_debug) { fwrite($debug, "Invalid transacion\n"); } } else { if ($do_debug) { fwrite($debug, "Paypal returned neither VERIFIED nor INVALID\n"); fwrite($debug, $res."\n"); } } if ($do_debug) { fwrite( $debug, "\n---------------------------------------\n" ); fclose($debug); } ?> Index: trunk/www/sites/www/fundraisers/randameetings2016/stats.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2016/stats.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2016/stats.php (revision 1552590) @@ -1,449 +1,447 @@ KDE ‒ Statistics for Randa Meetings 2016 Fundraising Campaign


banner
Amount per Day
2016
 
2015
Donations per Day
2016
 
2015
Cumulative Amount per Day
2016
 
2015
Cumulative Donations per Day
2016
 
2015
prepare("select sum(amount) as amount_sum, count(*) donations, DATE_FORMAT(date, '%m%d') as date_fmt from randameetings2016donations group by DATE_FORMAT(date, '%m%d') ORDER BY DATE_FORMAT(date, '%m%d');"); + $stmt->execute(); $labels2016 = ""; $values2016 = ""; $cumulativeAmount2016 = ""; $cumulativeAmount2016Value = 0; $cumulativeDonations2016 = ""; $cumulativeDonations2016Value = 0; $donations2016 = ""; $count = 1; - while ($row = mysql_fetch_array($q)) { + while ($row = $stmt->fetch()) { //$labels2016.=", ".$row["date_fmt"]; $labels2016.=", ".$count; $count++; $values2016.=", ".$row["amount_sum"]; $cumulativeAmount2016Value += $row["amount_sum"]; $cumulativeAmount2016.=", ".$cumulativeAmount2016Value; $cumulativeDonations2016Value += $row["donations"]; $cumulativeDonations2016.=", ".$cumulativeDonations2016Value; $donations2016.=", ".$row["donations"]; } $labels2016.=""; $values2016.=""; $cumulativeAmount2016.=""; $cumulativeDonations2016.=""; $donations2016.=""; - $query = "select sum(amount) as amount_sum, count(*) donations, DATE_FORMAT(date, '%m%d') as date_fmt from randameetings2015donations group by DATE_FORMAT(date, '%m%d') ORDER BY DATE_FORMAT(date, '%m%d');"; - $q = mysql_query($query,$sq); - echo mysql_error(); + $stmt = $dbConnection->prepare("select sum(amount) as amount_sum, count(*) donations, DATE_FORMAT(date, '%m%d') as date_fmt from randameetings2015donations group by DATE_FORMAT(date, '%m%d') ORDER BY DATE_FORMAT(date, '%m%d');"); + $stmt->execute(); $labels2015 = ""; $values2015 = ""; $cumulativeAmount2015 = ""; $cumulativeAmount2015Value = 0; $cumulativeDonations2015 = ""; $cumulativeDonations2015Value = 0; $donations2015 = ""; $count = 1; - while ($row = mysql_fetch_array($q)) { + while ($row = $stmt->fetch()) { //$labels2015.=", ".$row["date_fmt"]; $labels2015.=", ".$count; $count++; $values2015.=", ".$row["amount_sum"]; $cumulativeAmount2015Value += $row["amount_sum"]; $cumulativeAmount2015.=", ".$cumulativeAmount2015Value; $cumulativeDonations2015Value += $row["donations"]; $cumulativeDonations2015.=", ".$cumulativeDonations2015Value; $donations2015.=", ".$row["donations"]; } $labels2015.=""; $values2015.=""; $cumulativeAmount2015.=""; $cumulativeDonations2015.=""; $donations2015.=""; ?> Index: trunk/www/sites/www/fundraisers/randameetings2017/index.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2017/index.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2017/index.php (revision 1552590) @@ -1,679 +1,681 @@ KDE ‒ Randa Meetings 2017 Fundraising Campaign prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM randameetings2017donations ORDER BY CREATED_AT DESC;") or die ($dbConnection->error); - $stmt->execute(); - $result = $stmt->get_result(); - $stmt->close(); + $countStmt = $dbConnection->prepare("SELECT COUNT(*) FROM randameetings2017donations ORDER BY CREATED_AT DESC;"); + $countStmt->execute(); + $n = $countStmt->fetchColumn(); + + $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM randameetings2017donations ORDER BY CREATED_AT DESC;"); + $res->execute(); $total = 0; - $count = $result->num_rows; + $count = $n; $n = $count; $table = ""; - while ($row = mysqli_fetch_array($result)) { + while ($row = $res->fetch()) { $name = htmlspecialchars($row["donor_name"]); if ($name == "") $name = "Anonymous donation"; $total += $row["amount"]; $table.=""; $table.="".$n.""; $table.="".date("jS F Y", $row["date_t"]).""; $table.="€".number_format($row["amount"],2).""; $table.="".$name.""; $table.=""; $n--; } $table.=""; - mysqli_close($dbConnection); + $dbConnection = null; $percent=round($total * 100 / $goal); $percent=min($percent, 100); $graph_style = "width: 100%; height: 30px; border: 1px solid #888; background: rgb(204,204,204); position: relative;"; $bar_style = "height: 30px; background: rgb(68,132,242); width: ".$percent."%"; ?>


banner
"; $alert.="
"; $alert.="
"; $alert.="

Thanks for donating to Randa Meetings 2017 Fundraising Campaign!

"; $alert.="
"; echo $alert; } ?>
[update] The Randa Meetings 2017 Fundraiser has finished. Thank you everybody who supported us in this fundraiser. We didn't reach the set goal but we collected quite some money and that means there will be more KDE Sprints thanks to your support! Planet KDE for more information to come and go to the
Status

Total backers

Pledged of € goal

%

"; ?>
About this fundraising campaign

Randa Meetings are annual KDE development sprints that have typically been dedicated to bringing our technology to different operating systems and form factors. This year, Randa Meetings are all about accessibility. But what do we mean by that?

At KDE, we understand technology is not always easy, and different conditions and abilities make our software harder to use. As we want Free Software to be universal, we must strive to put KDE apps into everybody's hands, including yours.

We want to focus on things that tend to fall by the wayside; problems that are annoying, but not for everyone.

How are we doing that?

During Randa Meetings 2017, we will gather in the quietness of the Swiss mountains and push several different projects in that direction. David Edmundson, for example, plans to spend his time on improving navigation on Plasma for those who prefer to use a keyboard over a mouse. This will help users with reduced mobility that find moving a mouse cumbersome. And Adriaan de Groot will be working on Calamares, an application that helps install operating systems. Adriaan will make Calamares more accessible to visually impaired users by improving integration with the Orca screenreader.

Apart from the two projects mentioned above, we will also have developers from GCompris, Kdenlive, Kubuntu, KMyMoney, Kontact, Kube, Atelier, KDEEdu, digiKam, WikiToLearn, and Krita, all working together, solving the most annoying accessibility issues.

About KDE

As one of the biggest Free Software communities in the world, KDE has been delivering high-quality technology and spreading the principles of hacker culture for nearly two decades. KDE brings together users, developers, maintainers, translators and many more contributors from across six continents and over fifty countries, all of them working with the bonds and spirits of a truthful community.

KDE has a vision:

A world in which everyone has control over their digital life and enjoys freedom and privacy.

To make Randa Meetings 2017 possible, we need your help. Please donate so we can make KDE more accessible for everyone.

Randa Meetings 2016 ‒ Selected Pictures
Randa Meetings 2016 ‒ What did we do?
Help make this vision come true!

Some examples of the direct connection between your donation and the realization of KDE technology on every device:

You + a friend support our CI and development infrastructure

€100 each

You keep the ball rolling by supporting other sprints by the end of the year

€300

All donations to Randa Meetings 2017 Fundraising Campaign are one-time donations!

List of donations
# Date Amount Donor Name
Index: trunk/www/sites/www/fundraisers/randameetings2017/notify.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2017/notify.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2017/notify.php (revision 1552590) @@ -1,79 +1,80 @@ Donnations"); require('paypalIPN.php'); use PaypalIPN; $ipn = new PaypalIPN(); $verified = $ipn->verifyIPN(); $data_text = ""; foreach ($_POST as $key => $value) { $data_text .= $key . " = " . $value . "\r\n"; } // Create debug file if ($do_debug) { $debug = fopen('/tmp/randa2017.txt', 'a+'); fwrite($debug, "verify: $data_text\n"); } if ($verified) { - require_once("config.php"); + require_once("www_config.php"); $payment_amount = $_POST['mc_gross']; $payment_status = $_POST['payment_status']; $receiver_email = $_POST["receiver_email"]; $txn_id = $_POST['txn_id']; if ($_POST['option_selection1'] === "Yes") { $name = $_POST['address_name']; } else { $name = ""; } if ( $payment_status != "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } $receiver_email_found = false; if (strtolower($receiver_email) != strtolower($kdeEvMail)) { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unexpected receiver email"); } if ( $_POST['mc_currency'] != $currency ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } $stmt = $dbConnection->prepare("INSERT INTO randameetings2017donations(created_at, donor_name, amount, transaction_id) VALUES (now(),?,?,?)") or die ($dbConnection->error); $stmt->bind_param("sss", $name, $payment_amount, $txn_id); $return = $stmt->execute(); if($return == false){ if ($do_debug) { fwrite($debug, "Error running insert query\n"); fwrite($debug, "Error:".mysqli_error($dbConnection)."\n" ); } } $stmt->close(); } // End if verified else { if ($do_debug) { fwrite($debug, "IPN Not Validated, an error ocurred \n"); } } if ($do_debug) { fwrite($debug, "\n---------------------------------------\n" ); fclose($debug); } // Reply with an empty 200 response to indicate to paypal the IPN was received correctly. header("HTTP/1.1 200 OK"); ?> Index: trunk/www/sites/www/fundraisers/randameetings2017/stats.php =================================================================== --- trunk/www/sites/www/fundraisers/randameetings2017/stats.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/randameetings2017/stats.php (revision 1552590) @@ -1,451 +1,447 @@ KDE ‒ Statistics for Randa Meetings 2017 Fundraising Campaign


banner
Amount per Day
2017
2016
Donations per Day
2017
2016
Cumulative Amount per Day
2017
 
2016
Cumulative Donations per Day
2017
2016
prepare("SELECT SUM(amount) AS amount_sum, count(*) donations, DATE_FORMAT(CREATED_AT, '%m%d') AS date_fmt FROM randameetings2017donations ORDER BY DATE_FORMAT(CREATED_AT, '%m%d');") or die ($dbConnection->error); + require("www_config.php"); + $stmt = $dbConnection->prepare("SELECT SUM(amount) AS amount_sum, count(*) donations, DATE_FORMAT(CREATED_AT, '%m%d') AS date_fmt FROM randameetings2017donations ORDER BY DATE_FORMAT(CREATED_AT, '%m%d');"); $stmt->execute(); - $result = $stmt->get_result(); - $stmt->close(); $labels2017 = ""; $values2017 = ""; $cumulativeAmount2017 = ""; $cumulativeAmount2017Value = 0; $cumulativeDonations2017 = ""; $cumulativeDonations2017Value = 0; $donations2017 = ""; $count = 1; - while ($row = mysqli_fetch_array($result)) { + while ($row = $stmt->fetch()) { //$labels2017.=", ".$row["date_fmt"]; $labels2017.=", ".$count; $count++; $values2017.=", ".$row["amount_sum"]; $cumulativeAmount2017Value += $row["amount_sum"]; $cumulativeAmount2017.=", ".$cumulativeAmount2016Value; $cumulativeDonations2017Value += $row["donations"]; $cumulativeDonations2017.=", ".$cumulativeDonations2016Value; $donations2016.=", ".$row["donations"]; } $labels2017.=""; $values2017.=""; $cumulativeAmount2017.=""; $cumulativeDonations2017.=""; $donations2017.=""; $stmt = $dbConnection->prepare("SELECT SUM(amount) AS amount_sum, count(*) donations, DATE_FORMAT(date, '%m%d') AS date_fmt FROM randameetings2016donations ORDER BY DATE_FORMAT(date, '%m%d');") or die ($dbConnection->error); $stmt->execute(); - $result = $stmt->get_result(); - $stmt->close(); $labels2016 = ""; $values2016 = ""; $cumulativeAmount2016 = ""; $cumulativeAmount2016Value = 0; $cumulativeDonations2016 = ""; $cumulativeDonations2016Value = 0; $donations2016 = ""; $count = 1; - while ($row = mysqli_fetch_array($result)) { + while ($row = $stmt->fetch()) { //$labels2016.=", ".$row["date_fmt"]; $labels2016.=", ".$count; $count++; $values2016.=", ".$row["amount_sum"]; $cumulativeAmount2016Value += $row["amount_sum"]; $cumulativeAmount2016.=", ".$cumulativeAmount2016Value; $cumulativeDonations2016Value += $row["donations"]; $cumulativeDonations2016.=", ".$cumulativeDonations2016Value; $donations2016.=", ".$row["donations"]; } $labels2016.=""; $values2016.=""; $cumulativeAmount2016.=""; $cumulativeDonations2016.=""; $donations2016.=""; ?> Index: trunk/www/sites/www/fundraisers/yearend2014/index.php =================================================================== --- trunk/www/sites/www/fundraisers/yearend2014/index.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/yearend2014/index.php (revision 1552590) @@ -1,300 +1,297 @@ i18n_noop("Make the World a Better Place! - KDE End of Year 2014 Fundraising"), 'cssFile' => '/css/announce.css' ]); require('../../aether/header.php'); $site_root = "../../"; - require("donations_auth.inc"); + require("www_config.php"); - $query = "select count(*) from yearend2014donations;"; - $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 yearend2014donations order by date desc;"; - $q = mysql_query($query,$sq); - echo mysql_error(); + $countStmt = $dbConnection->prepare("SELECT COUNT(*) FROM yearend2014donations ORDER BY CREATED_AT DESC;"); + $countStmt->execute(); + $n = $countStmt->fetchColumn(); + + $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM yearend2014donations ORDER BY CREATED_AT DESC;"); + $res->execute(); $total = 0; $table = ""; $table.=""; - while ($row = mysql_fetch_array($q)) { + while ($row = $res->fetch()) { $msg = htmlspecialchars($row["message"]); if ($msg == "") { $msg = "".i18n_var("Anonymous donation").""; } $amount = $row["amount"]; $table.=""; $table.=""; $table.=""; if ($row["currency"] == "EUR") { $table.=""; $total += $amount; } else { $table.=""; $total += $amount * 0.78; } $table.=""; $table.=""; $index--; } $table.="
".i18n_var("Date")."".i18n_var("Amount")."".i18n_var("Donor Name")."
".$index."".date("jS F Y", $row["date_t"])."€ ".number_format($amount,2)."$ ".number_format($amount,2)."".$msg."

"; $total = number_format($total, 0, ".", " "); ?>

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

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

"; ?>

KDE donation page if you want to support us further.", "https://www.kde.org/community/donations/index.php"); ?>

English | Català | Español | Nederlands | Polski | Português | Português brasileiro | Svenska | Українська

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

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

€ 1000"); ?>

  • Barcelona, Spain
  • Burgdorf, Switzerland
  • Nijmegen, The Netherlands
  • Nuremberg, Germany
  • Pune, India
  • Toulouse, France
  • Washington, DC, USA

Sprints are in person meetings and are really important for a team of hardworking 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/#moneytransfer"); ?>
an email so we can add you to the list of donors manually.", "mailto:kde-ev-campaign@kde.org"); ?>

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"); + require("www_config.php"); + + $countStmt = $dbConnection->prepare("SELECT COUNT(*) FROM yearend2016donations ORDER BY CREATED_AT DESC;"); + $countStmt->execute(); + $n = $countStmt->fetchColumn(); + + $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM yearend2016donations ORDER BY CREATED_AT DESC;"); - $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.=""; - while ($row = mysql_fetch_array($q)) { + while ($row = $res->fetch()) { $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")."
".$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(); + $limitStmt = $dbConnection->prepare($query); + $limitStmt->execute(); + $limit_amount = $limitStmt->fetchColumn(); + + $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 = $dbConnection->prepare($query); + $q->execute(['limit_amount' => $limit_amount]); $top9table = ""; $top9table.=""; $count = 0; $last_amount = -1; $last_was_same_amount = false; - while ($row = mysql_fetch_array($q)) { + $q2 = $dbConnection->prepare('select distinct message as name from yearend2016donations where email=:email'); + while ($row = $q->fetch()) { $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(); + $q2->execute(['email' => $email]); $donation_count = 0; - while ($row2 = mysql_fetch_array($q2)) { + while ($row2 = $q2-fetch()) { $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"); ?>

getMessage() . "
"; + die(); +} ?> Index: trunk/www/sites/www/fundraisers/yearend2017/index.php =================================================================== --- trunk/www/sites/www/fundraisers/yearend2017/index.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/yearend2017/index.php (revision 1552590) @@ -1,376 +1,373 @@ KDE - End of Year 2017 Fundraising
KDE Logo

KDE Powers You - You Can Power KDE, Too!

Technology and software developed by KDE powers devices and empowers people all around the world. By donating to our end-of-year fundraiser, you will play a part in recharging KDE!

As you probably already know, KDE software is free for everyone to use and modify. We would like to keep it that way.
Help us build a world in which everyone has control over their digital life and enjoys freedom and privacy.

If you support our campaign, you will directly impact the future of KDE. Donations are also a great way to show gratitude to your favorite developers.
And if you‘ve always wanted to contribute to FOSS, but never had the time, a donation also counts as a contribution!

But wait...what are we going to do with your money?


Power community growth and KDE promotion
You will contribute to the organization of Akademy, our biggest community event. Thanks to you, our community members will be able to travel to conferences and give talks about KDE software, or set up booths at tech events around the globe to present our technology.

Empower people by teaching and mentoring them
Your donations will make it easier for us to organize events like Season of KDE, where we mentor students and new FOSS contributors.

Boost our developers to make even better software
Is Plasma your favorite desktop environment? What about other software developed by KDE - do you use Marble Maps, Kdenlive, Dolphin, digiKam, or KMail? Your donations will help us make that software better. We'll be able to work on it together during our developer sprints, such as Randa Meetings.

Power our websites and infrastructure
With your help, we will be able to pay for hosting and administration expenses, as well as finish the redesign project of our main KDE website.

Notes
  • PayPal is the default transaction method for this fundraiser. If you prefer to use international bank transfers please see this page.

  • If there are any problems with your donation, or if you have any additional questions, contact us at kde-ev-campaign@kde.org. Put "KDE End of Year 2017 Fundraiser" in the subject of your email.

  • Your donation can be anonymous. You can set this in the Donate dialog by answering "No" to "Show my name on the donors list".

  • Multiple donations from the same account will be listed and treated as separate donations.

prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM endofyear2017donations ORDER BY CREATED_AT DESC;") or die($dbConnection->error); - $stmt->execute(); - $result = $stmt->get_result(); - $stmt->close(); - $count = $result->num_rows; - ?> - prepare("SELECT COUNT(*) FROM endofyear2017donations ORDER BY CREATED_AT DESC;"); + $countStmt->execute(); + $n = $countStmt->fetchColumn(); + + $res = $dbConnection->prepare("SELECT *, UNIX_TIMESTAMP(CREATED_AT) AS date_t FROM endofyear2017donations ORDER BY CREATED_AT DESC;"); + $res->execute(); $total = 0; - $n = $count; $table = ""; - while ($row = mysqli_fetch_array($result)) { + while ($row = $res->fetch()) { $name = htmlspecialchars($row["donor_name"]); if ($name == "") { $name = "Anonymous donation"; } $total += $row["amount"]; $table.=""; $table.="".$n.""; $table.="".date("jS F Y", $row["date_t"]).""; $table.="€".number_format($row["amount"], 2).""; $table.="".$name.""; $table.=""; $n--; } - $table.=""; - mysqli_close($dbConnection); + $dbConnection = null; $goal_fmt=number_format(20000); $goal=20000; $percent=round($total * 100 / $goal); $percent=min($percent, 100); ?>

Status

>
%
of 20.000€
Raised:
0
Days
0
Hours
0
Minutes
0
Seconds
".$count."" ?>
Backers

2017 Retrospective

List of Donations

Thank you for powering the KDE Community! Your support makes a difference.

# Date Amount Donor Name
Index: trunk/www/sites/www/fundraisers/yearend2017/notify.php =================================================================== --- trunk/www/sites/www/fundraisers/yearend2017/notify.php (revision 1552589) +++ trunk/www/sites/www/fundraisers/yearend2017/notify.php (revision 1552590) @@ -1,79 +1,79 @@ verifyIPN(); $data_text = ""; foreach ($_POST as $key => $value) { $data_text .= $key . " = " . $value . "\r\n"; } // Create debug file if ($do_debug) { $debug = fopen('/tmp/endofyear2017.txt', 'a+'); fwrite($debug, "verify: $data_text\n"); } if ($verified) { - require_once("config.php"); + require_once("www_config.php"); $payment_amount = $_POST['mc_gross']; $payment_status = $_POST['payment_status']; $receiver_email = $_POST["receiver_email"]; $txn_id = $_POST['txn_id']; if ($_POST['option_selection1'] === "Yes") { $name = $_POST['address_name']; } else { $name = ""; } if ( $payment_status != "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } $receiver_email_found = false; if (strtolower($receiver_email) != strtolower($kdeEvMail)) { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unexpected receiver email"); } if ( $_POST['mc_currency'] != $currency ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } $stmt = $dbConnection->prepare("INSERT INTO endofyear2017donations(created_at, donor_name, amount, transaction_id) VALUES (now(),?,?,?)") or die ($dbConnection->error); $stmt->bind_param("sss", $name, $payment_amount, $txn_id); $return = $stmt->execute(); if($return == false){ if ($do_debug) { fwrite($debug, "Error running insert query\n"); fwrite($debug, "Error:".mysqli_error($dbConnection)."\n" ); } } $stmt->close(); } // End if verified else { if ($do_debug) { fwrite($debug, "IPN Not Validated, an error ocurred \n"); } } if ($do_debug) { fwrite($debug, "\n---------------------------------------\n" ); fclose($debug); } // Reply with an empty 200 response to indicate to paypal the IPN was received correctly. header("HTTP/1.1 200 OK"); ?> Index: trunk/www/sites/www/index.php =================================================================== --- trunk/www/sites/www/index.php (revision 1552589) +++ trunk/www/sites/www/index.php (revision 1552590) @@ -1,208 +1,197 @@ "KDE Community Home", 'cssFile' => 'content/home/portal.css?ver=1.2' ]); require('aether/header.php'); - if (@include_once("libs/class_db.php")) { + if (@include_once("www_config.php")) { define("FRONTPAGE_LIVE_FEED", true); - } - - if (defined("FRONTPAGE_LIVE_FEED")) { - require_once('users_conf.php'); require_once('aetherlibs/functions.php'); require_once("aetherlibs/feeds.php"); } ?>

Announcements

  • KDE Plasma 5.16.90 Released Thursday, 19 September 2019

    Today KDE releases a new beta release of KDE Plasma 5, versioned 5.16.90 Read full announcement
  • KDE Releases Frameworks 5.62.0 September 14, 2019

    This release is part of a series of planned monthly releases making improvements available to developers in a quick and predictable manner. Read full announcement
  • KDE Plasma 5.12.9 LTS Released September 10, 2019

    Today KDE releases a new Long Term Support release of KDE Plasma 5, versioned 5.12.9. Read full announcement
  • KDE Ships KDE Applications 19.08.1 September 5, 2019

    Today KDE released the new versions of KDE Applications. Read full announcement
📢 View all announcements

News

-
    +
      news(20); //$items = array_merge($items, Feeds::blog(8)); svsort($items, 'timestamp'); foreach ($items as $i) { $i['url'] = htmlspecialchars($i['url']); $i['title'] = htmlspecialchars($i['title']); $i['user'] = htmlspecialchars( isset($kde_contributors[$i['user']]) && isset($kde_contributors[$i['user']]['name']) ? $kde_contributors[$i['user']]['name'] : $i['user'] ); echo '
    • '.$i['title'].'
    • '; } ?>
    📰 Read more news

    Community Blog Posts

    - - '; - for( $i= 0 ; $i <= 3 ; $i++ ) { - $item = $feed->channel->item[$i]; - $title = (string) $item->title; - $url = (string) $item->link; - - printf( - '
  • %s
  • ', - $url, - $title - ); - }; - print '
'; - } - ?> +
    + %s', + htmlspecialchars($item['url']), + htmlspecialchars($item['title']) + ); + } + ?> +
🌍 Read our blogs on Planet KDE
Index: trunk/www/sites/www/setup-db.php =================================================================== --- trunk/www/sites/www/setup-db.php (nonexistent) +++ trunk/www/sites/www/setup-db.php (revision 1552590) @@ -0,0 +1,126 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + */ + +die("You shall not pass"); + +require_once('config.php'); + +/** + * Create sample dabase for testing purpose + */ +class Fixture +{ + private $db; + + public function __construct(\PDO $db) + { + $this->db = $db; + $this->db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );//Error Handling + $this->generateGlobalDonationTable(); + $this->generateDonationTable('randameetings2014donations'); + $this->generateDonationTable('randameetings2016donations'); + $this->generateDonationTable2('randameetings2017donations'); + } + + private function generateGlobalDonationTable() + { + $this->db->exec("CREATE TABLE IF NOT EXISTS donations ( + id INT AUTO_INCREMENT PRIMARY KEY, + date DATETIME, + amount FLOAT(10, 2), + message VARCHAR(255), + transactionid VARCHAR(255) UNIQUE, + donate_url VARCHAR(255) );"); + + $stmt = $this->db->prepare("INSERT into donations VALUES( NULL, :date, :payment_amount, :memo, :txn_id, :donate_url);"); + + + for ($i = 0; $i < 10; $i++) { + $stmt->execute([ + 'date' => (new DateTime())->format('Y-m-d H:i:s'), + 'payment_amount' => $i * 10.5, + 'memo' => "Thanks $i", + 'txn_id' => time() + $i, + 'donate_url' => "test.org/test_donation" + ]); + } + $query = $this->db->query("SELECT * from donations"); + + while ($row = $query->fetch()) { + echo $row['amount']; + } + } + + private function generateDonationTable($name) + { + $stmt = $this->db->exec("CREATE TABLE IF NOT EXISTS $name ( + id INT AUTO_INCREMENT PRIMARY KEY, + date DATETIME, + amount FLOAT(10, 2), + message VARCHAR(255), + transactionid VARCHAR(255) UNIQUE );"); + + $stmt = $this->db->prepare("INSERT into $name VALUES( NULL, :date, :payment_amount, :memo, :txn_id);"); + + for ($i = 0; $i < 10; $i++) { + $stmt->execute([ + 'date' => (new DateTime())->format('Y-m-d H:i:s'), + 'payment_amount' => $i * 10.5, + 'memo' => "Thanks $i", + 'txn_id' => time() + $i, + ]); + } + $query = $this->db->query("SELECT * from $name"); + + while ($row = $query->fetch()) { + echo $row['amount'] . '
'; + } + } + + private function generateDonationTable2($name) + { + $stmt = $this->db->exec("CREATE TABLE IF NOT EXISTS $name ( + id INT AUTO_INCREMENT PRIMARY KEY, + CREATED_AT DATETIME, + amount FLOAT(10, 2), + message VARCHAR(255), + donor_name VARCHAR(255), + transactionid VARCHAR(255) UNIQUE );"); + + $stmt = $this->db->prepare("INSERT into $name VALUES( NULL, :date, :payment_amount, :memo, :name, :txn_id);"); + + for ($i = 0; $i < 10; $i++) { + $stmt->execute([ + 'date' => (new DateTime())->format('Y-m-d H:i:s'), + 'payment_amount' => $i * 10.5, + 'memo' => "Thanks $i", + 'name' => "FooBar", + 'txn_id' => time() + $i, + ]); + } + $query = $this->db->query("SELECT * from $name"); + + while ($row = $query->fetch()) { + echo $row['amount'] . '
'; + } + } +} + +$fixture = new Fixture($dbConnection); +echo "Done";