| <?php |
| /******************************************************************************* |
| * Copyright (c) 2014, 2015 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Nathan Gervais (Eclipse Foundation) - Initial implementation (2007-11-07) |
| * Edouard Poitras (Eclipse Foundation) - Further modifications |
| * Christopher Guindon (Eclipse Foundation) |
| *******************************************************************************/ |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.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(); |
| $Menu = new Menu(); |
| $PaymentGateway = new PaymentGateway(); |
| $debug_mode = $PaymentGateway->_get_debug_mode(); |
| |
| |
| include($App->getProjectCommon()); |
| $App->preventCaching(); |
| header('Content-Type: text/html; charset=utf-8;'); |
| |
| # Begin: page-specific settings. Change these. |
| $pageTitle = "Hall of Friends"; |
| $pageKeywords = "friends of eclipse, donation, contribution"; |
| $pageAuthor = "Christopher Guindon"; |
| ob_start(); |
| |
| $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(); |
| |
| |
| // Place your html content in a file called content/en_pagename.php |
| ob_start(); |
| include("content/en_" . $App->getScriptName()); |
| $html = ob_get_clean(); |
| |
| // Custom theme variables |
| $variables = array(); |
| $App->setThemeVariables($variables); |
| |
| # Generate the web page |
| //$App->AddExtraJSFooter('<script type="text/javascript" src="assets/public/javascript/scripts.min.js"></script>'); |
| $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="assets/public/stylesheets/donorlist.min.css" media="screen" />'); |
| $App->generatePage(NULL, $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html); |