index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-05-22 14:11:05 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-22 14:11:05 +0200 |
commit | e461b95c6777515cdd0387564b4b244ea1a3527c (patch) | |
tree | 71992833160f9ba4e64ba821a3b4ceffef245857 | |
parent | 1c1263d4a5730e9cf7147f8cba6692eea29c9c60 (diff) |
-rw-r--r-- | index.php | 14 | ||||
-rw-r--r-- | mirrors.php | 34 |
@@ -270,19 +270,19 @@ foreach($package_updates as $pkg) { /* TODO: do we want that? <h4>People</h4> <ul> - + <li><a href="/people/developers/" title="More info about Developers">Developers</a></li> - + <li><a href="/people/trusted-users/" title="More info about Trusted Users">Trusted Users</a></li> - + <li><a href="/people/support-staff/" title="More info about Support Staff">Support Staff</a></li> - + <li><a href="/people/developer-fellows/" title="More info about Developer Fellows">Developer Fellows</a></li> - + <li><a href="/people/trusted-user-fellows/" title="More info about Trusted User Fellows">Trusted User Fellows</a></li> - + <li><a href="/people/support-staff-fellows/" title="More info about Support Staff Fellows">Support Staff Fellows</a></li> - + <li><a href="/master-keys/" title="Package/Database signing master keys">Signing Master Keys</a></li> </ul> diff --git a/mirrors.php b/mirrors.php index 7758846..5bbace0 100644 --- a/mirrors.php +++ b/mirrors.php @@ -26,7 +26,7 @@ array_splice( if (count($uri_parts) == 0) { // index $cutoff = 3600; - + $sorts = array( "server" => array( "title" => "server", @@ -49,7 +49,7 @@ if (count($uri_parts) == 0) { // index "mysql" => "`protocols`" ) ); - + $query = "SELECT " . "GROUP_CONCAT(`l_ms`.`protocol`) AS `protocols`," . @@ -72,28 +72,28 @@ if (count($uri_parts) == 0) { // index " AND `ls`.`start`=`l_ms`.`start`" . " GROUP BY `url`" . " ORDER BY "; - + if (array_key_exists("sort", $_GET)) { if (isset($sorts[$_GET["sort"]]["mysql"])) $query .= $sorts[$_GET["sort"]]["mysql"] . ","; elseif (isset($sorts[substr($_GET["sort"],1)]["mysql"])) $query .= $sorts[substr($_GET["sort"],1)]["mysql"] . " DESC,"; } - + $query .= "`url`"; - + $result = mysql_run_query( $query ); - + $last_check = 0; $max_count = 0; - + while($row = $result->fetch_assoc()) $rows[] = $row; - + print_header("Mirror Overview"); - + ?> <div id="dev-mirrorlist" class="box"> <h2>Mirror Overview</h2> @@ -119,7 +119,7 @@ if (count($uri_parts) == 0) { // index </thead> <tbody> <?php - + $oddity = "odd"; foreach ($rows as $row) { print " <tr class=\"" . $oddity ."\">\n"; @@ -146,13 +146,13 @@ if (count($uri_parts) == 0) { // index else $oddity = "odd"; } - + ?> </tbody> </table> </div> <?php - + print_footer(); die(); @@ -161,7 +161,7 @@ if (count($uri_parts) == 0) { // index if ($uri_parts[0] == 'status') { $cutoff = 86400; - + $result = mysql_run_query( "SELECT " . "`l_ms`.`protocol`," . @@ -196,10 +196,10 @@ if ($uri_parts[0] == 'status') { " AND `a_ms`.`start` > UNIX_TIMESTAMP(NOW())-" . $cutoff . " GROUP BY `l_ms`.`id`" ); - + $last_check = 0; $max_count = 0; - + while($row = $result->fetch_assoc()) { foreach (array( "start", @@ -222,7 +222,7 @@ if ($uri_parts[0] == 'status') { $last_check = max ($row["start"], $last_check); $max_count = max ($row["count"], $max_count); } - + $content = array( "cutoff" => $cutoff, "check_frequency" => $cutoff/$max_count, @@ -231,7 +231,7 @@ if ($uri_parts[0] == 'status') { // "version" => 3, "urls" => $urls ); - + if (count($uri_parts) == 1) { // human readable } // human readable |