| <?php |
| /******************************************************************************* |
| * Copyright (c) 2010 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://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Wayne Beaton (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| header("Pragma: no-cache"); |
| |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/common.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/debug.php"); |
| |
| /* |
| * Gather up the parameters from the request so that we can |
| * include them in URLs that we place on the page. I suppose that |
| * we could use cookies... |
| * |
| * TODO Consider using cookies. |
| */ |
| function cleanupKey($key) { |
| return preg_replace('/[^-a-zA-Z0-9_]/', '', $key); |
| } |
| |
| function cleanupValue($value) { |
| if (isValidProjectId($value)) return $value; |
| return preg_replace('/[^-a-zA-Z0-9_]/', '', $value); |
| } |
| |
| $parameters = ''; |
| $separator = '?'; |
| foreach($_GET as $key => $value) { |
| $parameters .= $separator . cleanupKey($key) . '=' . cleanupValue($value); |
| $separator = '&'; |
| } |
| |
| $theme = "solstice"; |
| $App->Promotion = TRUE; |
| |
| $Nav->addNavSeparator("Project Tools", "index.php$parameters"); |
| |
| $Nav->addNavSeparator( "IP", null); |
| $Nav->addCustomNav("IP Log Generator", "/projects/ip_log.php$parameters", "_self", 2); |
| $Nav->addCustomNav("Contribution Review", "/projects/tools/ip_contribution_review.php$parameters", "_self", 2); |
| $Nav->addCustomNav("CQ Overview", "/projects/tools/ip_cq_overview.php$parameters", "_self", 2); |
| $Nav->addCustomNav("Downloads Report", "/projects/tools/downloads.php$parameters", "_self", 2); |
| if (isset($_GET['id'])) { |
| if (isValidProjectId($id = $_GET['id'])) { |
| $Nav->addCustomNav("Project PMI Page", "https://projects.eclipse.org/projects/$id", "_self", 2); |
| $Nav->addCustomNav("Next release", "https://projects.eclipse.org/projects/$id/next-release", "_self", 2); |
| } |
| } |
| |
| $Nav->addNavSeparator( "Lifecycle", null); |
| $Nav->addCustomNav("Proposals", "/projects/tools/proposals.php$parameters", "_self", 2); |
| $Nav->addCustomNav("Reviews", "/projects/tools/reviews.php$parameters", "_self", 2); |
| |
| $info = user_info_html(); |
| $Nav->setHTMLBlock("<div style=\"border:solid;border-width:1px;border-color:gray;margin:5px;margin-top:15px;padding:5px\">$info</div>"); |
| ?> |