| <?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 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'; |
| require_once dirname(__FILE__) . '/../classes/database.inc'; |
| require_once dirname(__FILE__) . '/../classes/common.php'; |
| |
| $App = new App (); |
| $Nav = new Nav (); |
| $Menu = new Menu (); |
| include ($App->getProjectCommon ()); |
| |
| $pageTitle = "Eclipse Project API Test"; |
| $pageKeywords = ""; |
| $pageAuthor = "Wayne Beaton"; |
| |
| $id = $_GET['id']; |
| if (!isValidProjectId($id)) exit; |
| |
| $url = 'https://projects.eclipse.org/api/projects/' . preg_replace('/\./','_',$id); |
| $json = getUrlContents($url); |
| $data = json_decode($json, true); |
| |
| ob_start (); |
| ?> |
| <div id="maincontent"> |
| <div id="midcolumn"> |
| <h1><?=$pageTitle?></h1> |
| <p> |
| <strong>EXPERIMENTAL!</strong> |
| </p> |
| <p> |
| This page is not useful. |
| </p> |
| |
| <pre> |
| <?php |
| print_r($data); |
| ?> |
| </pre> |
| |
| </div> |
| </div> |
| |
| <?php |
| $html = ob_get_contents (); |
| ob_end_clean (); |
| $App->generatePage ( $theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html ); |
| ?> |