experimental work in progress
diff --git a/incubator/commonPages/README.txt b/incubator/commonPages/README.txt
new file mode 100644
index 0000000..27fb60f
--- /dev/null
+++ b/incubator/commonPages/README.txt
@@ -0,0 +1,3 @@
+Most of the files in this directory are
+maintained in webtools cvs's releng.wtptools
+project, in the downloadsites directory.
diff --git a/incubator/commonPages/access_err.gif b/incubator/commonPages/access_err.gif
new file mode 100644
index 0000000..4f0748a
--- /dev/null
+++ b/incubator/commonPages/access_err.gif
Binary files differ
diff --git a/incubator/commonPages/access_warn.gif b/incubator/commonPages/access_warn.gif
new file mode 100644
index 0000000..8386e3e
--- /dev/null
+++ b/incubator/commonPages/access_warn.gif
Binary files differ
diff --git a/incubator/commonPages/api_err.gif b/incubator/commonPages/api_err.gif
new file mode 100644
index 0000000..4054878
--- /dev/null
+++ b/incubator/commonPages/api_err.gif
Binary files differ
diff --git a/incubator/commonPages/api_junit.gif b/incubator/commonPages/api_junit.gif
new file mode 100644
index 0000000..c372377
--- /dev/null
+++ b/incubator/commonPages/api_junit.gif
Binary files differ
diff --git a/incubator/commonPages/api_removed.gif b/incubator/commonPages/api_removed.gif
new file mode 100644
index 0000000..2b1d438
--- /dev/null
+++ b/incubator/commonPages/api_removed.gif
Binary files differ
diff --git a/incubator/commonPages/bottomAndFooter.php b/incubator/commonPages/bottomAndFooter.php
new file mode 100644
index 0000000..7e50d75
--- /dev/null
+++ b/incubator/commonPages/bottomAndFooter.php
@@ -0,0 +1,108 @@
+<table border="0" width="100%" cellpadding="2">
+ <tbody>
+ <tr>
+ <td valign="top" width="40%">
+ <table border="0" cellpadding="2">
+ <tbody>
+ <tr>
+ <td width="100%" bgcolor="#0080c0" valign="top"><b><font
+ face="Arial,Helvetica"><font color="#ffffff">Download Related
+ Links</font> </font></b></td>
+ </tr>
+ <tr>
+ <td valign="top">
+
+
+ <p><a
+ href="http://archive.eclipse.org/webtools/downloads/index.php"
+ target="_top">Archived Builds</a> are previously significant
+ builds that are no longer required, but which we keep on a
+ non-mirrored site, for historical and academic use.</p>
+
+ <?php
+ echo $pageFooterEnd;
+ ?></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+
+ <td />
+
+
+ <td width="45%" valign="top">
+ <table border="0" cellpadding="2">
+ <tbody>
+ <tr>
+ <td width="100%" colspan="4" bgcolor="#0080c0" valign="top"><b><font
+ face="Arial,Helvetica"><font color="#ffffff">Metrics Legend</font>
+ </font></b></td>
+ </tr>
+
+ <tr>
+ <td valign="top"><img src="../commonPages/compile_err.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">compilation errors.</td>
+ <td valign="top"><img src="../commonPages/compile_warn.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">compilation warnings.</td>
+ </tr>
+ <tr>
+ <td valign="top"><img src="../commonPages/access_err.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">Access Rule Violations</td>
+ <td valign="top"><img src="../commonPages/access_warn.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">Access Rule Warnings</td>
+ </tr>
+ <tr>
+ <td valign="top"><img src="../commonPages/junit_err.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">junit failures.</td>
+ <td valign="top"><img src="../commonPages/pending1.gif" width="16" height="16" /></td>
+ <td valign="top" width="50%">Pending results</td>
+ </tr>
+ <tr>
+ <td valign="top"><img src="../commonPages/api_err.gif" width="16" height="16" /></td>
+ <td valign="top" width="50%">API violations.</td>
+
+ <td valign="top"><img src="../commonPages/api_junit.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">APIs without junit testcases.</td>
+ </tr>
+ <tr>
+ <td valign="top"><img src="../commonPages/api_removed.gif" width="16"
+ height="16" /></td>
+ <td valign="top" width="50%">removed APIs.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>(</b>nnn<b>)</b></td>
+ <td valign="top">Number of bundles, jars, and wars, or number of
+ unit tests.</td>
+ <td valign="top"><b>NA</b></td>
+ <td valign="top"><b>N</b>ot <b>A</b>vailable</td>
+ </tr>
+
+
+
+
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<!-- footer -->
+<center>
+<hr />
+<p>All downloads are provided under the terms and conditions of the <a
+ href="http://www.eclipse.org/legal/notice.html">Eclipse.org Software
+User Agreement</a> unless otherwise specified.</p>
+
+<p>If you have problems downloading the drops, contact the <font
+ size="-1" face="arial,helvetica,geneva"><a
+ href="mailto:webmaster@eclipse.org">webmaster</a></font>.</p>
+</center>
+<!-- end footer -->
diff --git a/incubator/commonPages/compileLogSumaryXML.php b/incubator/commonPages/compileLogSumaryXML.php
new file mode 100644
index 0000000..900b20f
--- /dev/null
+++ b/incubator/commonPages/compileLogSumaryXML.php
@@ -0,0 +1,71 @@
+
+<?php
+
+$filename = "$innerValue/compilelogsSummary.xml";
+$prefixForVariable = "code_";
+$compileSummary = simplexml_load_file($filename);
+foreach ($compileSummary->summaryItem as $summaryItem) {
+ $name = $summaryItem->name;
+ $value = $summaryItem->value;
+ $code= "\$" . $prefixForVariable . $name . " = " . $value . ";";
+ //echo "<br />code: " . $code;
+ eval($code);
+}
+
+$filename = "$innerValue/testcompilelogsSummary.xml";
+if (file_exists($filename)) {
+ $prefixForVariable = "test_";
+ $compileSummary = simplexml_load_file($filename);
+ foreach ($compileSummary->summaryItem as $summaryItem) {
+ $name = $summaryItem->name;
+ $value = $summaryItem->value;
+ $code= "\$" . $prefixForVariable . $name . " = " . $value . ";";
+ //echo "<br />code: " . $code;
+ eval($code);
+ }
+} else {
+ $test_totalErrors = 0;
+ $test_totalBundles = 0;
+ $test_totalforbiddenAccessWarningCount = 0;
+ $test_totaldiscouragedAccessWarningCount = 0;
+}
+
+$filename = "$innerValue/unitTestsSummary.xml";
+if (file_exists("$filename")) {
+ $prefixForVariable = "unittest_";
+ $unitTestsSummary = simplexml_load_file($filename);
+ foreach ($unitTestsSummary->summaryItem as $summaryItem) {
+ $name = $summaryItem->name;
+ $value = $summaryItem->value;
+ $code= "\$" . $prefixForVariable . $name . " = " . $value . ";";
+ // echo "<br />code: " . $code;
+ eval($code);
+ }
+}
+else {
+ unset($unittest_grandTotalErrors, $unittest_grandTotalTests);
+}
+
+$totalCommpileErrors = $code_totalErrors + $test_totalErrors;
+$totalCompileOtherWarnings = $code_totalWarnings;
+$totalBundles = $code_totalBundles + $test_totalBundles;
+$totalForbidden = $code_totalforbiddenAccessWarningCount + $test_totalforbiddenAccessWarningCount;
+$totalDiscouraged = $code_totaldiscouragedAccessWarningCount + $test_totaldiscouragedAccessWarningCount;
+
+echo "<td width=\"6%\">($totalBundles)</td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/compile_err.gif\" width=\"16\" height=\"16\"/><font color=red>$totalCommpileErrors</font></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/compile_warn.gif\" width=\"16\" height=\"16\"/><font color=orange>$totalCompileOtherWarnings</font></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/access_err.gif\" width=\"16\" height=\"16\"/><font color=red>$totalForbidden</font></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/access_warn.gif\" width=\"16\" height=\"16\"/><font color=orange>$totalDiscouraged</font></td>";
+
+if (isset($unittest_grandTotalErrors)) {
+ echo "<td width=\"6%\"><img src=\"../commonPages/junit_err.gif\" width=\"16\" height=\"16\"/><font color=red>$unittest_grandTotalErrors</font></td>";
+ echo "<td width=\"6%\">($unittest_grandTotalTests)</td>";
+}
+else {
+ echo "<td width=\"6%\"><img src=\"../commonPages/pending.gif\" width=\"16\" height=\"16\"/></td>";
+ echo "<td width=\"6%\"><img src=\"../commonPages/pending.gif\" width=\"16\" height=\"16\"/></td>";
+}
+
+
+?>
\ No newline at end of file
diff --git a/incubator/commonPages/compile_err.gif b/incubator/commonPages/compile_err.gif
new file mode 100644
index 0000000..c2bfdd6
--- /dev/null
+++ b/incubator/commonPages/compile_err.gif
Binary files differ
diff --git a/incubator/commonPages/compile_warn.gif b/incubator/commonPages/compile_warn.gif
new file mode 100644
index 0000000..cf4fdf9
--- /dev/null
+++ b/incubator/commonPages/compile_warn.gif
Binary files differ
diff --git a/incubator/commonPages/computeMainData.php b/incubator/commonPages/computeMainData.php
new file mode 100644
index 0000000..3567329
--- /dev/null
+++ b/incubator/commonPages/computeMainData.php
@@ -0,0 +1,81 @@
+<?php
+
+
+function computeMainData($buildBranches, $debugScript)
+
+{
+
+ global $buckets, $latestFile, $latestTimeStamp, $timeStamps;
+
+ foreach ($buildBranches as $buildBranch ) {
+
+ if (file_exists($buildBranch) && is_dir($buildBranch)) {
+ $aDirectory = dir($buildBranch);
+ $latestTimeStamp[$buildBranch] = array();
+ $latestFile[$buildBranch] = array();
+
+
+ while (false !== ($anEntry = $aDirectory->read())) {
+
+ // Short cut because we know aDirectory only contains other directories.
+ if ($anEntry != "." && $anEntry!="..") {
+
+ // echo "Debug anEntry: $anEntry<br />" ;
+ $aDropDirectoryName = $buildBranch."/".$anEntry;
+
+
+ if (is_dir($aDropDirectoryName) && is_Readable($aDropDirectoryName)) {
+ $aDropDirectory = dir($aDropDirectoryName);
+ //echo "Debug aDropDirectory: $aDropDirectory->path <br />" ;
+
+ $fileCount = 0;
+ while ($aDropEntry = $aDropDirectory->read()) {
+ // echo "Debug aDropEntry: $aDropEntry<br />" ;
+ if ( (stristr($aDropEntry, ".tar.gz")) || (stristr($aDropEntry, ".zip")) ) {
+ // Count the dropfile entry in the directory (so we won't display links, if not all there
+ $fileCount = $fileCount + 1;
+ }
+ }
+
+ $aDropDirectory->close();
+
+ }
+ // Read the count file
+ $countFile = $buildBranch."/".$anEntry."/files.count";
+ $indexFile = $buildBranch."/".$anEntry."/index.html";
+
+
+ if (!file_exists($indexFile)) {
+ $indexFile = $buildBranch."/".$anEntry."/index.php";
+ }
+
+
+ if (file_exists($countFile) && file_exists($indexFile)) {
+ $anArray = file($countFile);
+ // debug
+ //echo "Number according to files.count: ", $anArray[0];
+ //echo " actual counted files: ", $fileCount;
+
+ // If a match - process the directoryVV -- we simply look that there's more
+ // zip's than we expect, since it frequently breaks where the count is slighly
+ // off, such as when we add, after the fact, an all-in-one zip.
+ if ($anArray[0] <= $fileCount) {
+ // debug
+ //echo "yes, counted equaled expected count<br />";
+
+ $artifactTimeStamp="";
+ $entryParts = explode("-", $anEntry);
+ if (count($entryParts) == 3) {
+ include 'processDropDirectory.php';
+ }
+
+ }
+ }
+
+ }
+ }
+
+ $aDirectory->close();
+ }}
+}
+?>
diff --git a/incubator/commonPages/displayBuildMachine.php b/incubator/commonPages/displayBuildMachine.php
new file mode 100644
index 0000000..891762f
--- /dev/null
+++ b/incubator/commonPages/displayBuildMachine.php
@@ -0,0 +1,25 @@
+<?
+function displayBuildMachine()
+{
+ include 'parseProperties.php';
+ $properties = parseProperties("buildmachineinfo.properties");
+ $constString = "This build brought to you by ";
+ $varString = "";
+ $buildComputerPropValue = $properties["buildComputer"];
+
+ if (strcmp($buildComputerPropValue, "build") == 0) {
+ $varString = "a server donated from lomboz.org";
+ }
+ else {
+ if (strcmp($buildComputerPropValue, "utils") == 0) {
+ $varString = "a server donated from eclipse.org";
+ }
+ else {
+ $varString = " a non-standard build server: ".$buildComputerPropValue;
+ }
+ }
+ $result = $constString.$varString;
+ return $result;
+}
+
+?>
diff --git a/incubator/commonPages/getFreshFromCVS.sh b/incubator/commonPages/getFreshFromCVS.sh
new file mode 100644
index 0000000..f36d9e9
--- /dev/null
+++ b/incubator/commonPages/getFreshFromCVS.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# This script file is to help get fresh files from cvs
+
+if [[ !("${1}" == "patches" || "${1}" == "downloads" || "${1}" == "committers") ]] ; then
+ echo ""
+ echo " Usage: ${0} patches | downloads | committers"
+ echo ""
+else
+
+subdir="${1}"
+
+backupdir="${subdir}TempBackup"
+
+echo " save backup copies ..."
+mkdir $backupdir
+# Note: do not use recurvise, since that would copy all of 'drops'
+cp ${subdir}/* $backupdir
+
+rm ${subdir}/*
+echo " checking out head of $subdir from cvs ..."
+cvs -Q -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d $subdir -r HEAD releng.wtptools/downloadsites/webtools/$subdir
+
+echo " make sure files have proper EOL format ..."
+dos2unix -quiet -keepdate ${subdir}/* > /dev/null 2>/dev/null
+
+fi
diff --git a/incubator/commonPages/handleSummaryResults.php b/incubator/commonPages/handleSummaryResults.php
new file mode 100644
index 0000000..10aa1a1
--- /dev/null
+++ b/incubator/commonPages/handleSummaryResults.php
@@ -0,0 +1,18 @@
+<?php
+// if compilelogsSummary.xml exists, assume the "new way" (summary in xml file).
+// else, assume old way
+//echo "drops/$bValue/$innerValue/compilelogsSummary.xml";
+if (file_exists("$innerValue/compilelogsSummary.xml"))
+{
+ include 'compileLogSumaryXML.php';
+}
+// if compileResults.php exists, assume the "new way" (testResults and compileResult seperated).
+// else, assume old way
+else if (file_exists("$innerValue/compileResults.php"))
+{
+ include 'parse2Handling.php';
+}
+else {
+ include 'parseHandling.php';
+}
+?>
\ No newline at end of file
diff --git a/incubator/commonPages/index.php b/incubator/commonPages/index.php
new file mode 100644
index 0000000..e5d3160
--- /dev/null
+++ b/incubator/commonPages/index.php
@@ -0,0 +1,3 @@
+<?php
+ header("location: downloads/");
+?>
diff --git a/incubator/commonPages/junit_err.gif b/incubator/commonPages/junit_err.gif
new file mode 100644
index 0000000..1b7ff9d
--- /dev/null
+++ b/incubator/commonPages/junit_err.gif
Binary files differ
diff --git a/incubator/commonPages/latestBuilds.php b/incubator/commonPages/latestBuilds.php
new file mode 100644
index 0000000..9f869dc
--- /dev/null
+++ b/incubator/commonPages/latestBuilds.php
@@ -0,0 +1,56 @@
+<?php
+
+$debugLatest=false;
+
+if (!function_exists("computeMainData")) {
+ include 'computeMainData.php';
+}
+
+computeMainData($buildBranches, $debugLatest);
+
+echo "<table border='0' cellpadding='2' width=\"100%\"><tr>";
+echo "<td align=\"center\" bgcolor=\"#0080C0\"><font color=\"#FFFFFF\" face=\"Arial,Helvetica\">";
+echo $mainTableHeader;
+echo "</font></td>";
+echo "</tr></table>";
+
+
+?>
+
+
+<table width="70%" align="center" cellpadding='2'>
+ <tr>
+ <td width="25%"><b>Build Type</b></td>
+ <td width="25%"><b>Build Name</b></td>
+ <td width="15%"><b>Stream</b></td>
+ <td width="40%"><b>Build Date</b></td>
+ </tr>
+
+
+
+ <?php
+ foreach($dropType as $value) {
+ $prefix=$typeToPrefix[$value];
+
+ foreach($buildBranches as $bValue) {
+
+ if (array_key_exists ($bValue, $latestFile) && array_key_exists($prefix, $latestFile[$bValue])) {
+ $fileName = $latestFile[$bValue][$prefix];
+ //echo "Debug: anEntry (filename) indexing timeStamps: ", $fileName, " <br />";
+ echo "<tr>";
+ echo "<td width=\"25%\">$value</td>";
+
+ $buildName=computeBuildName($fileName);
+ $streamName=computeStreamName($bValue);
+ if (sizeof($buildName) > 0) {
+ echo "<td width=\"25%\"><a href=\"$fileName/\">$buildName</a></td>";
+ echo "<td width=\"15%\">$streamName</td>";
+ echo "<td width=\"40%\">$timeStamps[$fileName]</td>";
+ echo "</tr>";
+ }
+ }
+ }
+ }
+ ?>
+
+</table>
diff --git a/incubator/commonPages/parse2Handling.php b/incubator/commonPages/parse2Handling.php
new file mode 100644
index 0000000..fba4219
--- /dev/null
+++ b/incubator/commonPages/parse2Handling.php
@@ -0,0 +1,25 @@
+<?php
+$testResults = parse2_testResults("$innerValue/testResults.php");
+list ($junitFailures) = $testResults;
+
+$compileResults = parse2_compileResults("drops/$bValue/$innerValue/compileResults.php");
+list ($compileErrors, $compileAccessWarnings, $compileOtherWarnings) = $compileResults;
+$testCompileResults = parse2_compileResults("drops/$bValue/$innerValue/testCompileResults.php");
+list ($testCompileErrors, $testCompileAccessWarnings, $testCompileOtherWarnings) = $testCompileResults;
+
+$totalCommpileErrors = $compileErrors + $testCompileErrors;
+// we'll just use code for warnning summaries, for now
+$totalAccessWarnings = $compileAccessWarnings;
+$totalCompileOtherWarnings = $compileOtherWarnings;
+
+echo "<td width=\"6%\"></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/compile_err.gif\" width=\"16\" height=\"16\"/><font color=red>$totalCommpileErrors</font></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/compile_warn.gif\" width=\"16\" height=\"16\"/><font color=orange>$totalCompileOtherWarnings</font></td>";
+if ($junitFailures < 0) {
+echo "<td width=\"6%\"><img src=\"../commonPages/pending.gif\" width=\"16\" height=\"16\"/><font color=red></font></td>";
+}
+else {
+echo "<td width=\"6%\"><img src=\"../commonPages/junit_err.gif\" width=\"16\" height=\"16\"/><font color=red>$junitFailures</font></td>";
+}
+
+?>
\ No newline at end of file
diff --git a/incubator/commonPages/parseHandling.php b/incubator/commonPages/parseHandling.php
new file mode 100644
index 0000000..fb2f2d4
--- /dev/null
+++ b/incubator/commonPages/parseHandling.php
@@ -0,0 +1,11 @@
+
+<?php
+$testResults = parse_testResult("$innerValue/testResults.php");
+list ($compileErrors, $compileWarnings, $junitFailures) = $testResults;
+
+echo "<td width=\"6%\"></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/compile_err.gif\" width=\"16\" height=\"16\"/><font color=red>$compileErrors</font></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/compile_warn.gif\" width=\"16\" height=\"16\"/><font color=orange>$compileWarnings</font></td>";
+echo "<td width=\"6%\"><img src=\"../commonPages/junit_err.gif\" width=\"16\" height=\"16\"/><font color=red>$junitFailures</font></td>";
+
+?>
\ No newline at end of file
diff --git a/incubator/commonPages/parseProperties.php b/incubator/commonPages/parseProperties.php
new file mode 100644
index 0000000..482882b
--- /dev/null
+++ b/incubator/commonPages/parseProperties.php
@@ -0,0 +1,33 @@
+<?php
+
+
+ function parseProperties($filename)
+ {
+ $properties;
+ $i = 0;
+ $handle = fopen($filename, "r");
+ if ($handle)
+ {
+ $size = filesize($filename);
+ $content = fread($handle, $size);
+ fclose($handle);
+
+ $lineArray = explode("\n",$content);
+
+ while(list(,$line) = each($lineArray)) {
+ $line = trim($line);
+ if (strlen($line) > 0) {
+ //echo $line, "<br />";
+ $propertyPair = explode("=", $line);
+ $propertyPair[0] = trim($propertyPair[0], " \"\'");
+ $propertyPair[1] = trim($propertyPair[1], " \"\'");
+
+ $properties[$propertyPair[0]] = $propertyPair[1];
+ $i++;
+ }
+ }
+ }
+ return $properties;
+ }
+
+?>
diff --git a/incubator/commonPages/pending.gif b/incubator/commonPages/pending.gif
new file mode 100644
index 0000000..66db2a6
--- /dev/null
+++ b/incubator/commonPages/pending.gif
Binary files differ
diff --git a/incubator/commonPages/pending1.gif b/incubator/commonPages/pending1.gif
new file mode 100644
index 0000000..1b2ea6e
--- /dev/null
+++ b/incubator/commonPages/pending1.gif
Binary files differ
diff --git a/incubator/commonPages/processDropDirectory.php b/incubator/commonPages/processDropDirectory.php
new file mode 100644
index 0000000..a6ed2bc
--- /dev/null
+++ b/incubator/commonPages/processDropDirectory.php
@@ -0,0 +1,48 @@
+<?php
+// echo "Debug: yes, counted parts was 3<br />";
+$buildTypePart = $entryParts[0];
+$buckets[$buildBranch][$buildTypePart][] = $aDropDirectoryName;
+// if ($debugScript) {
+//echo "Debug: Started processDropDirectory with following <br />";
+//echo " buildBranch: $buildBranch <br />";
+//echo " buildTypePart: $buildTypePart <br />";
+//echo " anEntry: $anEntry <br />";
+// }
+
+$timePart = $entryParts[2];
+$year = substr($timePart, 0, 4);
+$month = substr($timePart, 4, 2);
+$day = substr($timePart, 6, 2);
+$hour = substr($timePart,8,2);
+$minute = substr($timePart,10,2);
+
+$newTimePart = "$year-$month-$day $hour:$minute UTC";
+
+$timeStamp = strtotime($newTimePart);
+
+$timeStamps[$buildBranch."/".$artifactTimeStamp.$anEntry] = gmdate("D, j M Y -- H:i \(\U\T\C\)", $timeStamp);
+//echo "Debug: anEntry indexing timeStamps: ", $buildBranch."/".$artifactTimeStamp.$anEntry, "<br />";
+// debug
+// echo "<br />buildBranch: $buildBranch <br />";
+// echo "<br />parts[0]: -$buildTypePart- <br />";
+// echo "latestTimeStamp[buildBranch]:";
+// echo $latestTimeStamp[$buildBranch];
+// echo "latestTimeStamp:";
+// echo $latestTimeStamp;
+
+if ((sizeof($latestTimeStamp[$buildBranch]) > 0) &&
+(isset($latestTimeStamp[$buildBranch][$buildTypePart])))
+{
+ if ($timeStamp > $latestTimeStamp[$buildBranch][$buildTypePart])
+ {
+ $latestTimeStamp[$buildBranch][$buildTypePart] = $timeStamp;
+ $latestFile[$buildBranch][$buildTypePart] = $aDropDirectoryName;
+ }
+}
+else
+{
+ $latestTimeStamp[$buildBranch][$buildTypePart] = $timeStamp;
+ $latestFile[$buildBranch][$buildTypePart] = $aDropDirectoryName;
+
+}
+?>
\ No newline at end of file
diff --git a/incubator/commonPages/recentHistory.php b/incubator/commonPages/recentHistory.php
new file mode 100644
index 0000000..e3b279d
--- /dev/null
+++ b/incubator/commonPages/recentHistory.php
@@ -0,0 +1,123 @@
+
+
+<?php
+
+$debugRecentHistory=false;
+
+if (!isset($buckets) || !function_exists("computeMainData")) {
+ include 'computeMainData.php';
+ computeMainData($buildBranches, $debugRecentHistory);
+}
+
+?>
+
+<table border="0" cellpadding="2" width="100%">
+ <tr>
+ <td align="center" bgcolor="#999999"><font color="#FFFFFF"
+ face="Arial,Helvetica">
+ <?php
+ echo "$subsectionHeading";
+ ?>
+ </font></td>
+ </tr>
+</table>
+
+<?php
+
+foreach($dropType as $value) {
+ $prefix=$typeToPrefix[$value];
+
+ if ($debugRecentHistory) {
+ echo "dropType value: $value <br />";
+ echo "prefix: $prefix <br />";
+ }
+
+ echo "<table width=\"100%\" cellpadding='2'>
+ <tr bgcolor=\"#999999\">
+ <td align='left' colspan=\"11\">
+ <a name=\"$prefix\">
+ <font color=\"#FFFFFF\" face=\"Arial,Helvetica\">";
+ echo "$value";
+ echo "</font></a></td>";
+ echo "</tr>";
+
+ echo "<tr>
+ <td width=\"13%\">Build Name</td>
+ <td width=\"8%\">Stream</td>
+ <td width=\"20%\">Build Date</td>
+ <td colspan=\"8\"></td>
+ </tr>";
+
+ if ($debugRecentHistory) {
+ echo "buildBranches: <br />";
+ foreach($buildBranches as $tempbuildBranches) {
+ echo "$tempbuildBranches <br />";
+ }
+ echo "buckets: <br />";
+ if (isset($buckets)) {
+ foreach($buckets as $tempbuckets) {
+ foreach($tempbuckets as $tempbucket) {
+ foreach ($tempbucket as $oneTempBucket) {
+ echo "onetempBucket: $oneTempBucket <br />";
+ }
+ }
+ }
+ }
+ }
+
+ foreach($buildBranches as $bValue) {
+ if ($debugRecentHistory) {
+ echo "loop through each buildBranch: $bValue <br />";
+ echo "isset(\$buckets): " . isset($buckets). "<br />";
+ }
+ if (isset($buckets) && array_key_exists($bValue, $buckets) && array_key_exists($prefix, $buckets[$bValue]))
+ //&& $buckets[$bValue] != NULL && array_key_exists($prefix, $buckets[$bValue]))
+ {
+ if ($debugRecentHistory) {
+ echo "in loop<br />";
+ }
+ echo "<tr><td colspan=\"11\"><hr/></td></tr>";
+ $aBranchBucket = $buckets[$bValue][$prefix];
+ if (isset($aBranchBucket)) {
+ rsort($aBranchBucket);
+ if ($debugRecentHistory) {
+ echo "buckets in this branch: <br />";
+ foreach($aBranchBucket as $tempBucket) {
+ echo "$tempBucket <br />";
+ }
+ }
+
+ foreach($aBranchBucket as $innerValue) {
+ //if ($debugRecentHistory) {
+ // echo "Debug recentHistory: innerValue: $innerValue <br />";
+ //}
+ $buildName = computeBuildName($innerValue);
+ $streamName = computeStreamName($bValue);
+
+ echo "<tr>";
+ echo "<td width=\"13%\"><a href=\"$innerValue/\">$buildName</a></td>";
+ echo "<td width=\"8%\">$streamName</td>";
+ echo "<td width=\"20%\">$timeStamps[$innerValue]</td>";
+ echo "<td></td>";
+ // our recent summary results handling requires php 5 (for simple xml file loading)
+ // so, if not php 5, just don't display any summary results
+ // This was found to be required, since some mirror our whole site (e.g. IBM) and not all their
+ // mirrors use PHP 5
+ if (phpversion() >= 5) {
+ include 'handleSummaryResults.php';
+ }
+ echo "</tr>";
+ }
+ }
+ }
+ }
+ echo "</table>";
+
+}
+?>
+
+<table border="0" cellpadding="2" width="100%">
+ <tr>
+ <td bgcolor="#999999"></td>
+ </tr>
+</table>
diff --git a/incubator/commonPages/report.php b/incubator/commonPages/report.php
new file mode 100644
index 0000000..1d011d2
--- /dev/null
+++ b/incubator/commonPages/report.php
@@ -0,0 +1,148 @@
+<?php
+ function count_pattern($directory, $filenameFilter, $pattern)
+ {
+ $count = 0;
+ $dir = dir($directory);
+ while ($anEntry = $dir->read())
+ {
+ if ($anEntry != "." && $anEntry != "..")
+ {
+ $anEntry = $directory."/".$anEntry;
+ if (is_dir($anEntry))
+ {
+ $count += count_pattern($anEntry, $filenameFilter, $pattern);
+ }
+ else
+ {
+ if (stristr($anEntry, $filenameFilter))
+ {
+
+ $handle = @fopen($anEntry, "r");
+ if (FALSE !== $handle) {
+ $size = filesize($anEntry);
+ $content = fread($handle, $size);
+ fclose($handle);
+ $count += substr_count($content, $pattern);
+ }
+ }
+ }
+ }
+ }
+ return $count;
+ }
+
+ function parse_testResult($filename)
+ {
+ $junitFailures = 0;
+ $compileErrors = 0;
+ $compileWarnings = 0;
+ if (is_file($filename)) {
+ $handle = @fopen($filename, "r");
+ if ($handle)
+ {
+ $size = filesize($filename);
+ $content = fread($handle, $size);
+ fclose($handle);
+ $junitStart = strpos($content, "Errors & Failures");
+ $junitEnd = strpos($content, "</table>", $junitStart);
+ $junitInfo = substr($content, $junitStart, $junitEnd - $junitStart);
+ $start = strpos($junitInfo, "<td><b><font color=\"#ff0000\">");
+ while ($start !== false)
+ {
+ $start += 29;
+ $stop = strpos($junitInfo, "</font></b></td>", $start);
+ if ($stop !== false)
+ {
+ $result = substr($junitInfo, $start, $stop - $start);
+ if (is_numeric($result))
+ {
+ $junitFailures += $result;
+ }
+ else if (strcmp($result, "DNF") == 0)
+ {
+ $junitFailures++;
+ }
+ }
+ $start = strpos($junitInfo, "<td><b><font color=\"#ff0000\">", $stop);
+ }
+ $compileStart = strpos($content, "Compile Logs (Jar Files)");
+ $compileEnd = strpos($content, "</table>", $compileStart);
+ $compileInfo = substr($content, $compileStart, $compileEnd - $compileStart);
+ $rowStart = strpos($compileInfo, "<tr>");
+ while ($rowStart !== false)
+ {
+ $start += 4;
+ $rowStop = strpos($compileInfo, "</tr>", $rowStart);
+ if ($rowStop !== false)
+ {
+ $row = substr($compileInfo, $rowStart, $rowStop - $rowStart);
+ $cellStart = strpos($row, "<td");
+ $gotError = false;
+ $gotWarning = false;
+ while ($cellStart !== false && (!$gotError || !$gotWarning))
+ {
+ // this parsing logic got a bit more complicated in M2_33 basebuild, as the
+ // tag <td align="center"> was used, instead of <td>
+ // $cellStart += 4;
+ $cellStart = strpos($row, ">", $cellStart);
+ $cellStart = $cellStart + 1;
+ $cellStop = strpos($row, "</td>", $cellStart);
+ if ($cellStop !== false)
+ {
+ $cell = substr($row, $cellStart, $cellStop - $cellStart);
+ if (is_numeric($cell))
+ {
+ if (!$gotError)
+ {
+ $compileErrors += $cell;
+ $gotError = true;
+ }
+ else if (!$gotWarning)
+ {
+ $compileWarnings += $cell;
+ $gotWarning = true;
+ }
+ }
+ }
+ // this parsing logic got a bit more complicated in M2_33 basebuild, as the
+ // tag <td align="center"> was used, instead of <td>
+ $cellStart = strpos($row, "<td", $cellStop);
+ }
+ }
+ $rowStart = strpos($compileInfo, "<tr>", $rowStop);
+ }
+ }
+ }
+ $results = array($compileErrors, $compileWarnings, $junitFailures);
+ return $results;
+ }
+
+ function parse($filename, $key)
+ {
+ if (!is_readable($filename))
+ {
+ return 0;
+ }
+ $value;
+ $handle = @fopen($filename, "r");
+ if (!$handle)
+ {
+ return 0;
+ }
+ $size = filesize($filename);
+ $content = fread($handle, $size);
+ fclose($handle);
+ $start = strpos($content, $key);
+ while ($start !== false)
+ {
+ $start += strlen($key);
+ $stop = strpos($content, "\"", $start);
+ if ($stop !== false)
+ {
+ $value += substr($content, $start, $stop - $start);
+ }
+ $start = strpos($content, $key, $stop);
+ }
+ return $value;
+ }
+?>
diff --git a/incubator/commonPages/report2.php b/incubator/commonPages/report2.php
new file mode 100644
index 0000000..0859c0d
--- /dev/null
+++ b/incubator/commonPages/report2.php
@@ -0,0 +1,127 @@
+
+ <?php
+
+function parse2_testResults($filename)
+{
+ $junitFailures = -1;
+ if (is_file($filename)) {
+ $handle = @fopen($filename, "r");
+ if ($handle)
+ {
+ $junitFailures = 0;
+ $size = filesize($filename);
+ $content = fread($handle, $size);
+ fclose($handle);
+ $junitStart = strpos($content, "Errors & Failures");
+ $junitEnd = strpos($content, "</table>", $junitStart);
+ $junitInfo = substr($content, $junitStart, $junitEnd - $junitStart);
+ $start = strpos($junitInfo, "<td><b><font color=\"#ff0000\">");
+ while ($start !== false)
+ {
+ $start += 29;
+ $stop = strpos($junitInfo, "</font></b></td>", $start);
+ if ($stop !== false)
+ {
+ $result = substr($junitInfo, $start, $stop - $start);
+ if (is_numeric($result))
+ {
+ $junitFailures += $result;
+ }
+ else if (strcmp($result, "DNF") == 0)
+ {
+ $junitFailures++;
+ }
+ }
+ $start = strpos($junitInfo, "<td><b><font color=\"#ff0000\">", $stop);
+ }
+ $results = array($junitFailures);
+ return $results;
+ }
+ }
+}
+
+function parse2_compileResults($filename)
+{
+ $compileErrors = 0;
+ $compileAccessWarnings = 0;
+ $compileOtherWarnings = 0;
+ if (is_file($filename)) {
+ //echo "$filename<br />";
+ $handle = @fopen($filename, "r");
+ if ($handle)
+ {
+ $size = filesize($filename);
+ //echo "size: $size<br />";
+ $content = fread($handle, $size);
+ fclose($handle);
+
+ //echo "$content";
+ $compileStart = strpos($content, "<table id=tabledata");
+ $compileEnd = strpos($content, "</table", $compileStart);
+ $compileInfo = substr($content, $compileStart, $compileEnd - $compileStart);
+ //echo "compileInfo: $compileInfo<br />";
+ $rowStart = strpos($compileInfo, "<tr>");
+ $rowStart = strpos($compileInfo, "<tr>");
+ $start = $rowStart+4;
+ while ($rowStart !== false)
+ {
+
+ $start += 4;
+ $rowStop = strpos($compileInfo, "</tr>", $rowStart);
+ //if ($rowStop !== false)
+ //{
+ $row = substr($compileInfo, $rowStart, $rowStop - $rowStart);
+ //echo "$row";
+ //while ($cellStart !== false)
+ //{
+ // this parsing logic got a bit more complicated in M5_33 basebuild, as the
+ // a whole different structure was used.
+ // we'll try to quick fix this, but need our own index task
+ $cellStart = strpos($row, "#ERROR");
+ $cellStart = strpos($row, ">", $cellStart);
+ $cellStart = $cellStart + 1;
+ $cellStop = strpos($row, "<", $cellStart);
+ if ($cellStop !== false)
+ {
+ $cell = substr($row, $cellStart, $cellStop - $cellStart);
+ if (is_numeric($cell))
+ {
+ $compileErrors += $cell;
+ }
+ $cellStart = strpos($row, "#ACCESSRULES_WARNINGS");
+ $cellStart = strpos($row, ">", $cellStart);
+ $cellStart = $cellStart + 1;
+ $cellStop = strpos($row, "<", $cellStart);
+ $cell = substr($row, $cellStart, $cellStop - $cellStart);
+ if (is_numeric($cell))
+ {
+ $compileAccessWarnings += $cell;
+ }
+ $cellStart = strpos($row, "#OTHER_WARNINGS");
+ $cellStart = strpos($row, ">", $cellStart);
+ $cellStart = $cellStart + 1;
+ $cellStop = strpos($row, "<", $cellStart);
+ $cell = substr($row, $cellStart, $cellStop - $cellStart);
+ if (is_numeric($cell))
+ {
+ $compileOtherWarnings += $cell;
+ }
+ }
+ // look for next row.
+ //$cellStart = strpos($row, "<tr", $cellStop);
+ //}
+ //}
+ $rowStart = strpos($compileInfo, "<tr>", $rowStop);
+ }
+ }
+ }
+
+ $results = array($compileErrors, $compileAccessWarnings, $compileOtherWarnings);
+ return $results;
+}
+
+
+
+?>
+
+
diff --git a/incubator/commonPages/topAndInit.php b/incubator/commonPages/topAndInit.php
new file mode 100644
index 0000000..21043ba
--- /dev/null
+++ b/incubator/commonPages/topAndInit.php
@@ -0,0 +1,93 @@
+
+
+
+<table border='0' cellpadding='0' width="100%">
+ <tr>
+ <td width="35%"><?php echo $indexTop; ?></td>
+ <td width="35%" align="right"><a
+ href="http://www.eclipse.org/webtools/main.php"><img border="0"
+ src="../commonPages/wtplogonarrow.jpg" height="95" width="207" /></a></td>
+ </tr>
+</table>
+
+<!-- heading end -->
+
+
+<hr />
+<table border='0' cellpadding='2' width="70%" align="center">
+ <tr>
+ <td><?php echo $pageExplanation; ?></td>
+ </tr>
+</table>
+
+<?php
+$contents = substr(file_get_contents('dlconfig.txt'),0,-1);
+$contents = str_replace("\n", "", $contents);
+
+#split the content file by & and fill the arrays
+$elements = explode("&",$contents);
+$t = 0;
+$p = 0;
+for ($c = 0; $c < count($elements); $c++) {
+ $tString = "dropType";
+ $pString = "dropPrefix";
+ if (strstr($elements[$c],$tString)) {
+ $temp = preg_split("/=/",$elements[$c]);
+ $dropType[$t] = trim($temp[1]);
+ $t++;
+ }
+ if (strstr($elements[$c],$pString)) {
+ $temp = preg_split("/=/",$elements[$c]);
+ $dropPrefix[$p] = trim($temp[1]);
+ $p++;
+ }
+}
+
+// debug
+// echo "Debug: droptype count: ", count($dropType), "<br />";
+
+for ($i = 0; $i < count($dropType); $i++) {
+ $dt = $dropType[$i];
+ $dt = trim($dt);
+ $typeToPrefix[$dt] = $dropPrefix[$i];
+
+ // echo "Debug prefix: ", $dropPrefix[$i], "<br />";
+ // echo "Debug dropType: ", $dropType[$i], "<br />";
+
+}
+
+
+include 'report.php';
+include 'report2.php';
+$latestTimeStamp=array();
+$latestFile = array();
+$buckets = array();
+$timeStamps = array();
+
+function computeBuildName($longname) {
+ $majorParts = explode("/", $longname);
+ $nParts = sizeof($majorParts);
+ if ($nParts > 1) {
+ $innerValueParts = explode("-", $majorParts[$nParts-1]);
+ }
+ else {
+ $innerValueParts = explode("-", $longname);
+ }
+ return $innerValueParts[1];
+}
+function computeStreamName($longname) {
+ $majorParts = explode("/", $longname);
+ $nParts = sizeof($majorParts);
+ if ($nParts > 1) {
+ // a format such as "drops/R3.0"
+ $name = $majorParts[1];
+
+ }
+ else {
+ // a format such as "wtp-R3.0-I"
+ $majorParts = explode("-", $longname);
+ $name = $majorParts[1];
+ }
+ return $name;
+}
+?>
diff --git a/incubator/commonPages/wtpDropStyle.css b/incubator/commonPages/wtpDropStyle.css
new file mode 100644
index 0000000..556c62b
--- /dev/null
+++ b/incubator/commonPages/wtpDropStyle.css
@@ -0,0 +1,2 @@
+@CHARSET "ISO-8859-1";
+
diff --git a/incubator/commonPages/wtplogonarrow.jpg b/incubator/commonPages/wtplogonarrow.jpg
new file mode 100644
index 0000000..c433588
--- /dev/null
+++ b/incubator/commonPages/wtplogonarrow.jpg
Binary files differ
diff --git a/incubator/commonPages/wtplogosmall.jpg b/incubator/commonPages/wtplogosmall.jpg
new file mode 100644
index 0000000..71bea77
--- /dev/null
+++ b/incubator/commonPages/wtplogosmall.jpg
Binary files differ
diff --git a/incubator/commonPages/wtpphoenix.xsl b/incubator/commonPages/wtpphoenix.xsl
new file mode 100644
index 0000000..df90d99
--- /dev/null
+++ b/incubator/commonPages/wtpphoenix.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+ <xsl:output omit-xml-declaration="yes" />
+ <xsl:template match="html">
+ <xsl:apply-templates
+ select="body/h1"
+ mode="banner" />
+ <xsl:apply-templates select="body/*" />
+ </xsl:template>
+ <xsl:template
+ match="h1"
+ mode="banner">
+ <table>
+ <tr>
+ <td width="60%">
+ <h1>
+ <xsl:value-of select="." />
+ </h1>
+ <div class="wtpsubtitle">
+ <xsl:value-of select="/html/head/title" />
+ </div>
+ </td>
+ <td>
+ <img
+ src="/webtools/images/wtplogosmall.jpg"
+ alt="WTP Logo"
+ align="middle"
+ height="129"
+ hspace="50"
+ width="207"
+ usemap="logomap" />
+ <map
+ id="logomap"
+ name="logomap">
+ <area
+ coords="0,0,207,129"
+ href="/webtools/"
+ alt="WTP Home" />
+ </map>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+ <xsl:template match="h1" />
+ <xsl:template match="h2">
+ <h2 class="bar">
+ <xsl:value-of select="." />
+ </h2>
+ </xsl:template>
+ <xsl:template match="ul">
+ <ul class="indent">
+ <xsl:apply-templates />
+ </ul>
+ </xsl:template>
+ <xsl:template match="*|@*|text()">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|text()" />
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/incubator/downloads/buildbranches.php b/incubator/downloads/buildbranches.php
new file mode 100644
index 0000000..b055999
--- /dev/null
+++ b/incubator/downloads/buildbranches.php
@@ -0,0 +1,8 @@
+<?
+$buildBranches = array();
+$buildBranches[0]="drops/R3.0";
+$buildBranches[1]="drops/R2.0";
+$buildBranches[2]="drops/R1.5";
+$buildBranches[3]="drops/R1.0";
+$buildBranches[4]="drops/R0.7";
+?>
diff --git a/incubator/downloads/dlconfig.txt b/incubator/downloads/dlconfig.txt
new file mode 100644
index 0000000..86d9053
--- /dev/null
+++ b/incubator/downloads/dlconfig.txt
@@ -0,0 +1,9 @@
+dropPrefix[]=R&
+dropPrefix[]=M&
+dropPrefix[]=S&
+dropPrefix[]=I&
+
+dropType[]=<b>R</b>eleased&
+dropType[]=<b>M</b>aintenance&
+dropType[]=<b>S</b>table (Milestone)&
+dropType[]=<b>I</b>ntegration&
diff --git a/incubator/downloads/downloadindex.php b/incubator/downloads/downloadindex.php
new file mode 100644
index 0000000..a49cac2
--- /dev/null
+++ b/incubator/downloads/downloadindex.php
@@ -0,0 +1,41 @@
+<?php
+ echo '<?xml version="1.0" encoding="ISO-8859-1" ?>';
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Incubator Downloads</title>
+</head>
+<body>
+
+<?php
+ini_set("display_errors", "true");
+error_reporting (E_ALL);
+?>
+
+
+<?php
+include ($App->getProjectCommon());
+include 'pagePropertyVariables.php';
+include 'buildbranches.php';
+include '../commonPages/topAndInit.php';
+?>
+ <div id="rightcolumn">
+ <div class="sideitem">
+ <h6>Incubation</h6>
+ <div align="center"><a href="/projects/what-is-incubation.php"><img
+ align="center" src="/images/egg-incubation.png"
+ border="0" alt="Incubation" /></a></div>
+ </div>
+ </div>
+<?php
+include '../commonPages/latestBuilds.php';
+include '../commonPages/recentHistory.php';
+include '../commonPages/bottomAndFooter.php';
+?>
+
+
+
+</body>
+</html>
+
diff --git a/incubator/downloads/index.php b/incubator/downloads/index.php
index fed8098..217a76a 100644
--- a/incubator/downloads/index.php
+++ b/incubator/downloads/index.php
@@ -1,4 +1,4 @@
-<?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'
+<?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(); # All on the same line to unclutter the user's desktop'
#*****************************************************************************
#
@@ -26,28 +26,38 @@
# End: page-specific settings
#
+ ob_start();
- # Paste your HTML content between the EOHTML markers!
- $html = <<<EOHTML
+ include "downloadindex.php";
+ $xmlString = ob_get_clean();
+ $xml = new DOMDocument();
+ $xml->loadXML($xmlString);
+ //echo $xml->saveHTML();
+ //Set the page title
+ $xpath = new DOMXPath($xml);
+ $titleNode = $xpath->query("/html/head/title")->item(0);
+ // echo "<br />titleNodeValue: " . $titleNode->nodeValue;
+ $pageTitle = ($titleNode != null) ? $titleNode->childNodes->item(0)->nodeValue : "eclipse.org webtools page";
- <div id="midcolumn">
- <h1>Downloads for WTP Incubator Project Components</h1>
- <p>None yet ... check back in November or December.</p>
+ // Load the XSL source
+ $xsl = DOMDocument::load('../commonPages/wtpphoenix.xsl');
- </div>
-
- <div id="rightcolumn">
- <div class="sideitem">
- <h6>Incubation</h6>
- <div align="center"><a href="/projects/what-is-incubation.php"><img
- align="center" src="/images/egg-incubation.png"
- border="0" alt="Incubation" /></a></div>
- </div>
- </div>
+ // Configure the transformer
+ $proc = new XSLTProcessor;
+ $proc->importStyleSheet($xsl); // attach the xsl rules
+ // work on just the body of the original (not head, etc.)
+ $xmlbody=$xml->getElementsByTagName('body')->item(0);
+ $maincontent = $proc->transformToXML($xmlbody);
+ $html = <<<EOHTML
+<div id="maincontent">
+ <div id="midcolumn">
+ <p>
+ $maincontent
+ </p>
+ </div>
+</div>
EOHTML;
-
-
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>
diff --git a/incubator/downloads/pagePropertyVariables.php b/incubator/downloads/pagePropertyVariables.php
new file mode 100644
index 0000000..69bb872
--- /dev/null
+++ b/incubator/downloads/pagePropertyVariables.php
@@ -0,0 +1,32 @@
+<?php
+
+$pageTitle="Eclipse Web Tools Platform (WTP) Downloads";
+$indexTop="<font class='indextop'>
+ Web Tools Platform<br />
+downloads</font><br />
+<font class='indexsub'>Latest downloads from the Web Tools Platform project</font>";
+
+$pageExplanation="
+ <p>This is the starting page for where you can find the latest <a
+ href=\"http://wiki.eclipse.org/index.php/WTP_Build_Types\">declared build</a> produced by the <a
+ href=\"http://www.eclipse.org/webtools/main.php\">Eclipse Web Tools
+ Platform (WTP) Project</a>.</p>
+ <p>Please note that each declared-build page details the pre-reqs for
+ that particular build. The WTP 1.0.x builds go with Eclipse 3.1 based
+ pre-reqs, and the WTP 1.5.x builds go with Eclipse 3.2 based pre-reqs.</p>
+
+ <p>As an alternative to downloading zips from the build pages, our
+ released builds can be <a
+ href=\"http://download.eclipse.org/webtools/updates/\">installed via
+ Update Manager</a>, from an existing installation of Eclipse.</p>
+";
+
+$mainTableHeader="Latest Downloads";
+
+$pageFooterEnd="<p><a href=\"http://build.eclipse.org/webtools/committers/\"
+ target=\"_top\">Continuous builds</a> are also available which are for
+ committers and early testers.</p>";
+
+$subsectionHeading="Recent History";
+
+?>
\ No newline at end of file
diff --git a/incubator/downloads/report.php b/incubator/downloads/report.php
new file mode 100644
index 0000000..739efdf
--- /dev/null
+++ b/incubator/downloads/report.php
@@ -0,0 +1,7 @@
+<?
+// some "old" builds expect the report files to be in this directory, so we'll
+// re-include new one, if anyone does try to use this one.
+
+include '../commonPages/report.php'
+
+?>
\ No newline at end of file
diff --git a/incubator/downloads/report2.php b/incubator/downloads/report2.php
new file mode 100644
index 0000000..894c783
--- /dev/null
+++ b/incubator/downloads/report2.php
@@ -0,0 +1,7 @@
+<?
+// some "old" builds expect the report files to be in this directory, so we'll
+// re-include new one, if anyone does try to use this one.
+
+include '../commonPages/report2.php'
+
+?>
\ No newline at end of file