| <?php |
| /** |
| * Copyright (c) Eclipse Foundation and others. |
| * |
| * 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/ |
| * |
| * 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/system/nav.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); |
| $App = new App(); |
| $Nav = new Nav(); |
| $Menu = new Menu(); |
| |
| require_once dirname(__FILE__) . '/../../classes/common.php'; |
| |
| include($App->getProjectCommon()); |
| |
| ob_start(); |
| |
| $pageKeywords = ""; |
| $pageTitle = "Eclipse Foundation Project KPIs"; |
| $pageAuthor = "Wayne Beaton"; |
| ?> |
| |
| <style> |
| table{ |
| border-collapse:collapse; |
| border:1px solid; |
| } |
| |
| table td,th { |
| border:1px solid; |
| padding-left: 5px; |
| padding-right: 5px; |
| text-align: right; |
| } |
| table td:nth-child(1) { |
| text-align: left; |
| } |
| table th { |
| text-align: left; |
| } |
| </style> |
| |
| <div id="midcolumn"> |
| <h1><?= $pageTitle ?></h1> |
| |
| <div class="homeitem"> |
| |
| <?php |
| $files = glob("/home/data/httpd/writable/projects/kpi-*.html"); |
| rsort($files); |
| |
| foreach($files as $file) { |
| $matches = array(); |
| if (preg_match('/^\/home\/data\/httpd\/writable\/projects\/(?<wg>.+)\-(?<date>\d\d\d\d\-\d\d\-\d\d)\-(?<time>\d\d\d\d)\.html$/', $file, $matches)) { |
| if (preg_match('/0[123]$/',$matches['date'])) { |
| $dates[$matches['date']] = $matches['date']; // eliminate duplicates |
| } |
| } |
| } |
| |
| if ($dates) { |
| $Nav->addNavSeparator("Previous Reports", null); |
| krsort($dates); |
| $count = 0; |
| foreach($dates as $date) { |
| if ($count++ >= 18) break; |
| $Nav->addCustomNav("{$date}", "?date={$date}", "_self", 2); |
| } |
| } |
| |
| if (isset($_GET['date']) && preg_match('/\d\d\d\d\-\d\d\-\d\d/', $_GET['date'])) { |
| |
| // We just want the first one that we find. |
| foreach(glob("/home/data/httpd/writable/projects/kpi-{$_GET['date']}-*.html") as $file) { |
| include $file; |
| break; |
| } |
| } else { |
| include "/home/data/httpd/writable/projects/kpi.html"; |
| } |
| |
| ?> |
| |
| |
| </div> |
| </div> |
| |
| <?php |
| $html = ob_get_contents(); |
| ob_end_clean(); |
| |
| $App->generatePage(null, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |