| <?php | |
| /** | |
| * Copyright (c) 2015, 2018, 2022 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 | |
| */ | |
| // Infra 2200 - After a successful download on the Downloads page, | |
| // this page (en_index.php) is being printed and the CSS and JS are needed. | |
| $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="/donate/dist/css/donate.css?v=0.1" media="screen" />'); | |
| $App->AddExtraJSFooter('<script type="text/javascript" src="/donate/dist/js/donate.js?v=0.1"></script>'); | |
| require_once realpath(dirname(__FILE__) . '/../src/Donate.class.php'); | |
| $Donate = new Donate(); | |
| /* Override for Testing | |
| $title_1 = 'Thank you'; | |
| $title_2 = 'for your download!'; | |
| $download_link = '<p class="download-link-msg">If the download doesn\'t start in a few seconds, please <a href="https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2021-12/R/eclipse-inst-jre-win64.exe&mirror_id=1135">click here</a> to start the download.</p>'; | |
| $picked_layout = 'layout_b'; | |
| $file_id = '1231'; | |
| */ | |
| if (!empty($title_1) && !empty($title_2)) { | |
| $Donate->setDownloadTitle('<span>' . $title_1 . '</span> ' . $title_2); | |
| } | |
| if (!empty($download_link)) { | |
| $Donate->setDownloadUrl($download_link); | |
| } | |
| if (!empty($file_id)) { | |
| $Donate->setDownloadFileId($file_id); | |
| } | |
| if (!empty($picked_layout)) { | |
| $Donate->setLayout($picked_layout); | |
| } | |
| print $Donate->output(); |