blob: 2ddec793efc4695dd8f9132d96de060576a87632 [file] [log] [blame]
<?php
$documentRoot = $_SERVER['DOCUMENT_ROOT'];
require_once ($documentRoot . "/membership/promo/promos.php");
include_once('content/downloadPromos.php');
$adNo = ""; $_preview = "";
if (isset($_GET['adNo'])) {
$adNo = $_GET['adNo'];
}
if (isset($_GET['preview'])) {
$_preview = $_GET['preview'];
}
//Adding a 100% counter for the downloads page
$impression = new CampaignImpression('DOWNLOADPAGE', $_SERVER['REQUEST_URI'], @gethostbyaddr($_SERVER['REMOTE_ADDR']));
$impression->recordImpression();
$promo = chooseDownloadAd($adNo);
ob_start();
if (!isset($_GET['osType'])) {
$osDisplay = $App->getClientOS();
}
else {
$osDisplay = $_GET['osType'];
}
$osWarning = "";
//$phpWarning = "<b>Looking for the Eclipse for PHP Developers Package? <a href='/downloads/php_package.php'>More Info</a></b>";
$junoNotice = "<b><a href='/donate/'>Friends of Eclipse</a> - Eclipse Juno is ready! <a href='http://friends.eclipse.org/juno.html'>Download Now</a></b>";
$defaultPath = ($App->devmode == TRUE) ? $_SERVER['DOCUMENT_ROOT'] . '/downloads-xml/' : '/home/data/httpd/writable/community/';
//$defaultPath = $documentRoot . '/downloads/content/';
switch ($osDisplay) {
case "win32":
$display = "Windows";
$packagesDetails = "releaseCacheWin.xml";
break;
case "win64":
$display = "Windows";
$packagesDetails = "releaseCacheWin.xml";
break;
case "linux":
$display = "Linux";
$packagesDetails = "releaseCacheLinux.xml";
//$osWarning = "<b>Linux users please note:</b> Eclipse on GCJ is untested. Please see the Linux <a href='http://wiki.eclipse.org/SDK_Known_Issues#Linux_issues'>Known Issues</a> document.<br />";
break;
case "linux-x64":
$display = "Linux";
$packagesDetails = "releaseCacheLinux.xml";
//$osWarning = "<b>Linux users please note:</b> Eclipse on GCJ is untested. Please see the Linux <a href='http://wiki.eclipse.org/SDK_Known_Issues#Linux_issues'>Known Issues</a> document.<br />";
break;
case "macosx":
$packagesDetails = "releaseCacheCocoa.xml";
$display = "Mac OS X";
$osWarning = "<b>Mac OS X users please note:</b> Eclipse requires Mac OS X 10.5 (Leopard) or greater.<br />";
break;
case "carbon";
$packagesDetails = "releaseCacheCarbon.xml";
$display = "Mac OS X";
$osWarning = "<b>Mac OS X users please note:</b> Eclipse requires Mac OS X 10.5 (Leopard) or greater.<br />";
break;
case "cocoa64":
$packagesDetails = "releaseCacheCocoa.xml";
$display = "Mac OS X";
$osWarning = "<b>Mac OS X users please note:</b> Eclipse requires Mac OS X 10.5 (Leopard) or greater.<br />";
break;
default:
$display = "Windows";
$packagesDetails = "releaseCacheWin.xml";
//$packagesDetails = $documentRoot . "/downloads/content/heliosCacheWin.xml";
break;
}
function featuredRow ($package, $display, $zebra) {
ob_start();
?>
<div class="row clearfix <?php if ($zebra) { print 'zebra'; }?>">
<div class="icon"><img src="<?php print $package['icon'];?>" width="32"/></div>
<div class="text">
<span class="title"><a href="<?php print $package['url']?>"><?php print $package['name'];?></a></span>, <?php print $package['size'];?></a><br/>
<span class="downloadCounts">Downloaded <?php print number_format($package['downloadCount']);?> Times</span><a class="details" href="<?php print $package['url']?>">Details</a>
<?php if (stripos($package['name'], 'classic') != 0) {?>&nbsp; <a class="details" href="http://download.eclipse.org/eclipse/downloads/">Other Downloads</a><?php }?>
</div>
<div class="download">
<div class="downloadArrow">
<img src="http://dev.eclipse.org/large_icons/actions/go-bottom.png"><br/>
</div>
<a class="downloadLink" href="<?php print $package['downloadurl'];?>"><?php print $display;?> 32 Bit</a><br/>
<?php if ($package['downloadurl64'] != "") {?>
<a class="downloadLink" href="<?php print $package['downloadurl64'];?>"><?php print $display;?> 64 Bit</a>
<?php } ?>
</div>
</div>
<?php
return ob_get_clean();
}
function otherRow ($package) {
ob_start();
?>
<li class="row">
<span class="title"><a href="<?php print $package['url']?>"><?php print $package['name'];?></a></span>, <?php print $package['size'];?></span>
<a class="downloadLink" href="<?php print $package['downloadurl'];?>">Download</a>
</li>
<?php
return ob_get_clean();
}
$random = rand(0,100);
$xml = simplexml_load_file($defaultPath . $packagesDetails);
$featuredRows = 15;
$count = 0;
$zebra = TRUE;
$featuredRowsHTML = "";
foreach ($xml->package as $package) {
if ($count < $featuredRows) {
$count ++;
if (!$_preview){
if ($count == 4 && $random <= 24) {
//Promoted Download Ad Gets Inserted Here
$featuredRowsHTML .= actuateDownload($package, $display, 'promo');
}
elseif($count == 4 && $random <= 48) {
$featuredRowsHTML .= springsourceDownload($package, $display, 'promo');
}
elseif($count == 4 && $random <= 60) {
$featuredRowsHTML .= eucalyptusDownload($package, $display, 'promo');
}
elseif($count == 4 && $random <= 72) {
$featuredRowsHTML .= eucalyptusDownload_2($package, $display, 'promo');
}
elseif($count == 4 && $random <= 96) {
$featuredRowsHTML .= xoredDownload($package, $display, 'promo');
}
}
else {
if ($count == 4 && $_preview == 'actuate') {
$featuredRowsHTML .= actuateDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'nuxeo') {
$featuredRowsHTML .= nuxeoDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'cloudbees') {
$featuredRowsHTML .= cloudbeesDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'springsource') {
$featuredRowsHTML .= springsourceDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'jboss') {
$featuredRowsHTML .= jbossDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'umllab') {
$featuredRowsHTML .= umllabDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'jrebel') {
$featuredRowsHTML .= jrebelDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'eucalyptus') {
$featuredRowsHTML .= eucalyptusDownload($package, $display, 'promo');
}
if ($count == 4 && $_preview == 'eucalyptus_2') {
$featuredRowsHTML .= eucalyptusDownload_2($package, $display, 'promo');
}
if($count == 4 && $_preview == 'xored') {
$featuredRowsHTML .= xoredDownload($package, $display, 'promo');
}
}
$featuredRowsHTML .= featuredRow($package, $display, $zebra);
$zebra = !$zebra;
}
else {
$otherRowsHTML .= otherRow($package);
}
}
?>
<style>
.rightContent ul {
margin-bottom: 1em;
}
</style>
<div class="wideContainer">
<div class="downloadHeader">
<ul class="selector">
<li><a href="/downloads/" class="active" >Packages</a></li>
<li><a href="/downloads/index-developer.php">Developer Builds</a></li>
<li><a href="/downloads/index_project.php">Projects</a></li>
<!-- <li><a class="junoTorrents" href="http://build.eclipse.org/technology/phoenix/torrents/juno/">Juno Torrents</a></li> -->
</ul>
<div style="float:right; margin: 72px 0px 0 0;"><iframe src='http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/pages/Eclipse/259655700571&layout=button_count&show_faces=false&width=90&action=like' style='border: medium none; overflow: hidden; width: 90px; height: 22px;' frameborder='0' scrolling='no'></iframe></div>
<div style="float:right; margin:72px 17px 0 0;"><a href="https://twitter.com/EclipseFdn" class="twitter-follow-button" data-show-count="false">Follow @EclipseFdn</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>
</div>
<div class="contentArea">
<div class="leftContent">
<div class="descriptionBar">
<div class="descriptionRight">
<!--<span id="texttwo"><a href="compare.php">Compare Packages</a></span>
<span id="textthree"><a href="http://wiki.eclipse.org/Older_Versions_Of_Eclipse">Older Versions</a></span> -->
</div>
<div class="descriptionOS">
<span id="descriptionText">Eclipse Juno (4.2) SR2 Packages</span> for
<select id="osSelect">
<option <?php if ($osDisplay == 'win32') echo "selected"?> value="win32">Windows</option>
<option <?php if ($osDisplay == 'linux' || $osDisplay == 'linux-x64') echo "selected"?> value="linux">Linux</option>
<option <?php if ($osDisplay == 'macosx') echo "selected"?> value="macosx">Mac OS X (Cocoa)</option>
</select>
</div>
</div>
<?php if ($osWarning != "") { ?>
<div class="osWarning"><?php print $osWarning;?></div>
<?php }?>
<div class="featuredRows clearfix">
<?php print $featuredRowsHTML; ?>
</div>
<?php /*
<div class="moreBlock clearfix">
<h3>Other Packages</h3>
<ul class="col1">
<?php print $otherRowsHTML; ?>
</ul>
</div>
*/ ?>
<div id="googleAds">
<script type="text/javascript"><!--
google_ad_client = "pub-6797025590085056"; google_ad_slot = "4661560739"; google_ad_width = 468; google_ad_height = 60;
//-->
</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
</div>
<div class="rightContent">
<h3>Installing Eclipse</h3>
<ul id="installingEclipse">
<li><a href="http://wiki.eclipse.org/Eclipse/Installation">Install Guide</a></li>
<li><a href="compare.php">Compare/Combine Packages</a></li>
<li><a href="http://wiki.eclipse.org/SDK_Known_Issues">Known Issues</a></li>
<li><a href="http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-129.htm">Updating Eclipse</a></li>
</ul>
<div class="ad">
<?php print $promo; ?>
</div>
<h3>Related Links</h3>
<ul id="relatedLinks">
<!-- <li><a href="http://wiki.eclipse.org/CVS_Howto">Source Code</a></li> -->
<li><a href="http://help.eclipse.org">Documentation</a></li>
<li><a href="/donate/">Make a Donation</a></li>
<li><a href="/forums/">Forums</a></li>
<li><a href="/juno/">Eclipse Juno (4.2)</a>
<li><a href="/indigo/">Eclipse Indigo (3.7)</a>
<li><a href="http://wiki.eclipse.org/Older_Versions_Of_Eclipse">Older Versions</a></li>
</ul>
<? /* <div class="ad">
<a href="/community/training/classes.php">
<img src="/community/training/traininggraphic_125x125.jpg" border="0" /></a>
</div>
*/ ?>
<h3 class="">Hint:</h3>
<p class="jre">You will need a <a href="/downloads/moreinfo/jre.php">Java runtime environment (JRE)</a> to use Eclipse (Java SE 6 or greater is recommended). All downloads are provided under the terms and conditions of the <a href="/legal/epl/notice.php">Eclipse Foundation Software User Agreement</a> unless otherwise specified.</p>
</div>
</div>
</div>
<?
$html = ob_get_clean();
?>