From 1f807b267f5de9924371fcc5a66ac509ea7be11d Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 4 Jan 2020 11:37:03 +0100 Subject: some first HTML in mirror status --- mirrors.php | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/mirrors.php b/mirrors.php index 40a54f3..dc69e7a 100644 --- a/mirrors.php +++ b/mirrors.php @@ -164,8 +164,7 @@ if (count($uri_parts) == 0) { // index if ($uri_parts[0] == 'status') { -// $cutoff = 86400; - $cutoff = 120000; + $cutoff = 86400; $result = mysql_run_query( "SELECT " . @@ -273,11 +272,40 @@ EOF; -protocol url country country_code last_sync start delay duration_avg duration_stddev isos ipv4 ipv6 active recently_active completion_pct count score + + EOF; +//protocol url country country_code last_sync start delay duration_avg duration_stddev isos ipv4 ipv6 active recently_active completion_pct count score print << + +EOF; + $oddity = "odd"; + if (isset($content['urls'])) { + foreach ($content['urls'] as $row) { + print " \n"; + print " \n"; + print " \n"; + print " \n"; + print " \n"; + if ($oddity == "odd") + $oddity = "even"; + else + $oddity = "odd"; + } + } + print <<
Mirror URLProtocol + Country
\n"; + print " " . $row["url"] . "\n"; + print " \n"; + print " " . $row["protocol"] . "\n"; + print " \n"; + print " \n"; + print " \n"; + print " " . $row["country"] . "\n"; + print "
EOF; print << EOF; } - print json_encode($content, JSON_PRETTY_PRINT); +// print json_encode($content, JSON_PRETTY_PRINT); print << EOF; -- cgit v1.2.3