|  | <?php  																														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();		include($App->getProjectCommon());    # All on the same line to unclutter the user's desktop' | 
|  | /******************************************************************************* | 
|  | * Copyright (c) 2009-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: Christopher Guindon (Eclipse Foundation) | 
|  | * Nathan Gervais (Eclipse Foundation) | 
|  | * | 
|  | *******************************************************************************/ | 
|  |  | 
|  | # | 
|  | # Begin: page-specific settings.  Change these. | 
|  | $pageTitle 		= "Eclipse.org - Kepler Simultaneous Release : Projects"; | 
|  | $pageKeywords	= "eclipse kepler, release, simultaneous, release train, kepler"; | 
|  | $pageAuthor		= "Christopher Guindon"; | 
|  |  | 
|  | function hack_array_sort($a, $subkey) { | 
|  | foreach($a as $k=>$v) { | 
|  | $b[$k] = strtolower($v[$subkey]); | 
|  | } | 
|  | asort($b); | 
|  | foreach($b as $key=>$val) { | 
|  | $c[] = $a[$key]; | 
|  | } | 
|  |  | 
|  | return $c; | 
|  | } | 
|  | $project_count = 0; | 
|  | $url = "/home/data/httpd/writable/community/projectsReleaseKepler.json"; | 
|  | $json = file_get_contents($url); | 
|  | $data = json_decode($json); | 
|  |  | 
|  | $projects = array(); | 
|  | if(isset($data->kepler->projects) && !empty($data->kepler->projects)){ | 
|  | foreach($data->kepler->projects as $project){ | 
|  | $version = array(); | 
|  | if(!empty($project->releases)){ | 
|  | foreach($project->releases as $r){ | 
|  | $version[] = $r->name; | 
|  | } | 
|  | } | 
|  | $version_link = '<a href="' . $project->download . '" title="Download ' . $project->name . '">Download</a>'; | 
|  | if(!empty($version)){ | 
|  | $version_link = (!empty($project->download)) ? '<a href="' . $project->download . '" title="Download ' . $project->name . '">' . implode(', ', $version) . '</a>' : implode(', ', $version); | 
|  | } | 
|  |  | 
|  | $img = ""; | 
|  | //$new = ($project->new == 1) ? '<img src="images/legend_new.png" alt="New" />' : ''; | 
|  | //$info = ($project->overview) ? '<a href="' . $project->overview . '"><img src="images/legend_info.png" alt="More info image"/></a>' : ''; | 
|  | $new = ""; | 
|  | $info = ""; | 
|  | $output = (!empty($project->website)) ? '<a href="' .  $project->website . '" title="' . $project->name . ' website">' . $project->name . '</a> ' : $project->name; | 
|  | $projects[] = array( | 
|  | 'name' =>  $project->name, | 
|  | 'output' => '<dl><dt>' . $output . $new .  $info . '</dt><dd>' . $version_link . '</dd></dl>' | 
|  |  | 
|  | ); | 
|  | } | 
|  |  | 
|  | $project_count = count($projects); | 
|  | if(!empty($projects)){ | 
|  | $projects = hack_array_sort($projects, 'name'); | 
|  |  | 
|  | } | 
|  | }else{ | 
|  | $error = '<p>An error has occured from fetching the project feed.<br/> Please try again later.</p><p> Click here to return to <a href="/kepler">Kepler homepage</a>.</p>'; | 
|  | } | 
|  |  | 
|  | # Paste your HTML content between the EOHTML markers! | 
|  | ob_start(); | 
|  | ?> | 
|  | <div id="fullcolumn" class="kepler subpage projects"> | 
|  | <div id="page-left"> | 
|  | <div class="page-container"> | 
|  | <a href="/kepler/" class="nav-button"><sup>«</sup>Back</a> | 
|  | <h2 id="h2_projects">Projects</h2> | 
|  | <span class="download-heading">Download <img src="images/icon_download.png" alt="Download icon"/></span> | 
|  | <!--  <ul id="ul_legend" class="no_bullets"> | 
|  | <li class="new">new</li> | 
|  | <li class="info">info</li> | 
|  | </ul>--> | 
|  | <?php | 
|  | if(!isset($error)){ | 
|  | for ($i = 0; $i <= min(35, $project_count-1); $i++) { | 
|  | print $projects[$i]['output']; | 
|  | } | 
|  | }else{ | 
|  | print $error; | 
|  | } | 
|  |  | 
|  | ?> | 
|  |  | 
|  | </div> | 
|  | </div> | 
|  |  | 
|  | <div id="page-right"> | 
|  | <div class="page-container"> | 
|  | <span class="download-heading">Download <img src="images/icon_download.png" alt="Download icon"/></span> | 
|  | <!--  <a href="/kepler/" class="nav-button">Back<sup>»</sup></a>--> | 
|  | <?php | 
|  | for ($i = 36; $i <= min(100, $project_count-1); $i++) { | 
|  | print $projects[$i]['output']; | 
|  | } | 
|  | ?> | 
|  | </div> | 
|  | </div> | 
|  | </div> | 
|  | <? | 
|  | $html = ob_get_clean(); | 
|  | # Generate the web page | 
|  | $App->Promotion = TRUE; | 
|  | $App->AddExtraHtmlHeader('<link href="http://fonts.googleapis.com/css?family=EB+Garamond" rel="stylesheet" type="text/css"/>'); | 
|  | $App->AddExtraHtmlHeader('<link type="text/css" href="/kepler/css/styles.min.css" rel="stylesheet"/>'); | 
|  | $App->AddExtraHtmlHeader('<!--[if IE 7]><link rel="stylesheet" type="text/css" href="/home/content/ie7_nova.css" media="screen"/><![endif]-->'); | 
|  | $App->generatePage('Nova', $Menu, NULL , $pageAuthor, $pageKeywords, $pageTitle, $html); | 
|  | ?> |