| <?php |
| /** |
| * Copyright (c) 2014, 2015, 2018 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/ |
| * |
| * Contributors: |
| * Christopher Guindon (Eclipse Foundation) - initial API and implementation |
| * |
| * 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/breadcrumbs.class.php"); |
| |
| $App = new App(); |
| $Theme = $App->getThemeClass(); |
| $Breadcrumb = new Breadcrumb(); |
| |
| $pageTitle = "Search eclipse.org"; |
| |
| $searchID = 'p3ec0igo0qq'; |
| $domain = $App->getEclipseDomain(); |
| $searchParams = ' resultsUrl="https://' . $domain['domain'] . '/home/search.php"'; |
| $httpParam='q'; |
| $searchResultString = "Search"; |
| $search_str = filter_var($App->getHTTPParameter($httpParam), FILTER_SANITIZE_STRING); |
| |
| // newsletter search |
| if (isset($_GET['n'])){ |
| $searchID = '9igyhchnmqc'; |
| $pageTitle = "Search Eclipse Newsletters"; |
| $searchParams = ' queryParameterName="n" as_sitesearch="www.eclipse.org/community/eclipse_newsletter/"'; |
| $httpParam = 'n'; |
| $searchResultString = "Eclipse Newsletters search"; |
| } |
| |
| $Breadcrumb->insertCrumbAt(1, $pageTitle,"/home/search.php", "_self"); |
| if (!empty($search_str)) { |
| $pageTitle = $searchResultString.' results for ' . $search_str; |
| $Breadcrumb->insertCrumbAt(2,$pageTitle, "/home/search.php", "_self"); |
| } |
| |
| $Breadcrumb->removeCrumb($Breadcrumb->getCrumbCount() -1); |
| $Breadcrumb->removeCrumb($Breadcrumb->getCrumbCount() -1); |
| |
| $Theme->setPageTitle($pageTitle); |
| $Theme->setPageKeywords("search, search results, search eclipse.org"); |
| $Theme->setDisplayGoogleSearch(FALSE); |
| $Theme->setBreadcrumb($Breadcrumb); |
| |
| // Place your html content in a file called content/en_pagename.php |
| ob_start(); |
| include("content/en_" . $App->getScriptName()); |
| $html = ob_get_clean(); |
| |
| $Theme->setHtml($html); |
| $Theme->generatePage(); |