--- pgadmin3/cnt/cnt_mirrors.php +++ /dev/null @@ -1,78 +0,0 @@ -
"; - echo sprintf(_("Feel free to download pgAdmin from PostgreSQL primary FTP site."), "http://www.postgresql.org/ftpsite")."
"; - $_error = true; - } - - // - // Execute query - // - - if (!$_error) { - $prompt = _('Please select a download mirror:'); - -// Temporary fix to allow for the fact that the mirrors aren't updating whilst hub.org is down. - $query = "SELECT 'ftp' || CASE WHEN mirror_index = 0 THEN ''::text ELSE mirror_index::text END || '.' || country_code || '.postgresql.org' AS hostname, host_port AS port, host_path AS path, country_name AS country FROM mirrors WHERE mirror_type = 'ftp' AND mirror_active = TRUE AND mirror_private = FALSE AND mirror_dns = TRUE AND mirror_last_rsync > (now() - '48 hrs'::interval) ORDER BY country_name, mirror_index;"; - $res = pg_query($conn,$query); - - - if(!$res) { - echo _("Could not connect to the mirror table.")."

"; - echo sprintf(_("Feel free to download pgAdmin from PostgreSQL primary FTP site."), "http://www.postgresql.org/ftp/pgadmin3/")."
"; - $_error = true; - } - } - -// -// Display resultset -// -if (!$_error) { - // - // Warning: should use pg_fetch_all - // to avoid to many queries over the Internet - // - $ii = pg_num_rows($res); - if($ii == 0) { - echo _("No mirrors could be found.")."

"; - echo sprintf(_("Feel free to download pgAdmin from PostgreSQL primary FTP site."), "http://www.postgresql.org/ftp/pgadmin3/")."
"; - } else { - $content = "\n"; - - for($x=0;$x<$ii;$x++) { - if(($x%$numcells) == 0) { - $content .= "\n"; - } - $row = pg_fetch_row($res,$x); - $img = str_replace(" ","",$row[3]); - $img .= ".gif"; - if(substr($row[2], strlen($row[2]) - 1, 1) == '/') { - $path = $row[2] . "pgadmin3/"; - } else { - $path = $row[2] . "/pgadmin3/"; - } - - if ($row[1] == "") { - $content .= "\n"; - } else { - $content .= "\n"; - } - } - $ii = $numcells - ($x%$numcells); - if($ii != $numcells) { - $content .= ""; - } - $content .= "
$prompt

" . ucwords($row[3]) . "
" . ucwords($row[3]) . "

 
$row[3]
" . ucwords($row[3]) . "

 
 
\n"; - echo $content; - } -} - -?>