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