blob: 8479b4f42e98f28bf86bfd3b5ebf66105c435579 [file] [log] [blame]
<?php
#*****************************************************************************
#
# en_mir_list_plain.php
#
# Author: Denis Roy
# Date: 2005-08-23
#
# Description: UI to list mirrors in plain HTML format
#
# HISTORY:
#
#****************************************************************************
include("inc/en_doc_header.php");
include("inc/en_downloads_header.php");
#include("inc/en_banner.php");
?>
<table width="100%" cellpadding="2" cellspacing="1" border="0">
<?php
$target = "target='_blank'";
$mirror_id_prev = 0;
$ccode_prev = "";
$mir_count = 0;
$mir_internal_count = 0;
if($myrow = mysql_fetch_assoc($rs_pref)) {
echo "<tr><td colspan='4' class='head_section'><b>Please use your preferred mirror:</b> " . $_file . "<br /></td></tr>";
$path = $myrow['base_path'];
$path .= getPath($myrow['drop_id'], $_drop_id, $myrow['rel_path_override'], $myrow['our_path'], $myrow['our_path2']);
$url = $path;
$path = "download.php?file=" . $_file . "&url=" . $path . "&mirror_id=" . $myrow['mirror_id'];
echo "<tr><td>&#160;</td></tr><tr><td colspan=\"4\"><b>" . $myrow['country_desc'] . "</b></td></tr>";
echo "<tr><td width='20'></td><td>[" . $myrow['country_desc'] . "] " . $url . "</td></tr>";
echo "<tr><td><br /><br /></td></tr>";
}
while ($myrow = mysql_fetch_assoc($rs)) {
$out_html = "";
$path = $myrow['base_path'];
$path .= getPath($myrow['drop_id'], $_drop_id, $myrow['rel_path_override'], $myrow['our_path'], $myrow['our_path2']);
$url = $path;
# Override path to re-call download.php
$path = "download.php?file=" . $_file . "&url=" . $path . "&mirror_id=" . $myrow['mirror_id'];
if($myrow['is_internal'] == 1 && $mir_internal_count == 0 && $_file != "") {
echo "<tr><td colspan='4' class='head_section'><b>The following Internal Mirrors should be used:</b></td></tr>";
$mir_internal_count++;
# Bypass stats for internal mirrors
$path = $myrow['base_path'];
$path .= getPath($myrow['drop_id'], $_drop_id, $myrow['rel_path_override'], $myrow['our_path'], $myrow['our_path2']);
}
if($myrow['is_internal'] != 1 && $mir_count == 0 && $_file != "") {
if($mir_internal_count > 0) {
echo "<tr><td><br /><br /></td></tr>";
}
echo "<tr><td colspan='4' class='head_section'><b>Please select a mirror site:</b><br /></td></tr>";
#echo "<tr><td colspan='2'><b>Country/mirror</b></td><td><b>Age</b></td><td><b>Download</b></td></tr>";
}
if($myrow['continent_desc'] != $ccode_prev) {
if($mir_count > 0) {
echo "</td></tr>";
}
echo "\n";
echo "<tr><td>&#160;</td></tr><tr><td colspan=\"4\"><b>" . $myrow['continent_desc'] . "</b></td></tr>";
}
#if($myrow['mirror_id'] == $mirror_id_prev) {
# $out_html = " &#160; (Alternate: ". $url . ")";
#}
#else {
if($mir_count > 0 && $myrow['ccode'] == $ccode_prev) {
$out_html = "</td></tr>";
}
$out_html .= "<tr><td width='20'></td><td>[" . $myrow['country_desc'] . "] " . $url;
#}
$mir_count++;
$mirror_id_prev = $myrow['mirror_id'];
$ccode_prev = $myrow['continent_desc'];
echo $out_html;
}
?>
<tr>
<td colspan="4">&#160;<br /><br /></td>
</tr>
<?php
# Use this to remove the main download site as a result of
# being slashdotted or news links (Eclipsecon)
# if($mir_count < 6) {
?>
<tr>
<td colspan="4" class="head_section"><b>Main Download Site</b></td>
</tr>
<tr><td>&#160;</td></tr><tr><td colspan=\"4\"><b>Canada</b></td></tr>
<tr><td width='20'></td><td><?= $app->getPubDownloadServerUrl() . $_file ?></td></tr>
<tr>
<td colspan="4">&#160;<br /><br /></td>
</tr>
<?php
# }
?>
<tr>
<td colspan="4" class="head_section"><b>Mirroring Eclipse</b></td>
</tr>
<tr>
<td colspan="4">
Information on mirroring Eclipse can be found <a href="mir_request.php">here</a>.
<br /><br />
</td>
</tr>
</table>
<?
include("inc/en_doc_footer.php");
?>