getProjectCommon()); # All on the same line to unclutter the user's desktop' # Begin: page-specific settings. Change these. $pageTitle = "Equinox Downloads"; $pageKeywords = "equinox, osgi, framework, runtime, download"; $pageAuthor = "Equinox committers"; $contents = substr(file_get_contents('dlconfig-new.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)-1; $c++) { $tString = "dropType"; $pString = "dropPrefix"; if (strstr($elements[$c],$tString)) { $temp = preg_split("/=/",$elements[$c]); $dropType[$t] = $temp[1]; $t++; } if (strstr($elements[$c],$pString)) { $temp = preg_split("/=/",$elements[$c]); $dropPrefix[$p] = $temp[1]; $p++; } } for ($i = 0; $i < count($dropType); $i++) { $typeToPrefix[$dropType[$i]] = $dropPrefix[$i]; } $aDirectory = dir("drops"); while ($anEntry = $aDirectory->read()) { // Short cut because we know aDirectory only contains other directories. if ($anEntry != "." && $anEntry!=".." && $anEntry!="TIME") { $parts = explode("-", $anEntry); if (count($parts) == 3) { $buckets[$parts[0]][] = $anEntry; $timePart = $parts[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); $timeStamp = mktime($hour, $minute, 0, $month, $day, $year); $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp); if ($timeStamp > $latestTimeStamp[$parts[0]]) { $latestTimeStamp[$parts[0]] = $timeStamp; $latestFile[$parts[0]] = $anEntry; } } if (count($parts) == 2) { $buildType=substr($parts[0],0,1); $buckets[$buildType][] = $anEntry; $datePart = substr($parts[0],1); $timePart = $parts[1]; $year = substr($datePart, 0, 4); $month = substr($datePart, 4, 2); $day = substr($datePart, 6, 2); $hour = substr($timePart,0,2); $minute = substr($timePart,2,2); $timeStamp = mktime($hour, $minute, 0, $month, $day, $year); $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp); if ($timeStamp > $latestTimeStamp[$buildType]) { $latestTimeStamp[$buildType] = $timeStamp; $latestFile[$buildType] = $anEntry; } } } } $html = <<

$pageTitle

For access to archived builds, look here.

Latest Builds

EOHTML; foreach($dropType as $value) { $prefix=$typeToPrefix[$value]; $fileName = $latestFile[$prefix]; $parts = explode("-", $fileName); // Uncomment the line below if we need click through licenses. // echo ""; // Comment the line below if we need click through licenses. if (count($parts)==3) $html .= << EOHTML; if (count($parts)==2) $html .= << EOHTML; $html .= <<$value EOHTML; } $html .= << EOHTML; foreach($dropType as $value) { $prefix=$typeToPrefix[$value]; $html .= <<$value Builds
$parts[1]$parts[1]$fileName$timeStamps[$fileName]
EOHTML; $aBucket = $buckets[$prefix]; if (isset($aBucket)) { rsort($aBucket); foreach($aBucket as $innerValue) { $parts = explode("-", $innerValue); $html .= << EOHTML; // Uncomment the line below if we need click through licenses. // echo ""; // Comment the line below if we need click through licenses. if (count ($parts)==3) $html .= <<$parts[1] EOHTML; if (count ($parts)==2) $html .= <<$innerValue EOHTML; $html .= <<$timeStamps[$innerValue] EOHTML; } } $html .= << EOHTML; } $html .= << EOHTML; generateRapPage( $App, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html ); ?>
$parts[1]