Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;