blob: 9e309d9e3fc355de6b6f80502fa640baa95a34e5 [file] [log] [blame]
<?php
/**
* Copyright (c) 2014, 2015, 2018 Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* Christopher Guindon (Eclipse Foundation) - Initial implementation
* Eric Poirier (Eclipse Foundation)
*
* SPDX-License-Identifier: EPL-2.0
*/
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/friends/payment.class.php");
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/friends/donationList.class.php");
$App = new App();
$Theme = $App->getThemeClass();
$PaymentGateway = new PaymentGateway();
$debug_mode = $PaymentGateway->_get_debug_mode();
$App->preventCaching();
header('Content-Type: text/html; charset=utf-8;');
// Begin: page-specific settings. Change these.
$pageTitle = "Hall of Friends";
$Theme->setPageTitle($pageTitle);
$Theme->setPageKeywords("friends of eclipse, donation, contribution");
$Theme->setPageAuthor("Christopher Guindon");
$start = $App->getHTTPParameter('start');
$fstart = $App->getHTTPParameter('fstart');
$bfstart = $App->getHTTPParameter('bfstart');
$pageValue = 20;
if ((!$start) || (!preg_match('/^[0-9]+$/', $start))) {
$start = 0;
}
if ((!$fstart) || (!preg_match('/^[0-9]+$/', $fstart))) {
$fstart = 0;
}
if ((!$bfstart) || (!preg_match('/^[0-9]+$/', $bfstart))) {
$bfstart = 0;
}
$DonationList = new DonationList($debug_mode);
$totalContributionsCount = $DonationList->getFriendsCount(TRUE, TRUE, 0);
$contributionsList = new FriendsContributionsList($debug_mode);
$contributionsList->selectFriendsContributionsList($start, $pageValue);
$contributions = $contributionsList->getList();
$totalFriends = $DonationList->getFriendsCount(FALSE, TRUE, 35);
$friendsContributions = new FriendsContributionsList($debug_mode);
$friendsContributions->selectFriendsContributionsList($fstart, $pageValue, 'WHERE FC.amount >= 35 and FC.amount <= 99.99 and F.is_anonymous = 0');
$friends = $friendsContributions->getList();
$totalBestFriends = $DonationList->getFriendsCount(FALSE, TRUE, 100);
$bestFriendsContributions = new FriendsContributionsList($debug_mode);
$bestFriendsContributions->selectFriendsContributionsList($bfstart, $pageValue, 'WHERE FC.amount >= 100 and F.is_anonymous = 0');
$bestFriends = $bestFriendsContributions->getList();
$App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="assets/public/stylesheets/donorlist.min.css" media="screen" />');
// Generate the web page
ob_start();
include ("content/en_" . $App->getScriptName());
$html = ob_get_clean();
$Theme->setHtml($html);
$Theme->generatePage();