blob: 5695c1d9b11fe18bb46829b5a18e6a877dc9a314 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2017 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://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christopher Guindon (Eclipse Foundation) - Initial implementation
*******************************************************************************/
require_once(realpath(dirname(__FILE__) . "/../eclipse.org-common/system/app.class.php"));
require_once(realpath(dirname(__FILE__) . "/../eclipse.org-common/system/eclipseenv.class.php"));
require_once(realpath(dirname(__FILE__) . "/../eclipse.org-common/classes/downloads/eclipseInstaller.php"));
$App = new App();
$EclipseEnv = new EclipseEnv();
$eclipse_env = $EclipseEnv->getEclipseEnv();
$EclipseInstaller = new EclipseInstaller('oxygen/R');
$EclipseInstaller->setInstallerLayout('layout_a');
$links = array("links" => array("#"));
if ($eclipse_env['shortname'] === "prod") {
$links = $EclipseInstaller->getInstallerLinks('64bit');
}
$oxygen_content_json = dirname(__FILE__) . "/oxygen-content.json";
#redirect the user if he already saw the oxygen landing page
$uri = explode("/", $_SERVER['REQUEST_URI']);
if (strtolower($uri[1]) != 'oxygen') {
if (!isset($_COOKIE['eclipse_oxygen'])){
setcookie('eclipse_oxygen', 'eclipse_oxygen', time()+3600*24*365, "/", "eclipse.org");
}
else {
header('Location: /home/index.php', TRUE, 302);
exit();
}
}
// Custom theme variables
$variables = array();
$variables['hide_breadcrumbs'] = TRUE;
$variables['main_container_classes'] = 'container-full breadcrumbs-offset footer-offset';
$variables['btn_cfa']['text'] = "Donate";
$variables['btn_cfa']['href'] = 'https://www.eclipse.org/donate/';
$variables['btn_cfa']['class'] = 'btn btn-huge btn-oxygen-donate';
$App->setThemeVariables($variables);
$Theme = $App->getThemeClass($theme);
$pageTitle = 'Eclipse Oxygen';
$Theme->setPageAuthor('Eclipse Foundation');
$Theme->setPageKeywords("eclipse oxygen, release, simultaneous, release train, oxygen");
$Theme->setPageTitle($pageTitle);
// 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);
$App->AddExtraJSFooter('<script type="text/javascript" src="/oxygen/public/javascript/oxygen.min.js"></script>');
$Theme->setExtraHeaders('<link href="/oxygen/public/stylesheets/oxygen.min.css" media="screen" rel="stylesheet" type="text/css"/>');
$Theme->generatePage();