summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-01-04 11:37:03 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-01-04 11:37:03 +0100
commit1f807b267f5de9924371fcc5a66ac509ea7be11d (patch)
tree63acf442feea57c5719bd4a44bf803b8c12270c8
parent07d8c7a53af0b28aac542d5135cc63ad1a2a7b7b (diff)
downloadarchweb32-1f807b267f5de9924371fcc5a66ac509ea7be11d.tar.xz
some first HTML in mirror status
-rw-r--r--mirrors.php36
1 files 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;
<table class="results">
<thead>
<tr>
-protocol url country country_code last_sync start delay duration_avg duration_stddev isos ipv4 ipv6 active recently_active completion_pct count score
+ <th>Mirror URL</th>
+ <th>Protocol</td>
+ <th>Country</th>
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
</tr>
</thead>
+ <tbody>
+EOF;
+ $oddity = "odd";
+ if (isset($content['urls'])) {
+ foreach ($content['urls'] as $row) {
+ print " <tr class=\"" . $oddity ."\">\n";
+ print " <td>\n";
+ print " " . $row["url"] . "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " " . $row["protocol"] . "\n";
+ print " </td>\n";
+ print " <td class=\"country\">\n";
+ print " <span class=\"fam-flag fam-flag-" . $row["country_code"] . "\" title=\"" . $row["country"] . "\">\n";
+ print " </span>\n";
+ print " " . $row["country"] . "\n";
+ print " </td>\n";
+ print " </tr>\n";
+ if ($oddity == "odd")
+ $oddity = "even";
+ else
+ $oddity = "odd";
+ }
+ }
+ print <<<EOF
+ </tbody>
</table>
EOF;
print <<<EOF
@@ -285,7 +313,7 @@ EOF;
<pre>
EOF;
}
- print json_encode($content, JSON_PRETTY_PRINT);
+// print json_encode($content, JSON_PRETTY_PRINT);
print <<<EOF
</pre>
EOF;