Home | History | Annotate | Download | only in dropSiteRootFiles
      1 <html><head>
      2 <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css">
      3 <title>Eclipse Project Downloads</title></head>
      4 <body>
      5 <?php
      6 
      7         $serverName = $_SERVER["SERVER_NAME"];
      8 
      9 		 if (strstr($serverName, ".oti.com")) {
     10 		 		 $warning = '<br><font color="#FF0000" size="+2">Internal OTI Mirror. Live external site is <a href="http://download.eclipse.org/eclipse/downloads" target="_top">here</a>. </font>';
     11                 $serverName = $_SERVER["SERVER_NAME"];
     12 		 } else {
     13 		 		 $warning = '';
     14 		 }
     15 ?> <table border=0 cellspacing=5 cellpadding=2 width="100%" > <tr> <td align=left width="72%">
     16 <font class=indextop> &lt;your project&gt;<br>downloads</font> <br> <font class=indexsub>
     17 latest downloads from the &lt;your project</font>&gt;<br> <?php echo $warning; ?>
     18 </td><td width="28%"><img src="http://dev.eclipse.org/images/Idea.jpg" height=86 width=120></td></tr>
     19 </table><table border=0 cellspacing=5 cellpadding=2 width="100%" > <tr> <td align=LEFT valign=TOP colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Latest
     20 Downloads</font></b></td></tr> <!-- The Eclipse Projects --> <tr> <td> <p>On this
     21 page you can find the latest <a href="build_types.html">builds</a> produced by
     22 the &lt;your project&gt;. To get started run the program and and go through the
     23 user and developer documentation provided in the online help system. If you have
     24 problems downloading the drops, contact the <font size="-1" face="arial,helvetica,geneva"><a href="mailto:webmaster (at) eclipse.org">webmaster</a></font>.
     25 All downloads are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/notice.html">Eclipse.org
     26 Software User Agreement</a> unless otherwise specified. </p><p> For information
     27 about different kinds of builds look <a href="build_types.html">here</a>.</p></td></tr>
     28 </table><?php
     29 
     30 		 $fileHandle = fopen("dlconfig.txt", "r");
     31 		 while (!feof($fileHandle)) {
     32 
     33 		 		 $aLine = fgets($fileHandle, 4096);
     34 		 		 parse_str($aLine);
     35 
     36 
     37 		 }
     38 		 fclose($fileHandle);
     39 
     40 		 for ($i = 0; $i < count($dropType); $i++) {
     41 		 		 $typeToPrefix[$dropType[$i]] = $dropPrefix[$i];
     42 		 }
     43 
     44 		 $aDirectory = dir("drops");
     45 		 while ($anEntry = $aDirectory->read()) {
     46 
     47 		 		 // Short cut because we know aDirectory only contains other directories.
     48 		 		 if ($anEntry != "." && $anEntry!="..") {
     49 		 		 		 $aDropDirectory = dir("drops/".$anEntry);
     50 		 		 		 $fileCount = 0;
     51 		 		 		 while ($aDropEntry = $aDropDirectory->read()) {
     52 		 		 		 		 if ((stristr($aDropEntry, ".tar.gz"))||(stristr($aDropEntry, ".zip")))  {
     53 		 		 		 		 		 // Count the files in the directory
     54 		 		 		 		 		 $fileCount = $fileCount + 1;
     55 		 		 		 		 }
     56 		 		 		 }
     57 		 		 		 $aDropDirectory.closedir();
     58 		 		 		 // Read the count file
     59 		 		 		 $countFile = "drops/".$anEntry."/files.count";
     60 		 		 		 $indexFile = "drops/".$anEntry."/index.html";
     61 		 		 		 if (file_exists($countFile) && file_exists($indexFile)) {
     62 		 		 		 		 $anArray = file($countFile);
     63 
     64 		 		 		 		 // If a match - process the directory
     65 		 		 		 		 if ($anArray[0] == $fileCount) {
     66 		 		 		 		 		 $parts = explode("-", $anEntry);
     67 		 		 		 		 		 if (count($parts) == 3) {
     68 
     69 		 		 		 		 		 		 $buckets[$parts[0]][] = $anEntry;
     70 
     71 		 		 		 		 		 		 $timePart = $parts[2];
     72 		 		 		 		 		 		 $year = substr($timePart, 0, 4);
     73 		 		 		 		 		 		 $month = substr($timePart, 4, 2);
     74 		 		 		 		 		 		 $day = substr($timePart, 6, 2);
     75 		 		 		 		 		 		 $hour = substr($timePart,8,2);
     76 		 		 		 		 		 		 $minute = substr($timePart,10,2);
     77 		 		 		 		 		 		 $timeStamp = mktime($hour, $minute, 0, $month, $day, $year);
     78 
     79 		 		 		 		 		 		 $timeStamps[$anEntry] = date("D, j M Y -- H:i (O)", $timeStamp);
     80 
     81 		 		 		 		 		 		 if ($timeStamp > $latestTimeStamp[$parts[0]]) {
     82 		 		 		 		 		 		 		 $latestTimeStamp[$parts[0]] = $timeStamp;
     83 		 		 		 		 		 		 		 $latestFile[$parts[0]] = $anEntry;
     84 		 		 		 		 		 		 }
     85 		 		 		 		 		 }
     86 		 		 		 		 }
     87 		 		 		 }
     88 		 		 }
     89 		 }
     90 		 // $aDirectory.closedir();
     91  ?> <table width="100%" cellspacing=0 cellpadding=3 align=center> <td align=left>
     92 <TABLE  width="100%" CELLSPACING=0 CELLPADDING=3> <tr> <td width=\"30%\"><b>Build
     93 Type</b></td><td><b>Build Name</b></td><td><b>Build Date</b></td></tr> <?php
     94 		 foreach($dropType as $value) {
     95 		 		 $prefix=$typeToPrefix[$value];
     96 		 		 $fileName = $latestFile[$prefix];
     97 		 		 echo "<tr>
     98 		 		 		 <td width=\"30%\">$value</td>";
     99 
    100 		 		 $parts = explode("-", $fileName);
    101 
    102 		 		 // Uncomment the line below if we need click through licenses.
    103 		 		 // echo "<td><a href=license.php?license=drops/$fileName>$parts[1]</a></td>";
    104 
    105 		 		 // Comment the line below if we need click through licenses.
    106 		 		 echo "<td><a href=\"drops/$fileName/index.html\">$parts[1]</a></td>";
    107 
    108 		 		 echo "<td>$timeStamps[$fileName]</td>";
    109 		 		 echo "</tr>";
    110 		 }
    111 ?> </table></table>&nbsp; <?php
    112 		 foreach($dropType as $value) {
    113 		 		 $prefix=$typeToPrefix[$value];
    114 		 		 echo "
    115 		 		 <table width=\"100%\" cellspacing=0 cellpadding=3 align=center>
    116 		 		 <tr bgcolor=\"#999999\">
    117 		 		 <td align=left width=\"30%\"><b><a name=\"$value\"><font color=\"#FFFFFF\" face=\"Arial,Helvetica\">$value";
    118 		 		 echo "s</font></b></a></td>
    119 		 		 </TR>
    120 		 		 <TR>
    121 		 		 <td align=left>
    122 		 		 <TABLE  width=\"100%\" CELLSPACING=0 CELLPADDING=3>
    123 		 		 <tr>
    124 		 		 <td width=\"30%\"><b>Build Name</b></td>
    125 		 		 <td><b>Build Date</b></td>
    126 		 		 </tr>";
    127 
    128 		 		 $aBucket = $buckets[$prefix];
    129 		 		 if (isset($aBucket)) {
    130 		 		 		 rsort($aBucket);
    131 		 		 		 foreach($aBucket as $innerValue) {
    132 		 		 		 		 $parts = explode("-", $innerValue);
    133 		 		 		 		 echo "<tr>";
    134 
    135 		 		 		 		 		 // Uncomment the line below if we need click through licenses.
    136 		 		 		 		 		 // echo "<td><a href=\"license.php?license=drops/$innerValue\">$parts[1]</a></td>";
    137 
    138 		 		 		 		 		 // Comment the line below if we need click through licenses.
    139 		 		 		 		 		 echo "<td><a href=\"drops/$innerValue/index.html\">$parts[1]</a></td>";
    140 
    141 		 		 		 		 		 echo "<td>$timeStamps[$innerValue]</td>
    142 		 		 		 		 		 </tr>";
    143 		 		 		 }
    144 		 		 }
    145 		 		 echo "</table></table>&nbsp;";
    146 		 }
    147 ?> &nbsp;
    148 </body></html>
    149