| <?php |
| /************************************************************************** |
| * Copyright (c) 2017 Eclipse Foundation and others. |
| * |
| * This program and the accompanying materials are made available |
| * under the terms of the Eclipse Public License 2.0 which accompanies |
| * this distribution, and is available at http://eclipse.org/legal/epl-2.0 |
| **************************************************************************/ |
| require_once dirname(__FILE__) . "/../eclipse.org-common/system/app.class.php"; |
| require_once dirname(__FILE__) . "/../eclipse.org-common/system/nav.class.php"; |
| require_once dirname(__FILE__) . "/../eclipse.org-common/system/menu.class.php"; |
| |
| $App = new App(); |
| $Menu = new Menu(); |
| $Nav = new Nav(); |
| |
| include (dirname(__FILE__) . "/_projectCommon.php"); |
| |
| $pageTitle = "Third Party Content Licenses"; |
| $pageAuthor = "Wayne Beaton"; |
| |
| $licenseFile = dirname(__FILE__) . "/licenses.json"; |
| |
| function dumpLicenseList($file) |
| { |
| $licenses = json_decode(file_get_contents($file), true); |
| echo "<ul>"; |
| foreach ($licenses['approved'] as $spdx => $name) { |
| echo "<li>{$name}</li>"; |
| } |
| echo "</ul>"; |
| } |
| |
| // I'm pretty sure that this just won't work; it would end up |
| // being the date that the content was extracted from Git onto |
| // the web server. |
| // $modified = max(filemtime(__FILE__), filemtime($licenseFile)); |
| $modified = strtotime("2017-10-19"); |
| |
| ob_start(); |
| ?> |
| <div id="maincontent"> |
| <div id="midcolumn"> |
| <h1><?php echo $pageTitle; ?></h1> |
| <p>Updated <?php print $App->getFormattedDate($modified); ?></p> |
| <h3 id="approved">Approved Licenses</h3> |
| <p> |
| The following is a list of the most common licenses approved for use |
| by third party code redistributed by Eclipse Foundation Projects. |
| This list is not exhaustive. Should you have a query on a specific |
| license not listed here, please contact <a href="license@eclipse.org">license@eclipse.org</a>. |
| </p> |
| |
| <?php dumpLicenseList($licenseFile); ?> |
| |
| <h3 id="nonapproved">Non Approved Licenses</h3> |
| <ul> |
| <li>GNU General Public License (GPL)</li> |
| <li>Sun Binary Code License Agreement</li> |
| </ul> |
| <p> |
| Please note the LGPL has been approved by the Eclipse Board of |
| Directors in certain cases. Please contact <a |
| href="license@eclipse.org">license@eclipse.org</a> for more |
| information. |
| </p> |
| |
| |
| </div> |
| </div> |
| <?php |
| $html = ob_get_contents(); |
| ob_end_clean(); |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |