diff --git downloadsites/eclipse/downloads/createIndex4x.php downloadsites/eclipse/downloads/createIndex4x.php index fd9066e..4145d7e 100644 --- downloadsites/eclipse/downloads/createIndex4x.php +++ downloadsites/eclipse/downloads/createIndex4x.php @@ -1,26 +1,79 @@ - - - - - - -Eclipse Project Downloads - + $op = '<' . '?php' ; + $cl = ' ?' . '>'; + + //options: php, html. If not define default + $layout = (!isset($_GET['layout']) || ($_GET['layout'] != "php" && $_GET['layout'] != "html")) ? 'default' : $_GET['layout']; + + ob_start(); + + switch($layout){ + case 'html': + ?> + + + + + + <?php print $pageTitle;?> + + + + $pageTitle = ""; + $pageKeywords = ""; + $pageAuthor = ""; + 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()); + $App->AddExtraHtmlHeader(''); + ob_start(); + + AddExtraHtmlHeader(''); + break; + }?> + +
\n"; + print "\n"; return; } // get build name, date and time @@ -145,13 +197,13 @@ // presumably this particular md5 was choosen since last one made, I'd guess? //$build_done=file_exists("$dropDir/checksum/swt-$buildName-win32-wce_ppc-arm-j2me.zip.md5"); $build_done=file_exists("$dropDir/eclipse-SDK-$buildName-linux-gtk.tar.gz"); - echo "\n"; + print "\n"; return $buildName; } ?> @@ -226,7 +278,7 @@ if ($anEntry != "." && $anEntry!=".." && $anEntry!="TIME" && startsWithDropPrefix($anEntry,$dropPrefix)) { $parts = explode("-", $anEntry); - // echo "

an entry: $anEntry\n"; + // print "

an entry: $anEntry\n"; if (count($parts) == 3) { $buckets[$parts[0]][] = $anEntry; @@ -289,8 +341,8 @@ $prefix=$typeToPrefix[$value]; // if empty bucket, do not print this row if (array_key_exists($prefix,$buckets)) { - echo "

\n"; - echo "\n"; + print "\n"; + print "\n"; if (array_key_exists($prefix,$latestFile)) { @@ -299,7 +351,7 @@ $parts = explode("-", $fileName); // Uncomment the line below if we need click through licenses. - // echo "\n"; + // print "\n"; // Comment the line below if we need click through licenses. @@ -308,13 +360,13 @@ $buildName=$parts[1]; } if ($fileName == "") { - echo "\n"; + print "\n"; } else { - echo "\n"; + print "\n"; } $buildName = printBuildColumns($fileName, $parts); - echo "\n"; - echo "\n"; + print "\n"; + print "\n"; } } ?> @@ -327,31 +379,31 @@ // skip whole section, if bucket is empty if (array_key_exists($prefix,$buckets)) { - echo "
- Eclipse Project .x Stream Downloads
+ Eclipse Project .x Stream Downloads
Latest downloads from the Eclipse project
@@ -55,7 +108,7 @@ Software User Agreement unless otherwise specified.

-

Eclipse .x downloads are available.

+

Eclipse .x downloads are available.

See the main Eclispe download site for other packages and projects.

Help out with Eclipse translations - check out the Babel project.

If you prefer, try downloading with the SDK Torrents

@@ -79,7 +132,7 @@ // sanity check input if (isset($dirName) && strlen($dirName) > 0) { $firstChar = substr($dirName, 0, 1); - //echo "first char: ".$firstChar; + //print "first char: ".$firstChar; foreach($dropPrefix as $type) { if ($firstChar == "$type") { $result = true; @@ -89,7 +142,7 @@ } } else { - echo "dropPrefix not defined as expected\n"; + print "dropPrefix not defined as expected\n"; } return $result; } @@ -97,7 +150,6 @@ // hard code for now the tests ran on one box // https://bugs.eclipse.org/bugs/show_bug.cgi?id=378706 return 1; - global $subdirDrops; $testBoxes=array("linux", "macosx", "win32"); $length=count($testBoxes); @@ -120,7 +172,7 @@ global $subdirDrops; // no file name, write empty column if ($fileName == "") { - echo "
\n"; + print "\n"; // hard code for now the build is done // https://bugs.eclipse.org/bugs/show_bug.cgi?id=378706 // if ($build_done) { if (true) { $boxes=runTestBoxes($fileName); - echo "\"Build\n"; + print "\"Build\n"; //$testResults="$dropDir/testresults/xml"; //if (file_exists("$testResults")) { switch ($boxes) { @@ -160,21 +212,21 @@ //if ($diff > 480) { // for now, hard code to "0" since we are not reunning tests if ($diff > 0) { - echo "\"Regression\n"; + print "\"Regression\n"; } else { - echo "\"Regression\n"; + print "\"Regression\n"; } break; case 5: - echo "\"Tests\n"; + print "\"Tests\n"; break; default: // if more than 12 hours then consider that the regression tests did not finish if ($diff > 720) { - echo "\"Tests\n"; + print "\"Tests\n"; } else { - echo "\"Tests\n"; + print "\"Tests\n"; } } //break; @@ -184,9 +236,9 @@ // $perfsFile="$perfsDir/performance.php"; // if (file_exists("$perfsFile")) { // if (file_exists("$perfsDir/global.php")) { - //echo "\"Performance\n"; + //print "\"Performance\n"; // } else { - // echo "\"No\n"; + // print "\"No\n"; /// } // } else { // if (file_exists("$perfsDir/consolelogs")) { @@ -197,9 +249,9 @@ // } else { // $reason="either they were not stored in DB or not generated"; // } - // echo "\"No\n"; + // print "\"No\n"; //} else { - // echo "\"Performance\n"; + // print "\"Performance\n"; // } // } // } @@ -208,12 +260,12 @@ else { // if more than 5 hours then consider that the build did not finish if ($diff > 300) { - echo "\"Build\n"; + print "\"Build\n"; } else { - echo "\"Build\n"; + print "\"Build\n"; } } - echo "
$value
$value$parts[1]$parts[1]$buildName$buildName$timeStamps[$fileName]
$timeStamps[$fileName]
\n"; + print "
\n"; // header, colored row - echo "\n"; + print "\n"; // name attribute can have no spaces, so we tranlate them to underscores // (could effect targeted links) $valueName=strtr($value,' ','_'); - echo "\n"; - echo "\n"; + print "\n"; + print "\n"; - echo "\n"; - echo "
\n"; - echo "$value\n"; - echo "
\n"; + print "$value\n"; + print "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + print "\n"; + print "\n"; - echo "
\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + print "\n"; + print "\n"; + print "\n"; - echo "\n"; + print "\n"; $aBucket = $buckets[$prefix]; if (isset($aBucket)) { @@ -359,34 +411,57 @@ foreach($aBucket as $innerValue) { $parts = explode("-", $innerValue); - echo "\n"; + print "\n"; // Uncomment the line below if we need click through licenses. - // echo "\n"; + // print "\n"; // Comment the line below if we need click through licenses. $buildName=$innerValue; if (count ($parts)==3) { - echo "\n"; + print "\n"; } else if (count ($parts)==2) { - echo "\n"; + print "\n"; } else { - echo "\n"; + print "\n"; } $buildName = printBuildColumns($innerValue, $parts); - echo "\n"; - echo "\n"; + print "\n"; + print "\n"; } } - echo "
Build NameBuild StatusBuild DateBuild NameBuild StatusBuild Date
$parts[1]$parts[1]$parts[1]$parts[1]$innerValue$innerValueUnexpected numberof parts?Unexpected numberof parts?$timeStamps[$innerValue]
$timeStamps[$innerValue]
\n"; - echo "
\n"; + print "
\n"; + print "\n"; + print "\n"; } } - -?> - - + print '
'; + $html = ob_get_clean(); + + switch($layout){ + case 'html': + print $html; + print ''; + print ''; + break; + + case 'php': + print $html; + print $op; ?> + + $html = ob_get_clean(); + $App->Promotion = FALSE; + $App->generatePage('Nova', $Menu, NULL , $pageAuthor, $pageKeywords, $pageTitle, $html); + + Promotion = FALSE; + $App->generatePage('Nova', $Menu, NULL , $pageAuthor, $pageKeywords, $pageTitle, $html); + break; + }